The Character Development Kit (CDK) is a set of Softimage Scripting Commands that return special JScript objects. Each object provides access to various components and related scene objects via its properties. For example:
// Set up the guide collection containing the shoulder, elbow and hand var guidecoll = new ActiveXObject("XSI.Collection"); guidecoll.Add( GetPrim("Null", "ShoulderGuide") ); guidecoll.Add( GetPrim("Null", "ElbowGuide") ); guidecoll.Add( GetPrim("Null", "HandGuide") ); var lXfm = guidecoll(0).Kinematics.Global.Transform lXfm.SetTranslationFromValues( 0, 0, 0 ); guidecoll(0).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues( 4, 0, -2 ); guidecoll(1).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues( 8, 0, 0 ); guidecoll(2).Kinematics.Global.Transform = lXfm; // Create the arm, getting the pointer to it from the command var RArmParent = GetPrim( "Null", "RArmParent" ); var RArm = MakeArm( RArmParent, guidecoll, "R", null, 0, 0, 0, null, null, 0 ); // Among other things, the custom Arm object gives you access to the parent of // the UpVector, a Skeleton collection of arm chain elements, the Bicep roll Application.LogMessage( "UpVector parent: " + RArm.UpVParent.Name ); var eSkel = new Enumerator( RArm.Skel ); Application.LogMessage( "Skeleton collection contains: " ); for ( ; !eSkel.atEnd(); eSkel.moveNext() ) { Application.LogMessage( "\t" + eSkel.item().Name ); } Application.LogMessage( "BicepRoll: " + RArm.UpV.Name ); // Output: // INFO : UpVector parent: RRoot // INFO : Skeleton collection contains: // INFO : RRoot // INFO : RBicep // INFO : RForearm // INFO : RArmEff // INFO : BicepRoll: RArmUpV
This section provides the reference documentation for the following CDK objects: