def Cloth_Rig_Execute(prop): obj = prop.Parent3DObject #if cloth op, we delete it, as well as ICE trees XSI.Cloth_Clean(prop) model = obj.Model clothop = None target = Cloth_GetTargetMesh(prop) clothop = Cloth_ApplySyflexOp(obj) init = Cloth_ApplyInitOp(obj, target) restore = Cloth_ApplyRestoreOp(obj, target) gravity = Cloth_GetGravity(clothop) wind = Cloth_GetWind(clothop) air = Cloth_GetAir(clothop) if prop.Parameters("SelfCollide").Value: selfcollide = Cloth_GetSelfCollide(obj) colliders = Cloth_GetColliderMeshes(prop) extra = Cloth_GetExtraCollider(prop) rigidmimic = Cloth_GetRigidMimic(prop, target) softmimic = Cloth_GetSoftMimic(prop, target) #if prop.Parameters("SetClothStiffness").Value: # driver = xsi.Dictionary.GetObject(prop.Parameters("StiffnessDriver").Value) # stiffness = Cloth_ApplyStiffnessOp(obj, driver) # lastly we read XML preset if exists #if cloth op, we store a preset Cloth_Rigger_ReadXML(prop)
def Cloth_Rigger_CleanCloth_OnClicked(): for prop in PPG.Inspected: XSI.Cloth_Clean(prop)