Hi,
I’ve made some changes to the MayaPandaTool.mel wrapper.
I added the coordinate system recognition.
The old wrapper doesn’t do this, so all converted files end up with Y-up coord system, regardless of the current file coord system. Now it respects the coord system of the current file.
I added this line to the export2Egg procedure :
string $up=`upAxis -q -axis`;
to get the up axis and this line :
$ARGS += " -cs " + $up+"-up";
to pass the coord system to the maya2egg.
I changed the animation mode for the option ‘Mesh’ export.
When the ‘Mesh’ export mode is selected, the old wrapper set the animation mode to ‘model’.
I set it to ‘none’, because if it is set to ‘model’, then the tag will be added to the egg. This tag will avoid Panda to find any referenced nodepath inside this file and will encounter the ‘isEmpty’ error when you try to use the NodePath.find() method.
The result with the old wrapper (in the egg) is similar to this:
The changed line is in the argsBuilder procedure, which was this part :
case "chooseMeshRB":
$args += "-a model ";
break;
and now becomes :
case "chooseMeshRB":
$args += "-a none ";
break;
I added the transformation saving options : ‘model’ and ‘all’.
=The default is ‘model’, which ignores the objects’ local pivot and consider all transformation as 0. With this mode, the objects’ local pivot is considered at the parent’s pivot.
=The other option is ‘all’, which save the objects’ local pivot and all transformation.
This option is very handy for exporting light holders, so we will only need to reparent the on-the-fly created lights to their corresponding holders and make little adjustments.
EDIT:
I changed the default transformation saving to “all”, just like the other exporters.
ADDITION:
4. Originally, any scene is exported using centimeter unit, the default in Maya, regardless of the current unit setting. (read this).
So I added unit querying and automatic conversion to the current unit setting, and of course, also able to set the destination unit as needed.
Only one thing I’d change: while the default behavior of “Mesh” is frustrating because the Dart tag hides the geometry (essentially preparing the model to be used as an Actor), there’s also the inverse problem: lacking the Dart tag, models exported with the Mesh option can’t be animated as Actors by applying animation rules from a separate egg file exported with the “Animation” option.
I’ve added an “Actor” option to the dialog which exports with the Dart tag to fix this issue; you can download the updated script (update to the update?) here
It’s always great to see someone improve the translation tools!
Hey Guys,
I was reading this thread and the problem that I am having was mentioned.
When a exported a scene from maya 7 to egg and tried to use the ‘nodePath.find("**/blah").getPos()’ I got a isEmpty assertion.
I tried to following the link in this thread to get the updates but the links were not working.
Any help would be great. If possible I would like to get the maya2egg7 upgrade that can be run from the command prompt, since the maya wrapper that you just drag into maya doesn’t work for me.
If you are going to use the maya2egg7 command-line tool, there is no update required. Just be sure you specify “-a none” (and not “-a model”) when you convert your model, to avoid converting it as an animated character, which would cause it to collapse away most of the individual nodes.
What error did you get ?
If both doesn’t work, may be it’s due to your ISP limitation, some ISP grant access to URL contain only numbers, alphabets, and dots, so the dash and the underscore may be not allowed.
If it’s the case, try -[HERE ]-
None of the links work for me either. One goes to a “404” page, the others go to a domain parking site with lots of advertisements having nothing to do with Panda3D.