Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Particle Initial State in MEL (https://simplymaya.com/forum/showthread.php?t=11437)

Brian820 16-04-2004 12:46 AM

Particle Initial State in MEL
 
Hey guys,

Trying to work with particles in MEL and I'm not sure the correct way to get my particles to the state I want to save as initial.

Here's what I want to do,

1) Create emitter/particles
2) Play for 50 frames
3) Save Particle Initial State
4) Delete Emitter

I'm golden for steps 1 and 3, and I figure step 4 shouldn't be too bad - I'm just not sure how to play my animation for 50 frames before setting the initial state. If I use currentTime 50, that gets me to frame 50 of course, but my particles have not moved as I never actually played through those frames.

Is there a flag/command I can use when creating the particles, something like setInitialAge(50 frames)?

I can see how it would be possible to overcome this by using playbackOptions to set the time slider from 0-50, but for usability I'd prefer my script not need to mess with the user's time slider. Unless there's a way to save and then revert back to the user's previous time slider settings?

There must be an easier way to do this.
Any help?

kbrown 16-04-2004 12:53 AM

Lookup the command called "runup" in the docs...

Quote:
"runup plays the scene through a frame of frames, forcing dynamic objects to evaluate as it does so."


All times are GMT. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018