Skip to content

Commit

Permalink
Updated README and added license stuff because its probably important
Browse files Browse the repository at this point in the history
  • Loading branch information
theFroh committed Oct 12, 2015
1 parent e9ac71b commit 853a613
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ Drag and drop an `.obj` file onto `objuvpacker.py` and behold the results inside
4. Inspect the packed output `.obj` and texture inside of the output directory (a folder named after the original `.obj` with `_packed` appended to it) to see if everything went well.
5. If you're doing this for Tabletop Simulator, convert the packed texture into a more compressed form (`.jpg`) if you do not need the transparency *(you usually don't)*, and then upload the `.obj` and texture file for use ingame -- have fun!

#### Arguments

- *Material* `-m --material MATERIAL` - Explicitly tell the script what `.mtl` file to use.
- *Output* `-o --output OUTPUT` - Explicitly tell the script where output to.
- *Add* `-a --add [ADD, ...]` - Additional images to be packed. (Probably useless)
- *No crop* `--no-crop` - Disable any cropping or tiling/unrolling.
- *No tile* `--no-tile` - Ignore any wrapped/tiling of textures (depends on cropping).

#### Tiling or wrapping warnings
If you get a prompt such as:

Expand Down
23 changes: 23 additions & 0 deletions imagepacker/imagepacker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
#! /usr/bin/python

# The MIT License (MIT)

# Copyright (c) 2015 Luke Gaynor

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from PIL import Image, ImageDraw
import math
from pprint import pprint
Expand Down
23 changes: 23 additions & 0 deletions objuvpacker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
#! /usr/bin/python

# The MIT License (MIT)

# Copyright (c) 2015 Luke Gaynor

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import argparse
import os
import sys
Expand Down

0 comments on commit 853a613

Please sign in to comment.