' getting the control object that will drive the IK ' NewScene CreatePrim "Cylinder", "MeshSurface" SetValue "cylinder.polymsh.geom.subdivu", 3 SetValue "cylinder.polymsh.geom.subdivv", 3 SetValue "cylinder.polymsh.geom.subdivbase", 1 Scale , 1.000, 5.419, 1.000, siRelative, siLocal, siObj, siXYZ Scale , 0.419, 1.000, 0.419, siRelative, siLocal, siObj, siXYZ Translate , 0.000, 10.978, 0.000, siRelative, siView, siCtr, siXYZ ' creating the bones ' Create2DSkeleton 0.000, 10.864, -0.140, 0.000, 3.487, -0.140, 0.000, 90.000, 0.000, 4 AppendBone "eff", 0.000, -3.742, 0.008 AppendBone "eff", 0.000, -10.971, 0.008 SelectObj "cylinder", , True ApplyCns "Position", "cylinder", "root" ActivateVertexSelTool AddToSelection "cylinder.pnt[4,8,12]", , True CreateCluster RemoveFromSelection "cylinder.polymsh.cls.Point" SelectGeometryComponents "cylinder.pnt[3,7,11]" CreateCluster RemoveFromSelection "cylinder.polymsh.cls.Point1" SelectGeometryComponents "cylinder.pnt[0,2,6,10]" CreateCluster ' Constraining IK to Object ' ApplyCns "ObjectToCluster", "bone1", "cylinder.polymsh.cls.Point" ApplyCns "ObjectToCluster", "bone2", "cylinder.polymsh.cls.Point1" ApplyCns "ObjectToCluster", "eff", "cylinder.polymsh.cls.Point2" ' Applying Cloth to Object ' AddToSelection "cylinder.pnt[0,2-4,6-8,10-12]", , True ApplyCloth "cylinder.pnt[0,2-4,6-8,10-12]" SetValue "cylinder.Cloth.Mass", 50 SetValue "cylinder.Cloth.Friction", 0.007 SetValue "cylinder.Cloth.Shear", 1.000 SetValue "cylinder.Cloth.Bend", 0.000 SetValue "cylinder.Cloth.Stretch", 1000.000 CreateForce "Gravity" SetValue "gravity.gravity.ampl", 100.000 ' Animating the IK ' SelectObj "root", "BRANCH", True SaveKey "root.kine.local.posx,root.kine.local.posy,root.kine.local.posz", 1.000 Translate , 0.000, 0.000, -13.762, siRelative, siView, siObj, siXYZ SaveKey "root.kine.local.posx,root.kine.local.posy,root.kine.local.posz", 10.000 Translate , 0.000, 10.043, 0.000, siRelative, siView, siObj, siXYZ SaveKey "root.kine.local.posx,root.kine.local.posy,root.kine.local.posz", 13.000 Translate , -0.000, 0.000, 19.105, siRelative, siView, siObj, siXYZ SaveKey "root.kine.local.posx,root.kine.local.posy,root.kine.local.posz", 16.000