![]() |
|
Scripting batch simulation in MEL - Printable Version +- Sitni Sati Forums (https://forum.afterworks.com) +-- Forum: Products (https://forum.afterworks.com/forumdisplay.php?fid=4) +--- Forum: FumeFX [maya] (https://forum.afterworks.com/forumdisplay.php?fid=19) +--- Thread: Scripting batch simulation in MEL (/showthread.php?tid=1632) |
Scripting batch simulation in MEL - catchyid - 06-28-2015 hi, I want to run multiple simulations sequentially, i.e. one after another, however I cannot find a way to do that in MEL script. Obviously, the MEL command "fumeFXcmd -runSimulation simMode fume;" spawns a simulation thread and returns control to the caller and I cannot find a function to tell whether the spawned fumeFX simulation thread has been completed or not. What I wish I had is either: (1) a fumeFX callback that tells me : I am done simulation (so I am ready to run another simulation, or maybe start rendering...), OR (2) a fumeFX function that tests whether a simulation job has completed or not. Without having this functionality, I have to set in front of my PC and wait for one sim to finish, then start the other one manually... Thanks in advance, Re: Scripting batch simulation in MEL - sitnisati - 06-29-2015 Hello, Actually, there is a possibility to do so. You could set some flag on the "PostSim" or "ffx_mel_PostSim" event. I hope this helps. Regards, Kresimir Tkalcec Re: Scripting batch simulation in MEL - catchyid - 07-02-2015 Thanks for your reply. I have two fumeFX grids, let's say A and B, I have modified A script such as: proc ffx_mel_PostSim( string $node ) { fumeFXcmd -runSimulation 0 trunk_p2a_g1Shape1; } so, basically in A postSim event, I try to start B simulation, however this did not work and I got an error message : //Error: (FumeFX) Simulation already running! I think, during these functions, FumeFX is considered running, so it won't start another sim, is this correct? If so, any idea how to overcome this issue? Re: Scripting batch simulation in MEL - sitnisati - 07-08-2015 Hello, You can do it like this: proc ffx_mel_PostSim( string $node ) { evalDeferred("pause -sec 10;fumeFXcmd -runSimulation 0 \"trunk_p2a_g1Shape1\";"); } It will wait 10 seconds after it's done to allow first FumeFX to finish everything and then it'll start simming the other FumeFX. I hope this helps. Regards, Kresimir Tkalcec |