Notifications
Clear all

[Closed] start simulate in cloth modifier

hi! first, excuse my English.

I ‘m trying to get a start button simulate of Cloth modifier


 On Button pressed do
 (
 ?
 )

but… in MaxScript Reference


 [left] 
 [/left]
  [left]<void>simulate  <boolean>show_dialog
 [/left]
  [left]Starts  the simulation. If the parameter is true, shows the simulation  dialog.
 [/left]
 
 

I don´t understand. Someone can help me?

5 Replies

on button pressed do
(
theObject.modifiers[#cloth].simulate true -- starts simulation with the simulation dialog
)

that’s assuming that theObject is the object with the cloth modifier applied

I tried this…


 def = attributes GenerarSimulacion
 (
 	rollout rSimulacion "Crear simulacion"
 	(
 		Button onSim "Generar"
 		on onSim pressed do
 		(
 			$Cloth.modifiers[#Cloth].simulate true 
 
 		)
 	)
 )
 custAttributes.add $.modifiers[1] def
 

in this scene …
and does not work

why you’re using a custom attribute for this? I mean, you already have the “simulate” button in the interface for the cloth modifier…

Well …
attempt to facilitate the work of animators …
Two buttons …
1- Simulate in viewport
2- Simulata on render (SimOnRender = true)

nothing more … and this practice MaxScript: D

ikerClon has helped me,
one had to select $cloth