View Full Version : Maya Plugin Help ...

09 September 2006, 09:16 PM
Hi there

I'm a relative newbie to Maya plugin dev, and was wondering how you can get info from the timeline at runtime? I want to create a smoke sim and have the user create a new 'Simulation' node, which can use OpenGL to render particles/volume/etc. but not sure which class to inherit from.

Also, I want to be able to have the use play the timeline and have the simulation respond by calculating at every timestep, but can't figure out how to do this either! Have read a couple of books on Maya API and have looked at the docs, but still not sure about it. HELP, pls!!!

09 September 2006, 11:50 PM
for starters I would create an MPxLocatorNode, add 2 time inputs (one for the init time and one for the current time). the current time input will be connected to the node "time1" (see for example a particle system in the hypergraph).
now you can do all the necessary initialisation for your sim when current time reaches init time and then take it from there. a locator node is pretty easy to set up, but you won't be able to software render your results (rendering in the viewport using opengl will be fine, though). probably best would be to have a separate shader which knows how to render you sim data. but that's for later....


09 September 2006, 07:28 PM
Cheers for the help Carsten. Have already coded a MPxLocatorNode using a devkit example and am using openGL to render points, but have not been sure about the animation side of things. Will have to have a look at how to create inputs and work it all it out ...

CGTalk Moderation
09 September 2006, 07:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.