The new maya2egg wrapper

(I moved this from this thread)
I’ve made some changes to the MayaPandaTool.mel (maya2egg wrapper):

1. added coordinate system recognition.
The original 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.

2. 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 would be added to the egg, which will avoid Panda to find any node inside this file and will raise ‘isEmpty’ error when you try to use the NodePath.find() method.
Thanks to Fixer (aka mtomczak now I believe) who added the Actor option to preserve the model as model (model-anim split export).

3. added the transform saving options : ‘model’ and ‘all’.
= The default is ‘all’, which save the objects’ local pivot and all transform.
This option is very handy for exporting light (or camera too) holders, so we will only need to reparent the on-the-fly created lights to their corresponding holders and make slight adjustments.
= The other option is ‘model’, which ignores the objects’ local pivot and consider all transform as identity. With this mode, the objects’ local pivot is considered at the parent’s pivot.

4. Originally, any scene is exported using centimeter unit, the default in Maya, regardless of the current unit setting.
So I added unit query and automatic conversion to the current unit setting, and of course, also able to override the destination unit as needed.

Download : MayaPandaTool3.mel

oh yes regarding of this, can you added a feature to capture the command line result from this ui?

i find most problem to get setup using this mel with panda and maya engine, path problem and so on.
so the best way is to do it manually via the command line.

but it would be best to get the syntax referred from your mel ui.

hope you can upgrade that.
just write down the syntax to the history box.

Thanks in advance :wink:

The command line is stored in $ARGS variable in procedure export2Egg, so insert this print command :

                print ("\n" + $ARGS + "\n");

before the overwrite check line.

got it, thanks :slight_smile: