Hello everyone,
I am teaching myself python in maya by coding a tool that helps speed up my maya/xnormal workflow. Basically, the tool allows you to automatically export your hi,lo and cage layers, select certain maps, then run xnormal right from maya.
The thing is I'm a self-taught coder. I'd love to get some feedback on this script from some of the more experienced coders around here. The two biggest things I'm looking for feedback on is the general organization of the code (e.g. Is it cool that it's all in one class?) and any thoughts on setting options per user (e.g. the best way for the user to set the xnormal.exe and the export path). Lastly, any suggestions on layout, extra features, etc. are also welcome.
You can download it here:
http://www.alexengelmann.com/forumImages/xnHelper.zip
For those that are interested in trying it out, here are a few quick steps on getting it running:
1. You'll need PyMEL installed to run it.
http://code.google.com/p/pymel/
2. Throw the xnHelper.py, and old.xml file in your script directory.
3. To run it save this to your shelf:
import xnHelper as xn
xn.xnHelper()
4. Once it's running, click the 'Setup Scene' button to make the display layers, and create an xnormal folder in your project directory.
5. Add your lo poly objects to the 'DL_lo' display layer
6. Add your hi poly objects to the 'DL_hi' display layer
7. If you have cages for your lo poly objects put them in the 'DL_cage' display layer.
7b. You can try to automatically creating a cage by selecting your lo poly objects and clicking the 'Make Cage' button. Note: this feature is kinda wonky still.
8. In the Xnormal Helper window, check the appropriate Export Sets and click the 'Export Sets' button. That'll export the corresponding layers as fbx's to the xnormal folder in your project directory
9. Check which maps you want to bake, and set the map size
10. push Bake, and if all goes well it should launch xnormal and bake your maps to the aforementioned xnormal folder.
Any comments, questions, or complaints are welcomed.
Thanks!
Replies