Simulation Script
![faonkenstein](https://secure.gravatar.com/avatar/00e1f93acc4327911c51813e693841fd?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2F00e1f93acc4327911c51813e693841fd_100.png)
Hello,
I'd like to script a simulation with multiple operations :
-run a first simulation
- freeze simulation for some objects
-move a group of objects
-change the simulation settings
-run a second simulation
-move a group of objects.
Is it possible to do that with the Daz3d Scripting tool ?
Is there a console to see the code for the manual operations to report it in the ScriptIDE window ?
Thank you for your help
Comments
Ok I think I have coded almost everything, but I don't know how to access the "Freeze simulation" option within the script, I don't find the reference in the database, I found noticed somewhere the action "Miscellaneous : Freeze Simulation : OptFreezeAction" but it seems to be a debugging tool to abort the simulation. I don't know how to access to the gravity settings of the simulation pannel either.
Could you help me with that part :
//freeze simulation for a groupnode (underbed var)
//change simulation settings (gravity)
//change timeline length
Just subscribing to the thread to learn
@foakenstein, I was wondering if one has access to the simulate button script, because it has two phases by default, one to get to the pose, second to stabilize the simulation. I wonder if that could be of help.
For Freeze Simulation you could try using the find property methods on DzNode, Timeline/Play range properties belong to DzScene as I recall.
Using the find property methods, I found this : "DzDForceModifier : dForce Simulation : Freeze Simulation" but I don't know how to change this parameter inside the code for my group of objects.
Ok I did this with the static/dynamic surface parameters :
All works correctly but I still need to access the simulation tab to change the gravity value inside the script.
I don't find anything related to "gravity" in the language database. Does anyone have the reference ?
I am not good enough to understand how to access the simulation settings, but I found an easy trick : save different simulation presets and then load them inside the script.
That's quite clever! So you got your auto bed maker script working?![laugh laugh](https://www.daz3d.com/forums/plugins/ckeditor/js/ckeditor/plugins/smiley/images/teeth_smile.png)