forked from makehumancommunity/makehuman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Readme.txt
185 lines (152 loc) · 7.83 KB
/
Readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
Commandline MakeTarget tool
---------------------------
This is a commandline version implementing the basic MakeTarget functionality.
Maketarget is a tool that can be used by artists for creating specific
targets that are used in the Makehuman program.
A target contains the offsets by which vertices of the human base model
(base.obj) deviate from the original to achieve a specific feature.
eg. a long nose could be a target.
These targets are used within Makehuman by blending them with others and
gradually applying them to the basemesh.
This tool allows wavefront .obj files to be used that were edited using any
3D program. The only limitations are that the edit stems from the original
base.obj and that no additional vertices are added or removed. The 3D program
used also needs to preserve the exact order of the vertices.
There are no other limitations on the obj files used.
Usage:
------
There are a commandline version and a version with graphic user interface.
Both do exactly the same thing.
Here follows the explanation of how to use the commandline version.
Options:
-i --in input obj or target
-o --out output obj or target
-s --sub target to subtract from obj
-a --add target to add to obj
-d --dir input folder to load all objs or targets from
--intype type of file to be input, obj (default) or target
only applicable if --dir is used
--outtype type of file that will be output, obj or target (default)
-h --help this info
-v --verbose verbose mode, shows extra information
Usage scenarios:
maketarget -i foo.obj -o foo.target
Load foo.obj as input, compare it with base.obj and output the
difference as foo.target.
maketarget --sub=foo1.target -i foo.obj -o foo.target
Load foo.obj, subtract foo1.target from it, and output the difference
between the resulting obj and base.obj as foo.target.
maketarget --add=foo1.target -i foo.obj -o foo.target
Load foo.obj, add foo1.target to it, and output the difference
between the resulting obj and base.obj as foo.target.
maketarget --dir=myfolder
Load all objs from myfolder, save the difference between the base.obj
and each of the input objs to a target file with the same name as the
input obj.
maketarget --dir=myfolder --sub=foo1.target
Load all objs from myfolder, subtract foo1.target from each of them, and
save the difference between base.obj and each of the resulting objs to
atarget file with the same name as the input obj.
maketarget --dir=myfolder --add=foo1.target
Load all objs from myfolder, add foo1.target to each of them, and
save the difference between base.obj and each of the resulting objs to
a target file with the same name as the input obj.
maketarget --outtype=obj -i foo.target -o foo.obj
Load foo.target, apply it to base.obj and output the resulting obj as
foo.obj.
maketarget --outtype=obj --dir=myfolder --intype=target
Load all target files from myfolder, apply each of them to base.obj and
save the result of each to obj with the same name as the target file.
maketarget --outtype obj --dir myfolder --intype target --sub foo1.target
Load all target files in myfolder, apply each of them to base.obj while
also subtracting foo1.target from the result. Save each combination to
an obj with the same name as the input target.
maketarget --outtype obj --dir myfolder --intype target --add foo1.target
Load all target files in myfolder, apply each of them to base.obj while
also adding foo1.target to the result. Save each combination to an obj
with the same name as the input target.
This is the usage information as can be obtained by running the
"maketarget.py --help" command.
Some additional scenarios that are not documented are possible with the tool.
The user is protected from issuing commands that make no sense (eg. do nothing)
as the tool will warn you about this.
Also note that files are never overwritten. Upon encountering an already
existing file this file is backed up as original_filename.bak. Additional
backups of the same file are named in order original_filename.bak.0
original_filename.bak.1 etc.
The GUI version of the tool does exactly the same thing. The exact same options
(except help and verbose) are available in the GUI. The only difference between
commandline and GUI version is that the GUI demands you specify an --in or --dir
parameter. With the commandline tool you can do without as long as you specify
some --add or --sub targets.
Compiling binaries:
-------------------
For the ease of distribution a pyinstaller configuration is supplied to create
a self-contained binary executable for both windows and linux. (MAC OS might
work but is untested)
For running this executable, the user does not need to install python or any
other libraries (such as wxwidgets) on his computer.
For building the package, however, you need to have those dependencies
installed, and need to build the package on the target OS.
There are two build files available:
compilePyinstaller.bat for building a windows executable
compilePyinstaller.sh for building a linux executable (might work for OSX
too)
In order to use them you need to create a folder called "pyinstaller" in the
makehuman/tools/standalone/maketarget folder.
The build configs were tested with pyinstaller 1.5.1, but might work on future
or older versions too.
Additionally these dependencies are needed for the respective operating systems:
Windows:
Python 2.7
http://python.org/
I recommend using python 2.7 as I had issues with 2.6 and pyinstaller
The tool works fine with python 2.6, however
pywin32
http://sourceforge.net/projects/pywin32/
Python extensions for windows. Needed for pyinstaller to work.
wxpython2.8
http://www.wxpython.org/
WX Widgets libraries and python wrappers for windows. Installable as one
singe package.
I recommend using the wxPython2.8 win32 unicode package for python 2.7.
UPX (optional)
http://upx.sourceforge.net/
This is a tool for compressing the executable and reduce its size
Compression will happen automatically if UPX is installed
To install UPX copy upx.exe to C:\WINDOWS\system32
Note: you will need at least UPX 1.92 beta due to incompatibilites
with the Visual Studio compiler, with which newer versions of python are
compiled on windows.
Linux:
Python 2.6
http://python.org/
Version 2.7 works fine too.
python-wxgtk2.8
libwxgtk2.8
http://www.wxpython.org/
http://www.wxwidgets.org/
WX Widgets libraries and python wrappers for wx
UPX (optional)
http://upx.sourceforge.net/
This is a tool for compressing the executable and reduce its size
Compression will happen automatically if UPX is installed
The pyinstaller script will create all the files that need to be distributed in
a folder called dist/ (this will be an .xrc file, the executable, and a
resources/ folder containing images used in the GUI).
You can archive the contents of the dist/ folder and distribute these freely
as a standalone application.
wxWidgets specific information:
-------------------------------
The GUI of this tool has been made using the python version of wxWidgets.
The GUI form itself is not created using application code, but is instead
loaded from the maketarget.xrc file that declares the GUI.
This file was built using wxFormBuilder (http://wxformbuilder.org/). The file
maketarget_gui.fbp is the source file that can be opened in formbuilder. The
xrc file is output generated using the formbuilder application. However, the xrc
could be edited manually too (but this would cause fbp and xrc file to go out of
sync).
More information:
-----------------
For more specific details you can contact the author Jonas Hauquier at the
makehuman.org website.