How can I open the simulated viewport through scripts?

bigboyhonghong
Explorer
Explorer

How can I open the simulated viewport through scripts?

bigboyhonghong
Explorer
Explorer

bigboyhonghong_0-1657267410946.png

Does anyone know about it?   I can not find the method to open the simulation view window throght the maxscript. 
By the way , How can I get the method to open an arbitrary 3dsmax's  panel like the simulation view?

0 Likes
Reply
Accepted solutions (1)
366 Views
3 Replies
Replies (3)

10DSpace
Advisor
Advisor
Accepted solution

@bigboyhonghong 

 

I have not played with this much myself, but since there is an existing macroscript for Simulation view in the list of actions via Customize>Customize User Interface, you can examine the code for opening the Simulation View by right clicking on it and selecting "Edit Macroscript."  

 

10DSpace_0-1657279018052.png

 

Be careful though not to make changes to the existing Macroscript itself.  Open a new window in the max editor and experiment with code in that.   From this, I found that

 

FluidSimObjectManager.ShowInterface()

  will open the Simulation view window and 

 

FluidSimObjectManager.HideInterface()

 

will hide it if you have a liquid selected.

 

There is also a more complete description of Liquids with maxscript if you have not already seen it here:

 

https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=GUID-D0504863-171B-43E3-8229-31A8D13E7A9A

0 Likes

DanielCantin
Autodesk
Autodesk

Enabling the MAXScript listener MacroRecorder is useful to expose many commands when using them, for example:
macros.run "Fluids" "SimulationView"
macros.run "Fluids" "ToggleSimulationView"



Daniel Cantin
QA Manager, 3ds Max, Maya
Entertainment Creation Products, DCP
0 Likes

bigboyhonghong
Explorer
Explorer

hanks for your help!

0 Likes