Console usage

Linux

WrapX release since version 1.3.4 contains Python extension module for Linux. You can find it in lib/wrap.so. Extension compiled with Python 2.7 on CentOS 6 and provided with all required libraries, so it must work on all modern Linux distributions. To use module just add its path to sys.path variable:

import sys
sys.path.append('/Path/To/R3DS_WrapX_1.3.4_Linux_64-Bit/lib')
import wrap
print wrap.version
1.3.4

Windows

Since WrapX Python extension currently builds with GCC, then it’s incompatible with Python interpreters that are embedded in programs like Autodesk Maya. We are working on this. Write us a letter if you need it. While it’s not ready one can achieve some automation by running WrapX from console with command line arguments:

Usage: WrapX.exe [--noexit] [filename] [args..]

--noexit : Don't exit program after script execution
filename : File name to execute
args..   : Any number of arguments which will be passed to python script

For example to run WrapX with specific script “C:\WrapXScripts\Example.py” and pass parameters “someObject.obj” and “anotherObject.obj” type the following:

WrapX.exe C:\WrapXScripts\Example.py someObject.obj anotherObject.obj

Variable sys.argv[1] inside a script will contain “someObject.obj” and sys.argv[2] will contain “anotherObject.obj”. So if Example.py just contains strings for printing arguments:

import sys
print sys.argv

Then the output that you will see in WrapX console window will look like this:

['C:\WrapXScripts\Example.py'], ['someObject.obj'], ['anotherObject.obj']