QUOTE(dauzer @ 04/17/08, 08:38 PM) [snapback]284335[/snapback]
This problem seems pretty much standard to me, but as far as I understand, there is no way to make it work, since you cannot call the right python function in your script and have access to your data structures that were already generated.
Huh? Ofcourse you can! You just need to make sure things dont get cleaned away because theres no longer no apparent use. (after a script is run its cleaned away)
Easiest is to declare the data global. This has nothing to do with how maya works but rather how PYTHON works. in fact theres nothing maya specific about the python. Ist still not inside maya it just has a api so it runs on side of maya.
But just out of curiosity are you integrating python API calls trough the plugin mechanism or trough the on line interpreter? If not the plugin mechanism then you should be switched to a different sub forum.
QUOTE
it apparently suggests to the programmer that you can use whatever you want... MEL or Python. Though, if you need menu funcionality like I do, you are limited using python.
Well mel and python.cmds are equal things theyimplement same functionality.
But dont mix this with API development its a different thing altogether. API implements commands and nodes, cmds interface implements user scriptability.
And in maya programming if you start your first project with callbacks you have misunderstood mays purpose.
Now then a few questions:
- do you want to implement a node?
- do you want to implement a command?
- do you want to implement a exporter?
- do you want to implement a renderer connection?
- do you want to implement a renderer OpenGL?
- do you want to implement a context?
- or are you scripting? (all other gui stuff fall under this ambrella)
QUOTE
So, from my point of view, the best solution would be to implement the whole thing in MEL. smile.gif
Im not the person who insisted thet python made things easier to understand.
Python is NOT easy, its 20 times harder to undertsand than mel on bad day. Its just astonishingly good to hide the fact.