Python Vs Python Api

Hey,

We have currently most of our scripts using Maya's Python and couple of nodes using the Maya Python API. Is there an efficiency difference to convert the python scripts using the python API? The scripts that we are considering are the Export scripts which seem to take from 5secs upto couple minutes (depending on the scene). Another potential script would be our series of uv handling scripts.

Thanks in advance

Personally i dont think theres any need for the python command structure, only the API part has any value whatsoever.

Would there be an efficiency difference to convert all maya.cmds to OpenMaya apis?

yes and no, Api is designed for nodal structures and not querrying/ setting stuff.

Thanks, I'm trying to decide if we need to make the change just for our Maya exporter to Granny. It currently runs slow with its series of setting values and traversing through the objects and the animation sequences.

Then answer is yes.

Great, then I guess we'll start pushing into that direction. I guess the difficult aspect is to convert the cmds. to the appropriate api.

Is there an equivalent to the mayaCmd.playbackOption in the api?

QUOTE(Overdrive D @ 09/06/07, 04:37 PM) [snapback]272909[/snapback]
Hey,

We have currently most of our scripts using Maya's Python and couple of nodes using the Maya Python API. Is there an efficiency difference to convert the python scripts using the python API? The scripts that we are considering are the Export scripts which seem to take from 5secs upto couple minutes (depending on the scene). Another potential script would be our series of uv handling scripts.

Thanks in advance

I'm knew to Python so please bare with me. What is the difference between python and Python API and how do they relate to the Maya API?

Nikos

Overdrive diamond is reffering to mayas duality, Maya has 2 inetrfaces scripting and api. Nand now later python versions FOR BOTH of theese. The cmds section of python is the same thing as mel. The api section of python is just a python binding to maya pi, ergo they are the same thing.