Torque3D Documentation / _generateds / tsShapeConstruct.cpp

tsShapeConstruct.cpp

Engine/source/ts/tsShapeConstruct.cpp

More...

Public Defines

define
CHECK_INDEX_IN_RANGE(func, index, maxIndex, ret)     ( ( index < 0 ) || ( index >= maxIndex ) )                     \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": index out of "    \
         "range (0-%d)", maxIndex-1);                                \
      return ret;                                                    \
   }
define
GET_MESH(func, var, name, ret)    * var = mShape->findMesh(name);                             \
    (!var)                                                         \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": Could not find "  \
         "mesh '%s'", name);                                         \
      return ret;                                                    \
   }
define
GET_NODE_INDEX_ALLOW_ROOT(func, var, name, ret)     var##Index = -1;                                              \
    (name[0])                                                      \
   {                                                                 \
      var##Index = mShape->findNode(name);                           \
       (var##Index < 0)                                            \
      {                                                              \
         ( "TSShapeConstructor::" #func ": Could not "    \
            "find node '%s'", name);                                 \
         return ret;                                                 \
      }                                                              \
   }                                                                 \
   * var = var##Index < 0 ?  : &(mShape->nodes[var##Index]); \
   (var##Index);                                        \
   (var)
define
GET_NODE_INDEX_NO_ROOT(func, var, name, ret)     var##Index = mShape->findNode(name);                          \
    (var##Index < 0)                                               \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": Could not find "  \
         "node '%s'", name);                                         \
      return ret;                                                    \
   }                                                                 \
   * var = &(mShape->nodes[var##Index]);                \
   (var##Index);                                        \
   (var)
define
GET_OBJECT(func, var, name, ret)     var##Index = mShape->findObject(name);                        \
    (var##Index < 0)                                               \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": Could not find "  \
         "object '%s'", name);                                       \
      return ret;                                                    \
   }                                                                 \
   * var = &(mShape->objects[var##Index]);            \
   (var##Index);                                        \
   (var)
define
GET_SEQUENCE(func, var, name, ret)     var##Index = mShape->findSequence(name);                      \
    (var##Index < 0)                                               \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": Could not find "  \
         "sequence named '%s'", name);                               \
      return ret;                                                    \
   }                                                                 \
   * var = &(mShape->sequences[var##Index]);        \
   (var##Index);                                        \
   (var);
define
define
RETURN_IF_MATCH(type)  (!(name, #type)) return Cmd##type

Public Variables

Called when the DTS or DAE resource is flushed from memory Not normally

Public Functions

ConsoleDocClass(TSShapeConstructor , "@brief An object used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> modify <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> DTS or COLLADA shape model after it has " "been loaded by <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Torque\n\n</a>" "@ingroup <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">gameObjects\n</a>" )
TiXmlElement *
createNodeWithText(const char * name, const char * text)
DefineTSShapeConstructorMethod(addImposter , S32 , (S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle) , (size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle) , - 1, "Add (or edit) an imposter detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "If the shape already contains an imposter detail level, this command will " "simply change the imposter <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">settings\n</a>" " @param <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the imposter detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @param equatorSteps defines the number of snapshots <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> take around the " "equator. Imagine the object being rotated around the vertical axis, then " "<a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> snapshot taken at regularly spaced <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">intervals.\n</a>" " @param polarSteps defines the number of snapshots taken between the poles " " , at each equator step. eg. At each equator snapshot, " "snapshots are taken at regular intervals between the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">poles.\n</a>" " @param dl the detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> use when generating the snapshots. Note that " "this is an array index rather than <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail size. So <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> an object has detail " "sizes of:200 , 150 , and 40, then setting @<a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> dl <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> 1 will generate the snapshots " "using detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> 150.\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @param dim defines the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the imposter images in pixels. The larger the " " number, the more detailed the billboard will <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">be.\n</a>" " @param includePoles flag indicating whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> include the \"pole\" snapshots. " "ie. the views from the top and bottom of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object.\n</a>" "@param polar_angle <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> pole snapshots are active  , this " "parameter defines the camera angle(in degrees) within which <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/editortool_8cpp/#editortool_8cpp_1a4cb041169a32ea3d4cacadbb955e06b4">render</a> the " "pole snapshot. eg. <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> polar_angle is set <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> 25 degrees, then the snapshot " "taken at the pole(looking directly down or up at the object) will be rendered " "when the camera is within 25 degrees of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pole.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addImposter(2, 4, 0, 0, 64, false, 0);\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "%this.addImposter(2, 4, 2, 0, 64, true, 10);//this command would edit the existing imposter detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(addMesh , bool , (const char *meshName, const char *srcShape, const char *srcMesh) , (meshName, srcShape, srcMesh) , false , "Add geometry from another DTS or DAE shape <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> into this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "Any materials <a href="/coding/file/tsshapeconstruct_8cpp/#tsshapeconstruct_8cpp_1a21625ca11566389388a748ad1acc0990">required</a> by the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> mesh are also copied into this shape.<br>\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param meshName full name (object name + detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> mesh. If " "no detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> is present at the end of the name, <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/pointer_8h/#pointer_8h_1a32aff7c6c4cd253fdf6563677afab5ce">value</a> of 2 is used.< br >" "An underscore before the number at the end of the name will be interpreted as " "<a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> negative sign. eg. \"MyMesh_4\" will be interpreted as \"MyMesh-4\".\n" "@param srcShape name of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> shape <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> (DTS or DAE) that contains the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh\n</a>" "@param srcMesh the full name (object name + detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "copy from the DTS/DAE <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> into this shape</li>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addMesh(\"ColMesh-1\", \"./collision.dts\", \"ColMesh\", \"Col-1\" );\n" "%this.addMesh( \"SimpleShape10\", \"./testShape.dae\", \"MyMesh2\", "" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(addNode , bool , (const char *name, const char *parentName, TransformF txfm, bool isWorld) , (TransformF::Identity, false) , (name, parentName, txfm, isWorld) , false , "Add <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> node  , the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> node will be at the root level of the node <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hierarchy.\n</a>" " @param txfm(optional) transform string of the form:\"pos.x pos.y pos.z rot.x rot.y rot.z rot.angle\"\n" "@param isworld (optional) flag <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set the local-<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a>-parent or the global " "transform. If false, or not specified, the position and orientation are " "treated as relative <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the node 's <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">parent.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addNode(\"Nose\", \"Bip01 Head\", \"0 2 2 0 0 1 0\" );\n" "%this.addNode( \"myRoot\", \"\", \"0 0 4 0 0 1 1.57\" );\n" "%this.addNode( \"Nodes\", \"Bip01 Head\", \"0 2 0 0 0 1 0\", true );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(addSequence , bool , (const char *source, const char *name, S32 start, S32 end, bool padRot, bool padTrans) , (0, -1, true, false) , (source, name, start, end, padRot, padTrans) , false , "Add <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@param <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> the name of an existing sequence, or the name of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> DTS or DAE " "shape or DSQ sequence file. When the shape <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> contains more than one " " sequence, the desired sequence can be specified by appending the name <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the " "end of the shape file. eg. \"myShape.dts run\" would select the \"run\" " "sequence from the \"myShape.dts\" file.\n\n" "@param name name of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n</a>" "@param start (optional) first frame <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy. Defaults <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> 0, the first frame in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" " @param end(optional) last frame <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy. Defaults <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> - 1, the last frame in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" " @param padRot(optional) copy root-pose rotation keys <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> non-animated nodes. This is useful <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> " "the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence data has <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> different root-pose <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target shape, such as <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> one character was " "in the <a href="/coding/group/group__engineapi__types/#group__engineapi__types_1ga16a0f7e7053a679c9bf4289b441a2be7">T</a> pose, and the other had arms at the side. Normally only nodes that are actually rotated by " "the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence have keyframes added, but setting this flag will also add keyframes <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> nodes " "that are not animated, but have <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> different root-pose rotation <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target shape root <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pose.\n</a>" " @param padTrans(optional) copy root-pose translation keys <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> non-animated nodes. This is useful <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> " "the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence data has <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> different root-pose <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target shape, such as <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> one character was " "in the <a href="/coding/group/group__engineapi__types/#group__engineapi__types_1ga16a0f7e7053a679c9bf4289b441a2be7">T</a> pose, and the other had arms at the side. Normally only nodes that are actually moved by " "the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence have keyframes added, but setting this flag will also add keyframes <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> nodes " "that are not animated, but have <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> different root-pose position <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target shape root <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pose.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addSequence(\"./testShape.dts ambient\", \"ambient\" );\n" "%this.addSequence( \"./myPlayer.dae run\", \"run\" );\n" "%this.addSequence( \"./player_look.dsq\", \"look\", 0, -1 ); // start <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">end\n</a>" "%this.addSequence( \"walk\", \"walk_shortA\", 0, 4 ); // start <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> frame 4\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "%this.addSequence( \"walk\", \"walk_shortB\", 4, -1 ); // frame 4 <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">end\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(addTrigger , bool , (const char *name, S32 keyframe, S32 state) , (name, keyframe, state) , false , "Add <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> trigger <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param keyframe keyframe of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">trigger\n</a>" "@param state of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">trigger\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addTrigger(\"walk\", 3, 1 );\n" "%this.addTrigger( \"walk\", 5, -1 );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(dumpShape , void , (const char *filename) , ("") , (filename) , "Dump the shape hierarchy <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the console or <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> file. Useful <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> reviewing " "the result of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> series of construction <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">commands.\n</a>" "@param filename Destination filename. If not specified, dump <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">console.\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.dumpShape();//dump <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">console\n</a>" "%this.dumpShape(\"./dump.txt\" ); // dump <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getBounds , Box3F , () , () , Box3F::Invalid , "Get the bounding box <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@return Bounding box \"minX minY minZ maxX maxY maxZ\"" )
DefineTSShapeConstructorMethod(getDetailLevelCount , S32 , () , () , 0 , "Get the total number of detail levels in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@return the number of detail levels in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape\n</a>" )
DefineTSShapeConstructorMethod(getDetailLevelIndex , S32 , (S32 size) , (size) , - 1, "Get the index of the detail level with <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> given <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">size.\n</a>" "@param <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">lookup\n</a>" "@return index of the detail level with the desired size, or -1 <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> no such " "detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">exists\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a>(%this.getDetailLevelSize(32)==-1)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " <a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>(\"Error: This shape does not have <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail level at <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> 32\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getDetailLevelName , const char * , (S32 index) , (index) , "" )
DefineTSShapeConstructorMethod(getDetailLevelSize , S32 , (S32 index) , (index) , 0 )
DefineTSShapeConstructorMethod(getImposterDetailLevel , S32 , () , () , - 1, "Get the index of the imposter (auto-billboard) detail level (<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> any).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return imposter detail level index, or -1 <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the shape does not use " "<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">imposters.\n\n</a>" )
DefineTSShapeConstructorMethod(getImposterSettings , const char * , (S32 index) , (index) , "" )
DefineTSShapeConstructorMethod(getMeshCount , S32 , (const char *name) , (name) , 0 )
DefineTSShapeConstructorMethod(getMeshMaterial , const char * , (const char *name) , (name) , "" , "Get the name of the material attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> mesh. Note that only the first " "material used by the mesh is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">returned.\n</a>" "@param name full name (object name + detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return name of the material attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the mesh (suitable <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> use with the <a href="/coding/class/classmaterial/">Material</a> mapTo field)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Mesh material is \" @ %this.sgetMeshMaterial( \"SimpleShape128\" ) );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getMeshName , const char * , (const char *name, S32 index) , (name, index) , "" )
DefineTSShapeConstructorMethod(getMeshSize , S32 , (const char *name, S32 index) , (name, index) , - 1, "Get the detail level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the indexed mesh <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object.\n</a>" "@param name name of the object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@param index index of the mesh (valid range is 0 - getMeshCount()-1)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return the mesh detail level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">size.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// print sizes <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> all detail levels of this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object\n</a>" "% objName)
DefineTSShapeConstructorMethod(getMeshType , const char * , (const char *name) , (name) , "" , "Get the display type of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh.\n</a>" "@param name name of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return the string returned is one of:" "<dl><dt>normal</dt><dd><a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> normal 3D mesh</dd>" "<dt>billboard</dt><dd><a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> mesh that always faces the camera</dd>" "<dt>billboardzaxis</dt><dd><a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> mesh that always faces the camera in the Z-axis</dd></dl>\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Mesh type is \" @ %this.getMeshType( \"SimpleShape128\" ) );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getNodeChildCount , S32 , (const char *name) , (name) , 0 )
DefineTSShapeConstructorMethod(getNodeChildName , const char * , (const char *name, S32 index) , (name, index) , "" , "Get the name of the indexed child <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name of the parent node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query.\n</a>" "@param index index of the child node (valid range is 0 - getNodeChildName()-1).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return the name of the indexed child <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "function dumpNode( %shape, %name, %indent )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "{\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   <a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( %indent @ %name );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   %<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1ad43c3812e6d13e0518d9f8b8f463ffcf">count</a> = %shape.getNodeChildCount( %name );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> ( %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> = 0; %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> < %<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1ad43c3812e6d13e0518d9f8b8f463ffcf">count</a>; %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a>++ )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "      dumpNode( %shape, %shape.getNodeChildName( %name, %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> ), %indent @ \"   \" );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "}\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "function dumpShape( %shape )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "{\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   // recursively dump node <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hierarchy\n</a>" "   %<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1ad43c3812e6d13e0518d9f8b8f463ffcf">count</a> = %shape.getNodeCount();\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> ( %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> = 0; %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> < %<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1ad43c3812e6d13e0518d9f8b8f463ffcf">count</a>; %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a>++ )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   {\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "      // dump top level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">nodes\n</a>" "      %name = %shape.getNodeName( %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "      <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> ( %shape.getNodeParentName( %name ) $= "" )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "         dumpNode( %shape, %name, \"\" );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   }\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "}\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getNodeCount , S32 , () , () , 0 )
DefineTSShapeConstructorMethod(getNodeIndex , S32 , (const char *name) , (name) , - 1, "Get the index of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">lookup.\n</a>" "@return the index of the named node)
DefineTSShapeConstructorMethod(getNodeName , const char * , (S32 index) , (index) , "" , "Get the name of the indexed <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param index index of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> lookup (valid range is 0 - getNodeCount()-1).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return the name of the indexed node)
DefineTSShapeConstructorMethod(getNodeObjectCount , S32 , (const char *name) , (name) , 0 )
DefineTSShapeConstructorMethod(getNodeObjectName , const char * , (const char *name, S32 index) , (name, index) , "" )
DefineTSShapeConstructorMethod(getNodeParentName , const char * , (const char *name) , (name) , "" , "Get the name of the node's parent. If the node has no parent  , return an empty <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">string.\n</a>" " @param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query.\n</a>" " @return the name of the node 's parent, or \"\" <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the node is at the root <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Bip01 Pelvis parent = \" @ %this.getNodeParentName( \"Bip01 Pelvis \") );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getNodeTransform , TransformF , (const char *name, bool isWorld) , (false) , (name, isWorld) , TransformF::Identity , "Get the base (ie. not animated) transform of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query.\n</a>" "@param isWorld true <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> get the global transform)
DefineTSShapeConstructorMethod(getObjectCount , S32 , () , () , 0 )
DefineTSShapeConstructorMethod(getObjectIndex , S32 , (const char *name) , (name) , - 1)
DefineTSShapeConstructorMethod(getObjectName , const char * , (S32 index) , (index) , "" )
DefineTSShapeConstructorMethod(getObjectNode , const char * , (const char *name) , (name) , "" , "Get the name of the node this object is attached <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">to.\n</a>" "@param name name of the object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">get.\n</a>" "@return the name of the attached node, or an empty string <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> this " "object is not attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> node(usually the case <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> skinned meshes).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>(\"Hand is attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> \" @ %this.getObjectNode( \"Hand\" ) );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getSequenceBlend , const char * , (const char *name) , (name) , "" , "Get information about blended <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequences.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return TAB delimited string of the form: \"isBlend blendSeq blendFrame\" )
DefineTSShapeConstructorMethod(getSequenceCount , S32 , () , () , 0 , "Get the total number of sequences in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@return the number of sequences in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape\n\n</a>" )
DefineTSShapeConstructorMethod(getSequenceCyclic , bool , (const char *name) , (name) , false , "Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> this sequence is cyclic (looping).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> this sequence is cyclic, false <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a>(!%this.getSequenceCyclic(\"ambient\" ) )\n" " error( \"ambient sequence is not cyclic!\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getSequenceFrameCount , S32 , (const char *name) , (name) , 0 , "Get the number of keyframes in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return number of keyframes in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Run has \" @ %this.getSequenceFrameCount( \"run\" ) @ \" keyframes\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getSequenceGroundSpeed , const char * , (const char *name) , (name) , "" )
DefineTSShapeConstructorMethod(getSequenceIndex , S32 , (const char *name) , (name) , - 1, "Find the index of the sequence with the given <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">lookup\n</a>" "@return index of the sequence with matching name, or -1 <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> not <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">found\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> given sequence exists in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape\n</a>" "<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a>(%this.getSequenceIndex(\"walk\" ) == -1 )\n" " <a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Could not find 'walk' sequence\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getSequenceName , const char * , (S32 index) , (index) , "" )
DefineTSShapeConstructorMethod(getSequencePriority , F32 , (const char *name) , (name) , -1. 0f, "Get the priority setting of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return priority <a href="/coding/file/pointer_8h/#pointer_8h_1a32aff7c6c4cd253fdf6563677afab5ce">value</a> of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n\n</a>" )
DefineTSShapeConstructorMethod(getSequenceSource , const char * , (const char *name) , (name) , "" , "Get information about where the sequence data came <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">from.\n</a>" "For example, whether it was loaded from an external DSQ <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file.\n</a>" " @param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" " @return TAB delimited string of the form:\"from reserved start end total\" , where:" "< dl >" "< dt >from</dt >< dd >the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> of the animation data, such as the path <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "<a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> DSQ file, or the name of an existing sequence in the shape. This field " "will be empty <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> sequences already embedded in the DTS or DAE file.</dd >" "< dt >reserved</dt >< dd >reserved <a href="/coding/file/pointer_8h/#pointer_8h_1a32aff7c6c4cd253fdf6563677afab5ce">value</a></dd >" "< dt >start</dt >< dd >the first frame in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> create this sequence</dd >" "< dt >end</dt >< dd >the last frame in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> create this sequence</dd >" "< dt >total</dt >< dd >the total number of frames in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence</dd >" "</dl >\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//print the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the walk <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">animation\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>(\"walk source:\" SPC getField( %this.getSequenceSource( \"walk\" ), 0 ) );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(getTargetCount , S32 , () , () , 0 )
DefineTSShapeConstructorMethod(getTargetName , const char * , (S32 index) , (index) , "" )
DefineTSShapeConstructorMethod(getTrigger , const char * , (const char *name, S32 index) , (name, index) , "" )
DefineTSShapeConstructorMethod(getTriggerCount , S32 , (const char *name) , (name) , 0 , "Get the number of triggers in the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return number of triggers in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n\n</a>" )
DefineTSShapeConstructorMethod(notifyShapeChanged , void , () , () , "Notify game objects that this shape <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> has changed, allowing them <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> update " "internal data <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> needed." )
DefineTSShapeConstructorMethod(removeDetailLevel , bool , (S32 index) , (index) , false , "Remove the detail level (including all meshes in the detail level)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.removeDetailLevel(2);\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(removeImposter , bool , () , () , false , "() Remove the imposter detail level (<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> any) from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" )
DefineTSShapeConstructorMethod(removeMesh , bool , (const char *name) , (name) , false , "Remove <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> mesh from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "If all geometry is removed from an object, the object is also <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">removed.\n</a>" " @param name full name(object name+detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.removeMesh(\"SimpleShape128\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(removeNode , bool , (const char *name) , (name) , false , "Remove <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> node from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "The named node is removed from the shape, including from any sequences that " "use the node. Child nodes and objects attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the node are re-assigned " "<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the node 's <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">parent.\n</a>" " @param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise.\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.removeNode(\"Nose\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(removeObject , bool , (const char *name) , (name) , false , "Remove an object (including all meshes <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> that object) from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@param name name of the object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove.\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful)
DefineTSShapeConstructorMethod(removeSequence , bool , (const char *name) , (name) , false , "Remove the sequence from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" )
DefineTSShapeConstructorMethod(removeTrigger , bool , (const char *name, S32 keyframe, S32 state) , (name, keyframe, state) , false , "Remove <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> trigger from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param keyframe keyframe of the trigger <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" "@param state of the trigger <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.removeTrigger(\"walk\", 3, 1 );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(renameDetailLevel , bool , (const char *oldName, const char *newName) , (oldName, newName) , false , "Rename <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level.\n</a>" "@note Note that detail level names must be unique, so this command will " "fail <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> there is already <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail level with the desired <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name\n</a>" " @param oldName current name of the detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @param newName <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name of the detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.renameDetailLevel(\"detail-1\", \"collision-1\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(renameNode , bool , (const char *oldName, const char *newName) , (oldName, newName) , false , "Rename <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@note Note that node names must be unique, so this command will fail <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> " "there is already <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> node with the desired <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name\n</a>" " @param oldName current name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node\n</a>" " @param newName <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.renameNode(\"Bip01 L Hand\", \"mount5\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(renameObject , bool , (const char *oldName, const char *newName) , (oldName, newName) , false , "Rename an <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object.\n</a>" "@note Note that object names must be unique, so this command will fail <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> " "there is already an object with the desired <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name\n</a>" " @param oldName current name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object\n</a>" " @param newName <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.renameObject(\"MyBox\", \"Box\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(renameSequence , bool , (const char *oldName, const char *newName) , (oldName, newName) , false , "Rename <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@note Note that sequence names must be unique, so this command will fail " "<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> there is already <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> sequence with the desired <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name\n</a>" " @param oldName current name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n</a>" " @param newName <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.renameSequence(\"walking\", \"walk\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(saveShape , void , (const char *filename) , (filename) , "Save the shape (with all current changes) <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> DTS <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file.\n</a>" "@param filename Destination <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">filename.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.saveShape( \"./myShape.dts\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setBounds , bool , (Box3F bbox) , (bbox) , false , "Set the shape bounds <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the given bounding <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">box.\n</a>" "@param Bounding box \"minX minY minZ maxX maxY maxZ\"\n" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n</a>" )
DefineTSShapeConstructorMethod(setDetailLevelSize , S32 , (S32 index, S32 newSize) , (index, newSize) , index , "Change the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail level." "@note Note that detail levels are always sorted in decreasing <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> order, " "so this command may cause detail level indices <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">change.\n</a>" " @param index index of the detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" " @param newSize <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @return <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> index <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> this detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setDetailLevelSize(2, 256);\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setMeshMaterial , bool , (const char *meshName, const char *matName) , (meshName, matName) , false , "Set the name of the material attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh.\n</a>" "@param meshName full name  , or the name of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> " "<a href="/coding/class/classmaterial/">Material</a> object already defined in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">script.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//set the mesh <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">material\n</a>" "%this.setMeshMaterial(\"SimpleShape128\", \"test_mat\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setMeshSize , bool , (const char *name, S32 size) , (name, size) , false , "Change the detail level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the named <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh.\n</a>" "@param name full name (object name + current <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> ) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> detail level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">size\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise.\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setMeshSize(\"SimpleShape128\", 64 );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setMeshType , bool , (const char *name, const char *type) , (name, type) , false , "Set the display type <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh.\n</a>" "@param name full name (object name + detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param type the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> type <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the mesh: \"normal\" , \"billboard\" or \"billboardzaxis\"\n" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//set the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> be <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">billboard\n</a>" "%this.setMeshType(\"SimpleShape64\", \"billboard\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setNodeParent , bool , (const char *name, const char *parentName) , (name, parentName) , false , "Set the parent of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param parentName name of the parent node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set (use \"\" <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> move the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the root level)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">failed\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setNodeParent(\"Bip01 Pelvis\", \"start01\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setNodeTransform , bool , (const char *name, TransformF txfm, bool isWorld) , (false) , (name, txfm, isWorld) , false , "Set the base transform of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> node. That is, the transform of the node when " "in the root(not-animated) <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pose.\n</a>" " @param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" " @param txfm transform string of the form:\"pos.x pos.y pos.z rot.x rot.y rot.z rot.angle\"\n" "@param isworld (optional) flag <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set the local-<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a>-parent or the global " "transform. If false, or not specified, the position and orientation are " "treated as relative <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the node 's <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">parent.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setNodeTransform(\"mount0\", \"0 0 1 0 0 1 0\" );\n" "%this.setNodeTransform( \"mount0\", \"0 0 0 0 0 1 1.57\" );\n" "%this.setNodeTransform( \"mount0\", \"1 0 0 0 0 1 0\", true );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setObjectNode , bool , (const char *objName, const char *nodeName) , (objName, nodeName) , false , "Set the node an object is attached <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">to.\n</a>" "When the shape is rendered, the object geometry is rendered at the node 's " "current <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">transform.\n</a>" " @param objName name of the object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" " @param nodeName name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> attach the object <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">to\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setObjectNode(\"Hand\", \"Bip01 LeftHand\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setSequenceBlend , bool , (const char *name, bool blend, const char *blendSeq, S32 blendFrame) , (name, blend, blendSeq, blendFrame) , false , "Mark <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> sequence as <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> blend or non-<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">blend.\n</a>" "A blend sequence is one that will be added on top of any other playing " "sequences. This is done by storing the animated node transforms relative " "<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> reference frame, rather than as absolute <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">transforms.\n</a>" " @param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" " @param blend true <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make the sequence <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> blend, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> non-<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">blend\n</a>" " @param blendSeq the name of the sequence that contains the blend reference <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame\n</a>" " @param blendFrame the reference frame in the blendSeq <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setSequenceBlend(\"look\", true, \"root\", 0 );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setSequenceCyclic , bool , (const char *name, bool cyclic) , (name, cyclic) , false , "Mark <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> sequence as cyclic or non-<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">cyclic.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param cyclic true <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make the sequence cyclic, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> non-<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">cyclic\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setSequenceCyclic(\"ambient\", true );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "%this.setSequenceCyclic( \"shoot\", false );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setSequenceGroundSpeed , bool , (const char *name, Point3F transSpeed, Point3F rotSpeed) , (Point3F::Zero) , (name, transSpeed, rotSpeed) , false , "Set the translation and rotation ground speed of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "The ground speed of the sequence is set by generating ground transform " "keyframes. The ground translational and rotational speed is assumed <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "be constant <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the duration of the sequence. Existing ground frames <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> " "the sequence (<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> any) will be <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">replaced.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param transSpeed translational speed (trans.x trans.y trans.z) in " "Torque units per <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame\n</a>" "@param rotSpeed (optional) rotational speed (rot.x rot.y rot.z) in " "radians per frame. Default is \"0 0 0\"\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setSequenceGroundSpeed(\"run\", \"5 0 0\" );\n" "%this.setSequenceGroundSpeed( \"spin\", \"0 0 0\", \"4 0 0\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )
DefineTSShapeConstructorMethod(setSequencePriority , bool , (const char *name, F32 priority) , (name, priority) , false , "Set the sequence <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">priority.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param priority <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> priority <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">value\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" )
DefineTSShapeConstructorMethod(writeChangeSet , void , () , () , "Write the current change set <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a> script file. The " "name of the script <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> is the same as the model, but with ." TORQUE_SCRIPT_EXTENSION " extension. " "eg. myShape." TORQUE_SCRIPT_EXTENSION " for myShape.dts or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">myShape.dae.\n</a>" )
IMPLEMENT_CALLBACK(TSShapeConstructor , onLoad , void , () , () , "Called immediately after the DTS or DAE <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> has been loaded; before the " "shape data is available <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> any other object (<a href="/coding/class/classstaticshape/">StaticShape</a>, <a href="/coding/class/classplayer/">Player</a> etc). This " "is where you should put any post-load commands <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> modify the shape in-memory " "such as addNode, renameSequence etc." )
ImplementEnumType(TSShapeConstructorAnimType , "\n\n" "@ingroup <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a>" )
ImplementEnumType(TSShapeConstructorLodType , "\n\n" "@ingroup <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a>" )
Called when the DTS or DAE resource is flushed from memory Not normally but may be useful to perform cleanup
ImplementEnumType(TSShapeConstructorUpAxis , "Axis <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> use <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> upwards direction when importing from <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Collada.\n\n</a>" "@ingroup <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a>" )
bool
namesEqual(const String & nameA, const String & nameB)

Detailed Description

Public Defines

CHECK_INDEX_IN_RANGE(func, index, maxIndex, ret)     ( ( index < 0 ) || ( index >= maxIndex ) )                     \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": index out of "    \
         "range (0-%d)", maxIndex-1);                                \
      return ret;                                                    \
   }
GET_MESH(func, var, name, ret)    * var = mShape->findMesh(name);                             \
    (!var)                                                         \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": Could not find "  \
         "mesh '%s'", name);                                         \
      return ret;                                                    \
   }
GET_NODE_INDEX_ALLOW_ROOT(func, var, name, ret)     var##Index = -1;                                              \
    (name[0])                                                      \
   {                                                                 \
      var##Index = mShape->findNode(name);                           \
       (var##Index < 0)                                            \
      {                                                              \
         ( "TSShapeConstructor::" #func ": Could not "    \
            "find node '%s'", name);                                 \
         return ret;                                                 \
      }                                                              \
   }                                                                 \
   * var = var##Index < 0 ?  : &(mShape->nodes[var##Index]); \
   (var##Index);                                        \
   (var)
GET_NODE_INDEX_NO_ROOT(func, var, name, ret)     var##Index = mShape->findNode(name);                          \
    (var##Index < 0)                                               \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": Could not find "  \
         "node '%s'", name);                                         \
      return ret;                                                    \
   }                                                                 \
   * var = &(mShape->nodes[var##Index]);                \
   (var##Index);                                        \
   (var)
GET_OBJECT(func, var, name, ret)     var##Index = mShape->findObject(name);                        \
    (var##Index < 0)                                               \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": Could not find "  \
         "object '%s'", name);                                       \
      return ret;                                                    \
   }                                                                 \
   * var = &(mShape->objects[var##Index]);            \
   (var##Index);                                        \
   (var)
GET_SEQUENCE(func, var, name, ret)     var##Index = mShape->findSequence(name);                      \
    (var##Index < 0)                                               \
   {                                                                 \
      ( "TSShapeConstructor::" #func ": Could not find "  \
         "sequence named '%s'", name);                               \
      return ret;                                                    \
   }                                                                 \
   * var = &(mShape->sequences[var##Index]);        \
   (var##Index);                                        \
   (var);
MAX_PATH_LENGTH() 256
RETURN_IF_MATCH(type)  (!(name, #type)) return Cmd##type

Public Variables

 EndImplementEnumType 
 onUnload 
Called when the DTS or DAE resource is flushed from memory Not normally required 
 void 

Public Functions

ConsoleDocClass(TSShapeConstructor , "@brief An object used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> modify <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> DTS or COLLADA shape model after it has " "been loaded by <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Torque\n\n</a>" "@ingroup <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">gameObjects\n</a>" )

createNodeWithText(const char * name, const char * text)

DefineTSShapeConstructorMethod(addImposter , S32 , (S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle) , (size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle) , - 1, "Add (or edit) an imposter detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "If the shape already contains an imposter detail level, this command will " "simply change the imposter <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">settings\n</a>" " @param <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the imposter detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @param equatorSteps defines the number of snapshots <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> take around the " "equator. Imagine the object being rotated around the vertical axis, then " "<a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> snapshot taken at regularly spaced <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">intervals.\n</a>" " @param polarSteps defines the number of snapshots taken between the poles " " , at each equator step. eg. At each equator snapshot, " "snapshots are taken at regular intervals between the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">poles.\n</a>" " @param dl the detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> use when generating the snapshots. Note that " "this is an array index rather than <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail size. So <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> an object has detail " "sizes of:200 , 150 , and 40, then setting @<a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> dl <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> 1 will generate the snapshots " "using detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> 150.\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @param dim defines the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the imposter images in pixels. The larger the " " number, the more detailed the billboard will <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">be.\n</a>" " @param includePoles flag indicating whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> include the \"pole\" snapshots. " "ie. the views from the top and bottom of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object.\n</a>" "@param polar_angle <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> pole snapshots are active  , this " "parameter defines the camera angle(in degrees) within which <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/editortool_8cpp/#editortool_8cpp_1a4cb041169a32ea3d4cacadbb955e06b4">render</a> the " "pole snapshot. eg. <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> polar_angle is set <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> 25 degrees, then the snapshot " "taken at the pole(looking directly down or up at the object) will be rendered " "when the camera is within 25 degrees of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pole.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addImposter(2, 4, 0, 0, 64, false, 0);\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "%this.addImposter(2, 4, 2, 0, 64, true, 10);//this command would edit the existing imposter detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(addMesh , bool , (const char *meshName, const char *srcShape, const char *srcMesh) , (meshName, srcShape, srcMesh) , false , "Add geometry from another DTS or DAE shape <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> into this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "Any materials <a href="/coding/file/tsshapeconstruct_8cpp/#tsshapeconstruct_8cpp_1a21625ca11566389388a748ad1acc0990">required</a> by the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> mesh are also copied into this shape.<br>\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param meshName full name (object name + detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> mesh. If " "no detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> is present at the end of the name, <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/pointer_8h/#pointer_8h_1a32aff7c6c4cd253fdf6563677afab5ce">value</a> of 2 is used.< br >" "An underscore before the number at the end of the name will be interpreted as " "<a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> negative sign. eg. \"MyMesh_4\" will be interpreted as \"MyMesh-4\".\n" "@param srcShape name of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> shape <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> (DTS or DAE) that contains the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh\n</a>" "@param srcMesh the full name (object name + detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "copy from the DTS/DAE <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> into this shape</li>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addMesh(\"ColMesh-1\", \"./collision.dts\", \"ColMesh\", \"Col-1\" );\n" "%this.addMesh( \"SimpleShape10\", \"./testShape.dae\", \"MyMesh2\", "" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(addNode , bool , (const char *name, const char *parentName, TransformF txfm, bool isWorld) , (TransformF::Identity, false) , (name, parentName, txfm, isWorld) , false , "Add <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> node  , the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> node will be at the root level of the node <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hierarchy.\n</a>" " @param txfm(optional) transform string of the form:\"pos.x pos.y pos.z rot.x rot.y rot.z rot.angle\"\n" "@param isworld (optional) flag <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set the local-<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a>-parent or the global " "transform. If false, or not specified, the position and orientation are " "treated as relative <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the node 's <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">parent.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addNode(\"Nose\", \"Bip01 Head\", \"0 2 2 0 0 1 0\" );\n" "%this.addNode( \"myRoot\", \"\", \"0 0 4 0 0 1 1.57\" );\n" "%this.addNode( \"Nodes\", \"Bip01 Head\", \"0 2 0 0 0 1 0\", true );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(addSequence , bool , (const char *source, const char *name, S32 start, S32 end, bool padRot, bool padTrans) , (0, -1, true, false) , (source, name, start, end, padRot, padTrans) , false , "Add <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@param <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> the name of an existing sequence, or the name of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> DTS or DAE " "shape or DSQ sequence file. When the shape <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> contains more than one " " sequence, the desired sequence can be specified by appending the name <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the " "end of the shape file. eg. \"myShape.dts run\" would select the \"run\" " "sequence from the \"myShape.dts\" file.\n\n" "@param name name of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n</a>" "@param start (optional) first frame <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy. Defaults <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> 0, the first frame in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" " @param end(optional) last frame <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy. Defaults <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> - 1, the last frame in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" " @param padRot(optional) copy root-pose rotation keys <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> non-animated nodes. This is useful <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> " "the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence data has <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> different root-pose <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target shape, such as <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> one character was " "in the <a href="/coding/group/group__engineapi__types/#group__engineapi__types_1ga16a0f7e7053a679c9bf4289b441a2be7">T</a> pose, and the other had arms at the side. Normally only nodes that are actually rotated by " "the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence have keyframes added, but setting this flag will also add keyframes <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> nodes " "that are not animated, but have <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> different root-pose rotation <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target shape root <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pose.\n</a>" " @param padTrans(optional) copy root-pose translation keys <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> non-animated nodes. This is useful <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> " "the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence data has <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> different root-pose <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target shape, such as <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> one character was " "in the <a href="/coding/group/group__engineapi__types/#group__engineapi__types_1ga16a0f7e7053a679c9bf4289b441a2be7">T</a> pose, and the other had arms at the side. Normally only nodes that are actually moved by " "the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence have keyframes added, but setting this flag will also add keyframes <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> nodes " "that are not animated, but have <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> different root-pose position <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target shape root <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pose.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addSequence(\"./testShape.dts ambient\", \"ambient\" );\n" "%this.addSequence( \"./myPlayer.dae run\", \"run\" );\n" "%this.addSequence( \"./player_look.dsq\", \"look\", 0, -1 ); // start <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">end\n</a>" "%this.addSequence( \"walk\", \"walk_shortA\", 0, 4 ); // start <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> frame 4\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "%this.addSequence( \"walk\", \"walk_shortB\", 4, -1 ); // frame 4 <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">end\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(addTrigger , bool , (const char *name, S32 keyframe, S32 state) , (name, keyframe, state) , false , "Add <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> trigger <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param keyframe keyframe of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">trigger\n</a>" "@param state of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">trigger\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.addTrigger(\"walk\", 3, 1 );\n" "%this.addTrigger( \"walk\", 5, -1 );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(dumpShape , void , (const char *filename) , ("") , (filename) , "Dump the shape hierarchy <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the console or <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> file. Useful <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> reviewing " "the result of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> series of construction <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">commands.\n</a>" "@param filename Destination filename. If not specified, dump <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">console.\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.dumpShape();//dump <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">console\n</a>" "%this.dumpShape(\"./dump.txt\" ); // dump <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getBounds , Box3F , () , () , Box3F::Invalid , "Get the bounding box <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@return Bounding box \"minX minY minZ maxX maxY maxZ\"" )

DefineTSShapeConstructorMethod(getDetailLevelCount , S32 , () , () , 0 , "Get the total number of detail levels in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@return the number of detail levels in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape\n</a>" )

DefineTSShapeConstructorMethod(getDetailLevelIndex , S32 , (S32 size) , (size) , - 1, "Get the index of the detail level with <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> given <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">size.\n</a>" "@param <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">lookup\n</a>" "@return index of the detail level with the desired size, or -1 <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> no such " "detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">exists\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a>(%this.getDetailLevelSize(32)==-1)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " <a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>(\"Error: This shape does not have <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail level at <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> 32\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getDetailLevelName , const char * , (S32 index) , (index) , "" )

DefineTSShapeConstructorMethod(getDetailLevelSize , S32 , (S32 index) , (index) , 0 )

DefineTSShapeConstructorMethod(getImposterDetailLevel , S32 , () , () , - 1, "Get the index of the imposter (auto-billboard) detail level (<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> any).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return imposter detail level index, or -1 <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the shape does not use " "<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">imposters.\n\n</a>" )

DefineTSShapeConstructorMethod(getImposterSettings , const char * , (S32 index) , (index) , "" )

DefineTSShapeConstructorMethod(getMeshCount , S32 , (const char *name) , (name) , 0 )

DefineTSShapeConstructorMethod(getMeshMaterial , const char * , (const char *name) , (name) , "" , "Get the name of the material attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> mesh. Note that only the first " "material used by the mesh is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">returned.\n</a>" "@param name full name (object name + detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return name of the material attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the mesh (suitable <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> use with the <a href="/coding/class/classmaterial/">Material</a> mapTo field)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Mesh material is \" @ %this.sgetMeshMaterial( \"SimpleShape128\" ) );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getMeshName , const char * , (const char *name, S32 index) , (name, index) , "" )

DefineTSShapeConstructorMethod(getMeshSize , S32 , (const char *name, S32 index) , (name, index) , - 1, "Get the detail level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the indexed mesh <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object.\n</a>" "@param name name of the object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@param index index of the mesh (valid range is 0 - getMeshCount()-1)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return the mesh detail level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">size.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// print sizes <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> all detail levels of this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object\n</a>" "% objName)

DefineTSShapeConstructorMethod(getMeshType , const char * , (const char *name) , (name) , "" , "Get the display type of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh.\n</a>" "@param name name of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return the string returned is one of:" "<dl><dt>normal</dt><dd><a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> normal 3D mesh</dd>" "<dt>billboard</dt><dd><a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> mesh that always faces the camera</dd>" "<dt>billboardzaxis</dt><dd><a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> mesh that always faces the camera in the Z-axis</dd></dl>\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Mesh type is \" @ %this.getMeshType( \"SimpleShape128\" ) );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getNodeChildCount , S32 , (const char *name) , (name) , 0 )

DefineTSShapeConstructorMethod(getNodeChildName , const char * , (const char *name, S32 index) , (name, index) , "" , "Get the name of the indexed child <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name of the parent node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query.\n</a>" "@param index index of the child node (valid range is 0 - getNodeChildName()-1).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return the name of the indexed child <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "function dumpNode( %shape, %name, %indent )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "{\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   <a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( %indent @ %name );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   %<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1ad43c3812e6d13e0518d9f8b8f463ffcf">count</a> = %shape.getNodeChildCount( %name );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> ( %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> = 0; %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> < %<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1ad43c3812e6d13e0518d9f8b8f463ffcf">count</a>; %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a>++ )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "      dumpNode( %shape, %shape.getNodeChildName( %name, %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> ), %indent @ \"   \" );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "}\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "function dumpShape( %shape )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "{\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   // recursively dump node <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hierarchy\n</a>" "   %<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1ad43c3812e6d13e0518d9f8b8f463ffcf">count</a> = %shape.getNodeCount();\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> ( %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> = 0; %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> < %<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1ad43c3812e6d13e0518d9f8b8f463ffcf">count</a>; %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a>++ )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   {\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "      // dump top level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">nodes\n</a>" "      %name = %shape.getNodeName( %<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1acb559820d9ca11295b4500f179ef6392">i</a> );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "      <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> ( %shape.getNodeParentName( %name ) $= "" )\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "         dumpNode( %shape, %name, \"\" );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "   }\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "}\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getNodeCount , S32 , () , () , 0 )

DefineTSShapeConstructorMethod(getNodeIndex , S32 , (const char *name) , (name) , - 1, "Get the index of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">lookup.\n</a>" "@return the index of the named node)

DefineTSShapeConstructorMethod(getNodeName , const char * , (S32 index) , (index) , "" , "Get the name of the indexed <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param index index of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> lookup (valid range is 0 - getNodeCount()-1).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return the name of the indexed node)

DefineTSShapeConstructorMethod(getNodeObjectCount , S32 , (const char *name) , (name) , 0 )

DefineTSShapeConstructorMethod(getNodeObjectName , const char * , (const char *name, S32 index) , (name, index) , "" )

DefineTSShapeConstructorMethod(getNodeParentName , const char * , (const char *name) , (name) , "" , "Get the name of the node's parent. If the node has no parent  , return an empty <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">string.\n</a>" " @param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query.\n</a>" " @return the name of the node 's parent, or \"\" <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the node is at the root <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Bip01 Pelvis parent = \" @ %this.getNodeParentName( \"Bip01 Pelvis \") );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getNodeTransform , TransformF , (const char *name, bool isWorld) , (false) , (name, isWorld) , TransformF::Identity , "Get the base (ie. not animated) transform of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query.\n</a>" "@param isWorld true <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> get the global transform)

DefineTSShapeConstructorMethod(getObjectCount , S32 , () , () , 0 )

DefineTSShapeConstructorMethod(getObjectIndex , S32 , (const char *name) , (name) , - 1)

DefineTSShapeConstructorMethod(getObjectName , const char * , (S32 index) , (index) , "" )

DefineTSShapeConstructorMethod(getObjectNode , const char * , (const char *name) , (name) , "" , "Get the name of the node this object is attached <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">to.\n</a>" "@param name name of the object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">get.\n</a>" "@return the name of the attached node, or an empty string <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> this " "object is not attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> node(usually the case <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> skinned meshes).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>(\"Hand is attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> \" @ %this.getObjectNode( \"Hand\" ) );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getSequenceBlend , const char * , (const char *name) , (name) , "" , "Get information about blended <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequences.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return TAB delimited string of the form: \"isBlend blendSeq blendFrame\" )

DefineTSShapeConstructorMethod(getSequenceCount , S32 , () , () , 0 , "Get the total number of sequences in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@return the number of sequences in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape\n\n</a>" )

DefineTSShapeConstructorMethod(getSequenceCyclic , bool , (const char *name) , (name) , false , "Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> this sequence is cyclic (looping).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> this sequence is cyclic, false <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a>(!%this.getSequenceCyclic(\"ambient\" ) )\n" " error( \"ambient sequence is not cyclic!\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getSequenceFrameCount , S32 , (const char *name) , (name) , 0 , "Get the number of keyframes in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return number of keyframes in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Run has \" @ %this.getSequenceFrameCount( \"run\" ) @ \" keyframes\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getSequenceGroundSpeed , const char * , (const char *name) , (name) , "" )

DefineTSShapeConstructorMethod(getSequenceIndex , S32 , (const char *name) , (name) , - 1, "Find the index of the sequence with the given <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">lookup\n</a>" "@return index of the sequence with matching name, or -1 <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> not <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">found\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> given sequence exists in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape\n</a>" "<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a>(%this.getSequenceIndex(\"walk\" ) == -1 )\n" " <a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>( \"Could not find 'walk' sequence\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getSequenceName , const char * , (S32 index) , (index) , "" )

DefineTSShapeConstructorMethod(getSequencePriority , F32 , (const char *name) , (name) , -1. 0f, "Get the priority setting of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return priority <a href="/coding/file/pointer_8h/#pointer_8h_1a32aff7c6c4cd253fdf6563677afab5ce">value</a> of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n\n</a>" )

DefineTSShapeConstructorMethod(getSequenceSource , const char * , (const char *name) , (name) , "" , "Get information about where the sequence data came <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">from.\n</a>" "For example, whether it was loaded from an external DSQ <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file.\n</a>" " @param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" " @return TAB delimited string of the form:\"from reserved start end total\" , where:" "< dl >" "< dt >from</dt >< dd >the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> of the animation data, such as the path <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "<a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> DSQ file, or the name of an existing sequence in the shape. This field " "will be empty <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> sequences already embedded in the DTS or DAE file.</dd >" "< dt >reserved</dt >< dd >reserved <a href="/coding/file/pointer_8h/#pointer_8h_1a32aff7c6c4cd253fdf6563677afab5ce">value</a></dd >" "< dt >start</dt >< dd >the first frame in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> create this sequence</dd >" "< dt >end</dt >< dd >the last frame in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> create this sequence</dd >" "< dt >total</dt >< dd >the total number of frames in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> sequence</dd >" "</dl >\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//print the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the walk <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">animation\n</a>" "<a href="/coding/file/ggendoflinefix_8txt/#ggendoflinefix_8txt_1a7f8fee038817022b75b8865e5da4eba3">echo</a>(\"walk source:\" SPC getField( %this.getSequenceSource( \"walk\" ), 0 ) );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(getTargetCount , S32 , () , () , 0 )

DefineTSShapeConstructorMethod(getTargetName , const char * , (S32 index) , (index) , "" )

DefineTSShapeConstructorMethod(getTrigger , const char * , (const char *name, S32 index) , (name, index) , "" )

DefineTSShapeConstructorMethod(getTriggerCount , S32 , (const char *name) , (name) , 0 , "Get the number of triggers in the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">query\n</a>" "@return number of triggers in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n\n</a>" )

DefineTSShapeConstructorMethod(notifyShapeChanged , void , () , () , "Notify game objects that this shape <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> has changed, allowing them <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> update " "internal data <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> needed." )

DefineTSShapeConstructorMethod(removeDetailLevel , bool , (S32 index) , (index) , false , "Remove the detail level (including all meshes in the detail level)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.removeDetailLevel(2);\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(removeImposter , bool , () , () , false , "() Remove the imposter detail level (<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> any) from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" )

DefineTSShapeConstructorMethod(removeMesh , bool , (const char *name) , (name) , false , "Remove <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> mesh from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "If all geometry is removed from an object, the object is also <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">removed.\n</a>" " @param name full name(object name+detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.removeMesh(\"SimpleShape128\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(removeNode , bool , (const char *name) , (name) , false , "Remove <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> node from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "The named node is removed from the shape, including from any sequences that " "use the node. Child nodes and objects attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the node are re-assigned " "<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the node 's <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">parent.\n</a>" " @param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise.\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.removeNode(\"Nose\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(removeObject , bool , (const char *name) , (name) , false , "Remove an object (including all meshes <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> that object) from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@param name name of the object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove.\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful)

DefineTSShapeConstructorMethod(removeSequence , bool , (const char *name) , (name) , false , "Remove the sequence from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">shape.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" )

DefineTSShapeConstructorMethod(removeTrigger , bool , (const char *name, S32 keyframe, S32 state) , (name, keyframe, state) , false , "Remove <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> trigger from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param keyframe keyframe of the trigger <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" "@param state of the trigger <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">remove\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.removeTrigger(\"walk\", 3, 1 );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(renameDetailLevel , bool , (const char *oldName, const char *newName) , (oldName, newName) , false , "Rename <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level.\n</a>" "@note Note that detail level names must be unique, so this command will " "fail <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> there is already <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail level with the desired <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name\n</a>" " @param oldName current name of the detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @param newName <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name of the detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.renameDetailLevel(\"detail-1\", \"collision-1\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(renameNode , bool , (const char *oldName, const char *newName) , (oldName, newName) , false , "Rename <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@note Note that node names must be unique, so this command will fail <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> " "there is already <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> node with the desired <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name\n</a>" " @param oldName current name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node\n</a>" " @param newName <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.renameNode(\"Bip01 L Hand\", \"mount5\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(renameObject , bool , (const char *oldName, const char *newName) , (oldName, newName) , false , "Rename an <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object.\n</a>" "@note Note that object names must be unique, so this command will fail <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> " "there is already an object with the desired <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name\n</a>" " @param oldName current name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object\n</a>" " @param newName <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.renameObject(\"MyBox\", \"Box\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(renameSequence , bool , (const char *oldName, const char *newName) , (oldName, newName) , false , "Rename <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "@note Note that sequence names must be unique, so this command will fail " "<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> there is already <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> sequence with the desired <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">name\n</a>" " @param oldName current name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n</a>" " @param newName <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.renameSequence(\"walking\", \"walk\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(saveShape , void , (const char *filename) , (filename) , "Save the shape (with all current changes) <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> DTS <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file.\n</a>" "@param filename Destination <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">filename.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.saveShape( \"./myShape.dts\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setBounds , bool , (Box3F bbox) , (bbox) , false , "Set the shape bounds <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the given bounding <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">box.\n</a>" "@param Bounding box \"minX minY minZ maxX maxY maxZ\"\n" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n</a>" )

DefineTSShapeConstructorMethod(setDetailLevelSize , S32 , (S32 index, S32 newSize) , (index, newSize) , index , "Change the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> detail level." "@note Note that detail levels are always sorted in decreasing <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> order, " "so this command may cause detail level indices <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">change.\n</a>" " @param index index of the detail level <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" " @param newSize <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n</a>" " @return <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> index <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> this detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">level\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setDetailLevelSize(2, 256);\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setMeshMaterial , bool , (const char *meshName, const char *matName) , (meshName, matName) , false , "Set the name of the material attached <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh.\n</a>" "@param meshName full name  , or the name of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> " "<a href="/coding/class/classmaterial/">Material</a> object already defined in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">script.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//set the mesh <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">material\n</a>" "%this.setMeshMaterial(\"SimpleShape128\", \"test_mat\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setMeshSize , bool , (const char *name, S32 size) , (name, size) , false , "Change the detail level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> of the named <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh.\n</a>" "@param name full name (object name + current <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> ) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> detail level <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">size\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise.\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setMeshSize(\"SimpleShape128\", 64 );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setMeshType , bool , (const char *name, const char *type) , (name, type) , false , "Set the display type <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">mesh.\n</a>" "@param name full name (object name + detail <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1ab7d671599a7b25ca99a487fa341bc33a">size</a>) of the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param type the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> type <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the mesh: \"normal\" , \"billboard\" or \"billboardzaxis\"\n" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//set the mesh <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> be <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">billboard\n</a>" "%this.setMeshType(\"SimpleShape64\", \"billboard\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setNodeParent , bool , (const char *name, const char *parentName) , (name, parentName) , false , "Set the parent of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">node.\n</a>" "@param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param parentName name of the parent node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set (use \"\" <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> move the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the root level)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">failed\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setNodeParent(\"Bip01 Pelvis\", \"start01\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setNodeTransform , bool , (const char *name, TransformF txfm, bool isWorld) , (false) , (name, txfm, isWorld) , false , "Set the base transform of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> node. That is, the transform of the node when " "in the root(not-animated) <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pose.\n</a>" " @param name name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" " @param txfm transform string of the form:\"pos.x pos.y pos.z rot.x rot.y rot.z rot.angle\"\n" "@param isworld (optional) flag <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set the local-<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a>-parent or the global " "transform. If false, or not specified, the position and orientation are " "treated as relative <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the node 's <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">parent.\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setNodeTransform(\"mount0\", \"0 0 1 0 0 1 0\" );\n" "%this.setNodeTransform( \"mount0\", \"0 0 0 0 0 1 1.57\" );\n" "%this.setNodeTransform( \"mount0\", \"1 0 0 0 0 1 0\", true );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setObjectNode , bool , (const char *objName, const char *nodeName) , (objName, nodeName) , false , "Set the node an object is attached <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">to.\n</a>" "When the shape is rendered, the object geometry is rendered at the node 's " "current <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">transform.\n</a>" " @param objName name of the object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" " @param nodeName name of the node <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> attach the object <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">to\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setObjectNode(\"Hand\", \"Bip01 LeftHand\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setSequenceBlend , bool , (const char *name, bool blend, const char *blendSeq, S32 blendFrame) , (name, blend, blendSeq, blendFrame) , false , "Mark <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> sequence as <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> blend or non-<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">blend.\n</a>" "A blend sequence is one that will be added on top of any other playing " "sequences. This is done by storing the animated node transforms relative " "<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> reference frame, rather than as absolute <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">transforms.\n</a>" " @param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" " @param blend true <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make the sequence <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> blend, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> non-<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">blend\n</a>" " @param blendSeq the name of the sequence that contains the blend reference <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame\n</a>" " @param blendFrame the reference frame in the blendSeq <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setSequenceBlend(\"look\", true, \"root\", 0 );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setSequenceCyclic , bool , (const char *name, bool cyclic) , (name, cyclic) , false , "Mark <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> sequence as cyclic or non-<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">cyclic.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param cyclic true <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make the sequence cyclic, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> non-<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">cyclic\n</a>" " @return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setSequenceCyclic(\"ambient\", true );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "%this.setSequenceCyclic( \"shoot\", false );\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setSequenceGroundSpeed , bool , (const char *name, Point3F transSpeed, Point3F rotSpeed) , (Point3F::Zero) , (name, transSpeed, rotSpeed) , false , "Set the translation and rotation ground speed of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sequence.\n</a>" "The ground speed of the sequence is set by generating ground transform " "keyframes. The ground translational and rotational speed is assumed <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "be constant <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the duration of the sequence. Existing ground frames <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> " "the sequence (<a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> any) will be <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">replaced.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param transSpeed translational speed (trans.x trans.y trans.z) in " "Torque units per <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame\n</a>" "@param rotSpeed (optional) rotational speed (rot.x rot.y rot.z) in " "radians per frame. Default is \"0 0 0\"\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "%this.setSequenceGroundSpeed(\"run\", \"5 0 0\" );\n" "%this.setSequenceGroundSpeed( \"spin\", \"0 0 0\", \"4 0 0\" );\n" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n</a>" )

DefineTSShapeConstructorMethod(setSequencePriority , bool , (const char *name, F32 priority) , (name, priority) , false , "Set the sequence <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">priority.\n</a>" "@param name name of the sequence <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modify\n</a>" "@param priority <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> priority <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">value\n</a>" "@return true <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> successful, false <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">otherwise\n\n</a>" )

DefineTSShapeConstructorMethod(writeChangeSet , void , () , () , "Write the current change set <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a> script file. The " "name of the script <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> is the same as the model, but with ." TORQUE_SCRIPT_EXTENSION " extension. " "eg. myShape." TORQUE_SCRIPT_EXTENSION " for myShape.dts or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">myShape.dae.\n</a>" )

IMPLEMENT_CALLBACK(TSShapeConstructor , onLoad , void , () , () , "Called immediately after the DTS or DAE <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> has been loaded; before the " "shape data is available <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> any other object (<a href="/coding/class/classstaticshape/">StaticShape</a>, <a href="/coding/class/classplayer/">Player</a> etc). This " "is where you should put any post-load commands <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> modify the shape in-memory " "such as addNode, renameSequence etc." )

IMPLEMENT_CONOBJECT(TSShapeConstructor )

ImplementEnumType(TSShapeConstructorAnimType , "\n\n" "@ingroup <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a>" )

ImplementEnumType(TSShapeConstructorLodType , "\n\n" "@ingroup <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a>" )

ImplementEnumType(TSShapeConstructorUpAxis , "Axis <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> use <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> upwards direction when importing from <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Collada.\n\n</a>" "@ingroup <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a>" )

namesEqual(const String & nameA, const String & nameB)

SplitSequencePathAndName(String & srcPath, String & srcName)

   1
   2//-----------------------------------------------------------------------------
   3// Copyright (c) 2012 GarageGames, LLC
   4//
   5// Permission is hereby granted, free of charge, to any person obtaining a copy
   6// of this software and associated documentation files (the "Software"), to
   7// deal in the Software without restriction, including without limitation the
   8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
   9// sell copies of the Software, and to permit persons to whom the Software is
  10// furnished to do so, subject to the following conditions:
  11//
  12// The above copyright notice and this permission notice shall be included in
  13// all copies or substantial portions of the Software.
  14//
  15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  21// IN THE SOFTWARE.
  22//-----------------------------------------------------------------------------
  23
  24#include "platform/platform.h"
  25#include "ts/tsShapeConstruct.h"
  26
  27#include "ts/tsShapeInstance.h"
  28#include "ts/tsMaterialList.h"
  29#include "console/consoleTypes.h"
  30#include "console/engineAPI.h"
  31#include "core/resourceManager.h"
  32#include "core/stream/bitStream.h"
  33#include "core/stream/fileStream.h"
  34#include "core/stream/memStream.h"
  35#include "core/fileObject.h"
  36
  37#define MAX_PATH_LENGTH 256
  38
  39
  40//#define DEBUG_SPEW
  41
  42ConsoleDocClass( TSShapeConstructor,
  43   "@brief An object used to modify a DTS or COLLADA shape model after it has "
  44   "been loaded by Torque\n\n"
  45   "@ingroup gameObjects\n"
  46);
  47
  48IMPLEMENT_CALLBACK( TSShapeConstructor, onLoad, void, (), (),
  49   "Called immediately after the DTS or DAE file has been loaded; before the "
  50   "shape data is available to any other object (StaticShape, Player etc). This "
  51   "is where you should put any post-load commands to modify the shape in-memory "
  52   "such as addNode, renameSequence etc." )
  53
  54IMPLEMENT_CALLBACK( TSShapeConstructor, onUnload, void, (), (),
  55   "Called when the DTS or DAE resource is flushed from memory. Not normally "
  56   "<a href="/coding/file/tsshapeconstruct_8cpp/#tsshapeconstruct_8cpp_1a21625ca11566389388a748ad1acc0990">required</a>, but may be useful <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> perform cleanup." )
  57
  58ImplementEnumType( TSShapeConstructorUpAxis,
  59   "Axis <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> use <a href="/coding/file/types_8visualc_8h/#types_8visualc_8h_1aad3a54ef5fb260160ec7493483246022">for</a> upwards direction when importing from Collada.\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>"
  60   "@ingroup <a href="/coding/class/classtsshapeconstructor/">TSShapeConstructor</a>" )
  61   { UPAXISTYPE_X_UP,   "X_AXIS" },
  62   { UPAXISTYPE_Y_UP,   "Y_AXIS" },
  63   { UPAXISTYPE_Z_UP,   "Z_AXIS" },
  64   { UPAXISTYPE_COUNT,  "DEFAULT" }
  65EndImplementEnumType;
  66
  67ImplementEnumType( TSShapeConstructorLodType,
  68   "\n\n"
  69   "@ingroup TSShapeConstructor" )
  70   { ColladaUtils::ImportOptions::DetectDTS,       "DetectDTS" },
  71   { ColladaUtils::ImportOptions::SingleSize,      "SingleSize" },
  72   { ColladaUtils::ImportOptions::TrailingNumber,  "TrailingNumber" },
  73EndImplementEnumType;
  74
  75ImplementEnumType(TSShapeConstructorAnimType,
  76   "\n\n"
  77   "@ingroup TSShapeConstructor" )
  78   { ColladaUtils::ImportOptions::FrameCount,      "Frames" },
  79   { ColladaUtils::ImportOptions::Seconds,         "Seconds" },
  80   { ColladaUtils::ImportOptions::Milliseconds,    "Milliseconds" },
  81EndImplementEnumType;
  82
  83
  84//-----------------------------------------------------------------------------
  85
  86String TSShapeConstructor::smCapsuleShapePath("tools/shapes/unit_capsule.dts");
  87String TSShapeConstructor::smCubeShapePath("tools/shapes/unit_cube.dts");
  88String TSShapeConstructor::smSphereShapePath("tools/shapes/unit_sphere.dts");
  89
  90ResourceRegisterPostLoadSignal< TSShape> TSShapeConstructor::_smAutoLoad( &TSShapeConstructor::_onTSShapeLoaded );
  91ResourceRegisterUnloadSignal< TSShape> TSShapeConstructor::_smAutoUnload( &TSShapeConstructor::_onTSShapeUnloaded );
  92
  93void TSShapeConstructor::_onTSShapeLoaded( Resource< TSShape>& resource )
  94{
  95   TSShapeConstructor* ctor = findShapeConstructor( resource.getPath().getFullPath() );
  96   if( ctor )
  97      ctor->_onLoad( resource );
  98
  99   if (ctor && ctor->mShape && ctor->mShape->needsReinit())
 100   {
 101      ctor->mShape->init();
 102   }
 103}
 104
 105void TSShapeConstructor::_onTSShapeUnloaded( const Torque::Path& path, TSShape* shape )
 106{
 107   TSShapeConstructor* ctor = findShapeConstructor( path.getFullPath() );
 108   if( ctor && ( ctor->getShape() == shape ) )
 109      ctor->_onUnload();
 110}
 111
 112// TSShape names are case insensitive
 113static inline bool namesEqual( const String& nameA, const String& nameB )
 114{
 115   return nameA.equal( nameB, String::NoCase );
 116}
 117
 118static void SplitSequencePathAndName( String& srcPath, String& srcName )
 119{
 120   srcName = "";
 121
 122   // Determine if there is a sequence name at the end of the source string, and
 123   // if so, split the filename from the sequence name
 124   S32 split = srcPath.find(' ', 0, String::Right);
 125   S32 split2 = srcPath.find('\t', 0, String::Right);
 126   if ((split == String::NPos) || (split2 > split))
 127      split = split2;
 128   if (split != String::NPos)
 129   {
 130      split2 = split + 1;
 131      while ((srcPath[split2] != '\0') && dIsspace(srcPath[split2]))
 132         split2++;
 133
 134      // now 'split' is at the end of the path, and 'split2' is at the start of the sequence name
 135      srcName = srcPath.substr(split2);
 136      srcPath = srcPath.erase(split, srcPath.length()-split);
 137   }
 138}
 139
 140//-----------------------------------------------------------------------------
 141
 142IMPLEMENT_CONOBJECT(TSShapeConstructor);
 143
 144TSShapeConstructor::TSShapeConstructor()
 145 : mShapePath(""), mLoadingShape(false)
 146{
 147   mOptions.upAxis = UPAXISTYPE_COUNT;
 148   mOptions.unit = -1.0f;
 149   mOptions.lodType = ColladaUtils::ImportOptions::TrailingNumber;
 150   mOptions.singleDetailSize = 2;
 151   mOptions.matNamePrefix = "";
 152   mOptions.alwaysImport = "";
 153   mOptions.neverImport = String(Con::getVariable("$TSShapeConstructor::neverImport"));
 154   mOptions.alwaysImportMesh = "";
 155   mOptions.neverImportMesh = String(Con::getVariable("$TSShapeConstructor::neverImportMesh"));
 156   mOptions.neverImportMat = String(Con::getVariable("$TSShapeConstructor::neverImportMat"));
 157   mOptions.ignoreNodeScale = false;
 158   mOptions.adjustCenter = false;
 159   mOptions.adjustFloor = false;
 160   mOptions.forceUpdateMaterials = false;
 161   mOptions.useDiffuseNames = false;
 162
 163   mOptions.convertLeftHanded = false;
 164   mOptions.calcTangentSpace = false;
 165   mOptions.genUVCoords = false;
 166   mOptions.transformUVCoords = false;
 167   mOptions.flipUVCoords = true;
 168   mOptions.findInstances = false;
 169   mOptions.limitBoneWeights = false;
 170   mOptions.joinIdenticalVerts = true;
 171   mOptions.reverseWindingOrder = true;
 172   mOptions.invertNormals = false;
 173   mOptions.removeRedundantMats = true;
 174   mOptions.animTiming = ColladaUtils::ImportOptions::Seconds;
 175   mOptions.animFPS = 30;
 176   mOptions.formatScaleFactor = 1.0f;
 177
 178   mShape = NULL;
 179}
 180
 181TSShapeConstructor::~TSShapeConstructor()
 182{
 183}
 184
 185bool TSShapeConstructor::addSequenceFromField( void *obj, const char *index, const char *data )
 186{
 187   TSShapeConstructor *pObj = static_cast<TSShapeConstructor*>( obj );
 188
 189   if ( data && data[0] )
 190      pObj->mSequences.push_back( FileName(data) );
 191
 192   return false;
 193}
 194
 195void TSShapeConstructor::initPersistFields()
 196{
 197   addGroup( "Media" );
 198   addField( "baseShape", TypeStringFilename, Offset(mShapePath, TSShapeConstructor),
 199      "Specifies the path to the DTS or DAE file to be operated on by this object.\n"
 200      "Since the TSShapeConstructor script must be in the same folder as the DTS or "
 201      "DAE file, it is recommended to use a relative path so that the shape and "
 202      "script files can be copied to another location without having to modify the "
 203      "path." );
 204   endGroup( "Media" );
 205
 206   addGroup( "Collada" );
 207   addField( "upAxis", TYPEID< domUpAxisType >(), Offset(mOptions.upAxis, TSShapeConstructor),
 208      "Override the <up_axis> element in the COLLADA (.dae) file. No effect for DTS files.\n"
 209      "Set to one of the following values:\n"
 210      "<dl><dt>X_AXIS</dt><dd>Positive X points up. Model will be rotated into Torque's coordinate system (Z up).</dd>"
 211      "<dt>Y_AXIS</dt><dd>Positive Y points up. Model will be rotated into Torque's coordinate system (Z up).</dd>"
 212      "<dt>Z_AXIS</dt><dd>Positive Z points up. No rotation will be applied to the model.</dd>"
 213      "<dt>DEFAULT</dt><dd>The default value. Use the value in the .dae file (defaults to Z_AXIS if the <up_axis> element is not present).</dd></dl>" );
 214
 215   addField( "unit", TypeF32, Offset(mOptions.unit, TSShapeConstructor),
 216      "Override the <unit> element in the COLLADA (.dae) file. No effect for DTS files.\n"
 217      "COLLADA (.dae) files usually contain a <unit> element that indicates the "
 218      "'real world' units that the model is described in. It means you can work "
 219      "in sensible and meaningful units in your modeling app.<br>\n"
 220      "For example, if you were modeling a small object like a cup, it might make "
 221      "sense to work in inches (1 MAX unit = 1 inch), but if you were modeling a "
 222      "building, it might make more sense to work in feet (1 MAX unit = 1 foot). "
 223      "If you export both models to COLLADA, T3D will automatically scale them "
 224      "appropriately. 1 T3D unit = 1 meter, so the cup would be scaled down by 0.0254, "
 225      "and the building scaled down by 0.3048, given them both the correct scale "
 226      "relative to each other.<br>\n"
 227      "Omit the field or set to -1 to use the value in the .dae file (1.0 if the "
 228      "<unit> element is not present)" );
 229
 230   addField( "lodType", TYPEID< ColladaUtils::ImportOptions::eLodType >(), Offset(mOptions.lodType, TSShapeConstructor),
 231      "Control how the COLLADA (.dae) importer interprets LOD in the model. No effect for DTS files.\n"
 232      "Set to one of the following values:\n"
 233      "<dl><dt>DetectDTS</dt><dd>The default value. Instructs the importer to search for a 'baseXXX->startXXX' node hierarchy at the root level. If found, the importer acts as if ''TrailingNumber'' was set. Otherwise, all geometry is imported at a single detail size.</dd>"
 234      "<dt>SingleSize</dt><dd>All geometry is imported at a fixed detail size. Numbers at the end of geometry node's are ignored.</dd>"
 235      "<dt>TrailingNumber</dt><dd>Numbers at the end of geometry node's name are interpreted as the detail size (similar to DTS exporting). Geometry instances with the same base name but different trailing number are grouped into the same object.</dd>"
 236      "<dt>DEFAULT</dt><dd>The default value. Use the value in the .dae file (defaults to Z_AXIS if the <up_axis> element is not present).</dd></dl>" );
 237
 238   addField( "singleDetailSize", TypeS32, Offset(mOptions.singleDetailSize, TSShapeConstructor),
 239      "Sets the detail size when lodType is set to SingleSize. No effect otherwise, and no effect for DTS files.\n"
 240      "@see lodType" );
 241
 242   addField( "matNamePrefix", TypeRealString, Offset(mOptions.matNamePrefix, TSShapeConstructor),
 243      "Prefix to apply to all material map names in the COLLADA (.dae) file. No effect for DTS files.\n"
 244      "This field is useful to avoid material name clashes for exporters that generate generic material "
 245      "names like \"texture0\" or \"material1\"." );
 246
 247   addField( "alwaysImport", TypeRealString, Offset(mOptions.alwaysImport, TSShapeConstructor),
 248      "TAB separated patterns of nodes to import even if in neverImport list. No effect for DTS files.\n"
 249      "Torque allows unwanted nodes in COLLADA (.dae) files to to be ignored "
 250      "during import. This field contains a TAB separated list of patterns to "
 251      "match node names. Any node that matches one of the patterns in the list "
 252      "will <b>always</b> be imported, even if it also matches the neverImport list\n"
 253      "@see neverImport\n\n"
 254      "@tsexample\n"
 255      "singleton TSShapeConstructor(MyShapeDae)\n"
 256      "{\n"
 257      "   baseShape = \"./myShape.dae\";\n"
 258      "   alwaysImport = \"mount*\" TAB \"eye\";\n"
 259      "   neverImport = \"*-PIVOT\";\n"
 260      "}\n"
 261      "@endtsexample" );
 262
 263   addField( "neverImport", TypeRealString, Offset(mOptions.neverImport, TSShapeConstructor),
 264      "TAB separated patterns of nodes to ignore on loading. No effect for DTS files.\n"
 265      "Torque allows unwanted nodes in COLLADA (.dae) files to to be ignored "
 266      "during import. This field contains a TAB separated list of patterns to "
 267      "match node names. Any node that matches one of the patterns in the list will "
 268      "not be imported (unless it matches the alwaysImport list.\n"
 269      "@see alwaysImport" );
 270
 271   addField( "alwaysImportMesh", TypeRealString, Offset(mOptions.alwaysImportMesh, TSShapeConstructor),
 272      "TAB separated patterns of meshes to import even if in neverImportMesh list. No effect for DTS files.\n"
 273      "Torque allows unwanted meshes in COLLADA (.dae) files to to be ignored "
 274      "during import. This field contains a TAB separated list of patterns to "
 275      "match mesh names. Any mesh that matches one of the patterns in the list "
 276      "will <b>always</b> be imported, even if it also matches the neverImportMesh list\n"
 277      "@see neverImportMesh\n\n"
 278      "@tsexample\n"
 279      "singleton TSShapeConstructor(MyShapeDae)\n"
 280      "{\n"
 281      "   baseShape = \"./myShape.dae\";\n"
 282      "   alwaysImportMesh = \"body*\" TAB \"armor\" TAB \"bounds\";\n"
 283      "   neverImportMesh = \"*-dummy\";\n"
 284      "}\n"
 285      "@endtsexample" );
 286
 287   addField( "neverImportMesh", TypeRealString, Offset(mOptions.neverImportMesh, TSShapeConstructor),
 288      "TAB separated patterns of meshes to ignore on loading. No effect for DTS files.\n"
 289      "Torque allows unwanted meshes in COLLADA (.dae) files to to be ignored "
 290      "during import. This field contains a TAB separated list of patterns to "
 291      "match mesh names. Any mesh that matches one of the patterns in the list will "
 292      "not be imported (unless it matches the alwaysImportMesh list.\n"
 293      "@see alwaysImportMesh" );
 294
 295   addField("neverImportMat", TypeRealString, Offset(mOptions.neverImportMat, TSShapeConstructor),
 296      "TAB separated patterns of materials to ignore on loading. No effect for DTS files.\n"
 297      "Torque allows unwanted materials in COLLADA (.dae) files to to be ignored "
 298      "during import. This field contains a TAB separated list of patterns to "
 299      "match material names. Any material that matches one of the patterns in the list will "
 300      "not be imported");
 301
 302   addField( "ignoreNodeScale", TypeBool, Offset(mOptions.ignoreNodeScale, TSShapeConstructor),
 303      "Ignore <scale> elements inside COLLADA <node>s. No effect for DTS files.\n"
 304      "This field is a workaround for certain exporters that generate bad node "
 305      "scaling, and is not usually required." );
 306
 307   addField( "adjustCenter", TypeBool, Offset(mOptions.adjustCenter, TSShapeConstructor),
 308      "Translate COLLADA model on import so the origin is at the center. No effect for DTS files." );
 309
 310   addField( "adjustFloor", TypeBool, Offset(mOptions.adjustFloor, TSShapeConstructor),
 311      "Translate COLLADA model on import so origin is at the (Z axis) bottom of the model. No effect for DTS files.\n"
 312      "This can be used along with adjustCenter to have the origin at the "
 313      "center of the bottom of the model.\n"
 314      "@see adjustCenter" );
 315
 316   addField( "forceUpdateMaterials", TypeBool, Offset(mOptions.forceUpdateMaterials, TSShapeConstructor),
 317      "Forces update of the materials." TORQUE_SCRIPT_EXTENSION " file in the same folder as the COLLADA "
 318      "(.dae) file, even if Materials already exist. No effect for DTS files.\n"
 319      "Normally only Materials that are not already defined are written to materials." TORQUE_SCRIPT_EXTENSION "." );
 320
 321   // Fields added for assimp options
 322   addField( "convertLeftHanded", TypeBool, Offset(mOptions.convertLeftHanded, TSShapeConstructor),
 323      "Convert to left handed coordinate system." );
 324   addField( "calcTangentSpace", TypeBool, Offset(mOptions.calcTangentSpace, TSShapeConstructor),
 325      "Calculate tangents and bitangents, if possible." );
 326   addField( "genUVCoords", TypeBool, Offset(mOptions.genUVCoords, TSShapeConstructor),
 327      "Convert spherical, cylindrical, box and planar mapping to proper UVs." );
 328   addField( "transformUVCoords", TypeBool, Offset(mOptions.transformUVCoords, TSShapeConstructor),
 329      "Preprocess UV transformations (scaling, translation ...)." );
 330   addField( "flipUVCoords", TypeBool, Offset(mOptions.flipUVCoords, TSShapeConstructor),
 331      "This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.\n"
 332      "Assimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models." );
 333   addField( "findInstances", TypeBool, Offset(mOptions.findInstances, TSShapeConstructor),
 334      "Search for instanced meshes and remove them by references to one master." );
 335   addField( "limitBoneWeights", TypeBool, Offset(mOptions.limitBoneWeights, TSShapeConstructor),
 336      "Limit bone weights to 4 per vertex." );
 337   addField( "joinIdenticalVerts", TypeBool, Offset(mOptions.joinIdenticalVerts, TSShapeConstructor),
 338      "Identifies and joins identical vertex data sets within all imported meshes." );
 339   addField( "reverseWindingOrder", TypeBool, Offset(mOptions.reverseWindingOrder, TSShapeConstructor),
 340      "This step adjusts the output face winding order to be clockwise. The default assimp face winding order is counter clockwise." );
 341   addField( "invertNormals", TypeBool, Offset(mOptions.invertNormals, TSShapeConstructor),
 342      "Reverse the normal vector direction for all normals." );
 343   addField( "removeRedundantMats", TypeBool, Offset(mOptions.removeRedundantMats, TSShapeConstructor),
 344      "Removes redundant materials." );
 345   addField( "animTiming", TYPEID< ColladaUtils::ImportOptions::eAnimTimingType >(), Offset(mOptions.animTiming, TSShapeConstructor),
 346      "How to import timing data as frames, seconds or milliseconds." );
 347   addField("animFPS", TypeS32, Offset(mOptions.animFPS, TSShapeConstructor),
 348      "FPS value to use if timing is set in frames and the animations does not have an fps set.");
 349   endGroup( "Collada" );
 350
 351   addGroup( "Sequences" );
 352   addProtectedField( "sequence", TypeStringFilename, NULL, &addSequenceFromField, &emptyStringProtectedGetFn,
 353      "Legacy method of adding sequences to a DTS or DAE shape after loading.\n\n"
 354      "@tsexample\n"
 355      "singleton TSShapeConstructor(MyShapeDae)\n"
 356      "{\n"
 357      "   baseShape = \"./myShape.dae\";\n"
 358      "   sequence = \"../anims/root.dae root\";\n"
 359      "   sequence = \"../anims/walk.dae walk\";\n"
 360      "   sequence = \"../anims/jump.dsq jump\";\n"
 361      "}\n"
 362      "@endtsexample" );
 363   endGroup( "Sequences" );
 364
 365   Parent::initPersistFields();
 366}
 367
 368void TSShapeConstructor::consoleInit()
 369{
 370   Parent::consoleInit();
 371
 372   Con::addVariable( "$pref::TSShapeConstructor::CapsuleShapePath", TypeRealString, &TSShapeConstructor::smCapsuleShapePath, 
 373      "The file path to the capsule shape used by tsMeshFit.\n\n"
 374      "@ingroup MeshFit\n" );
 375
 376   Con::addVariable( "$pref::TSShapeConstructor::CubeShapePath", TypeRealString, &TSShapeConstructor::smCubeShapePath, 
 377      "The file path to the cube shape used by tsMeshFit.\n\n"
 378      "@ingroup MeshFit\n" );
 379
 380   Con::addVariable( "$pref::TSShapeConstructor::SphereShapePath", TypeRealString, &TSShapeConstructor::smSphereShapePath, 
 381      "The file path to the sphere shape used by tsMeshFit.\n\n"
 382      "@ingroup MeshFit\n" );
 383}
 384
 385TSShapeConstructor* TSShapeConstructor::findShapeConstructor(const FileName& path)
 386{
 387   SimGroup *group;
 388   if (Sim::findObject( "TSShapeConstructorGroup", group ))
 389   {
 390      // Find the TSShapeConstructor object for the given shape file
 391      for (S32 i = 0; i < group->size(); i++)
 392      {
 393         TSShapeConstructor* tss = dynamic_cast<TSShapeConstructor*>( group->at(i) );
 394         FileName shapePath = tss->mShapePath;
 395
 396         char buf[1024];
 397         FileName fullShapePath = String(Platform::makeFullPathName(shapePath, buf, sizeof(buf)));
 398         if (shapePath.equal( path, String::NoCase ) || fullShapePath.equal(path, String::NoCase))
 399            return tss;
 400      }
 401   }
 402   return NULL;
 403}
 404
 405//-----------------------------------------------------------------------------
 406bool TSShapeConstructor::onAdd()
 407{
 408   if ( !Parent::onAdd() )
 409      return false;
 410
 411   // Prevent multiple objects pointing at the same shape file
 412   TSShapeConstructor* tss = findShapeConstructor( mShapePath );
 413   if ( tss )
 414   {
 415      Con::errorf("TSShapeConstructor::onAdd failed: %s is already referenced by "
 416         "another TSShapeConstructor object (%s - %d)", mShapePath.c_str(),
 417         tss->getName(), tss->getId());
 418      return false;
 419   }
 420
 421   // Add to the TSShapeConstructor group (for lookups)
 422   SimGroup *group;
 423   if ( !Sim::findObject( "TSShapeConstructorGroup", group ) )
 424   {
 425      group = new SimGroup();
 426      if ( !group->registerObject("TSShapeConstructorGroup") )
 427      {
 428         SAFE_DELETE(group);
 429
 430         Con::errorf("TSShapeConstructor::onAdd failed: Could not register "
 431            "TSShapeConstructorGroup");
 432         return false;
 433      }
 434      Sim::getRootGroup()->addObject( group );
 435   }
 436   group->addObject( this );
 437
 438   // This is only here for backwards compatibility!
 439   //
 440   // If we have no sequences, it may be using the older sequence# syntax.
 441   // Check for dynamic fields of that pattern and add them into the sequence vector.
 442   if ( mSequences.empty() )
 443   {
 444      for ( U32 idx = 0; idx < MaxLegacySequences; idx++ )
 445      {
 446         String field = String::ToString( "sequence%d", idx );
 447         const char *data = getDataField( StringTable->insert(field.c_str()), NULL );
 448
 449         // Break at first field not used
 450         if ( !data || !data[0] )
 451            break;
 452
 453         // By pushing the field thru Con::setData for TypeStringFilename
 454         // we get the default filename expansion.  If we didn't do this
 455         // then we would have unexpanded ~/ in the file paths.
 456         String expanded;
 457         Con::setData( TypeStringFilename, &expanded, 0, 1, &data );
 458         addSequenceFromField( this, NULL, expanded.c_str() );
 459      }
 460   }
 461
 462   // If an instance of this shape has already been loaded, call onLoad now
 463   Resource<TSShape> shape = ResourceManager::get().find( mShapePath );
 464
 465   if ( shape )
 466      _onLoad( shape );
 467
 468   if (mShape && mShape->needsReinit())
 469   {
 470      mShape->init();
 471   }
 472
 473   return true;
 474}
 475
 476//-----------------------------------------------------------------------------
 477
 478void TSShapeConstructor::_onLoad(TSShape* shape)
 479{
 480   // Check if we should unload first
 481   if ( mShape )
 482      _onUnload();
 483
 484   #ifdef DEBUG_SPEW
 485   Con::printf( "[TSShapeConstructor] attaching to shape '%s'", mShapePath.c_str() );
 486   #endif
 487
 488   mShape = shape;
 489   mChangeSet.clear();
 490   mLoadingShape = true;
 491
 492   // Add sequences defined using field syntax
 493   for ( S32 i = 0; i < mSequences.size(); i++ )
 494   {
 495      if ( mSequences[i].isEmpty() )
 496         continue;
 497
 498      // Split the sequence path from the target sequence name
 499      String destName;
 500      String srcPath( mSequences[i] );
 501      SplitSequencePathAndName( srcPath, destName );
 502
 503      addSequence( srcPath, destName );
 504   }
 505
 506   // Call script function
 507   onLoad_callback();
 508   mLoadingShape = false;
 509}
 510
 511//-----------------------------------------------------------------------------
 512
 513void TSShapeConstructor::_onUnload()
 514{
 515   #ifdef DEBUG_SPEW
 516   Con::printf( "[TSShapeConstructor] detaching from '%s'", mShapePath.c_str() );
 517   #endif
 518
 519   onUnload_callback();
 520
 521   mShape = NULL;
 522}
 523
 524//-----------------------------------------------------------------------------
 525// Storage
 526
 527bool TSShapeConstructor::writeField(StringTableEntry fieldname, const char *value)
 528{
 529   // Ignore the sequence fields (these are written as 'addSequence' commands instead)
 530   if ( dStrnicmp( fieldname, "sequence", 8 ) == 0 )
 531      return false;
 532   else if ( dStrnicmp( fieldname, "baseShape", 9 ) == 0 )
 533   {
 534      // Small hack to only write the base filename (no path) since the
 535      // TSShapeConstructor script must be in the same folder as the model, and
 536      // then we can easily copy both around without having to change the field
 537      const char* filename = dStrrchr( value, '/' );
 538      if ( filename > value )
 539      {
 540         S32 len = dStrlen( filename );
 541         dMemmove((void*)(value + 1), filename, len );
 542         ((char*)value)[0] = '.';
 543         ((char*)value)[len + 1] = '\0';
 544      }
 545      return true;
 546   }
 547
 548   return Parent::writeField( fieldname, value );
 549}
 550
 551//-----------------------------------------------------------------------------
 552// Console utility methods
 553
 554// These macros take care of doing node, sequence and object lookups, including
 555// printing error messages to the console if the element cannot be found.
 556
 557// Check that the given index is valid (0 - max-1). If not, generate an
 558// error and return.
 559#define CHECK_INDEX_IN_RANGE(func, index, maxIndex, ret)             \
 560   if ( ( index < 0 ) || ( index >= maxIndex ) )                     \
 561   {                                                                 \
 562      Con::errorf( "TSShapeConstructor::" #func ": index out of "    \
 563         "range (0-%d)", maxIndex-1);                                \
 564      return ret;                                                    \
 565   }
 566
 567// Do a node lookup and allow the root node name ("")
 568#define GET_NODE_INDEX_ALLOW_ROOT(func, var, name, ret)              \
 569   S32 var##Index = -1;                                              \
 570   if (name[0])                                                      \
 571   {                                                                 \
 572      var##Index = mShape->findNode(name);                           \
 573      if (var##Index < 0)                                            \
 574      {                                                              \
 575         Con::errorf( "TSShapeConstructor::" #func ": Could not "    \
 576            "find node '%s'", name);                                 \
 577         return ret;                                                 \
 578      }                                                              \
 579   }                                                                 \
 580   TSShape::Node* var = var##Index < 0 ? NULL : &(mShape->nodes[var##Index]); \
 581   TORQUE_UNUSED(var##Index);                                        \
 582   TORQUE_UNUSED(var)
 583
 584// Do a node lookup, root node ("") is not allowed
 585#define GET_NODE_INDEX_NO_ROOT(func, var, name, ret)                 \
 586   S32 var##Index = mShape->findNode(name);                          \
 587   if (var##Index < 0)                                               \
 588   {                                                                 \
 589      Con::errorf( "TSShapeConstructor::" #func ": Could not find "  \
 590         "node '%s'", name);                                         \
 591      return ret;                                                    \
 592   }                                                                 \
 593   TSShape::Node* var = &(mShape->nodes[var##Index]);                \
 594   TORQUE_UNUSED(var##Index);                                        \
 595   TORQUE_UNUSED(var)
 596
 597// Do an object lookup
 598#define GET_OBJECT(func, var, name, ret)                             \
 599   S32 var##Index = mShape->findObject(name);                        \
 600   if (var##Index < 0)                                               \
 601   {                                                                 \
 602      Con::errorf( "TSShapeConstructor::" #func ": Could not find "  \
 603         "object '%s'", name);                                       \
 604      return ret;                                                    \
 605   }                                                                 \
 606   TSShape::Object* var = &(mShape->objects[var##Index]);            \
 607   TORQUE_UNUSED(var##Index);                                        \
 608   TORQUE_UNUSED(var)
 609
 610// Do a mesh lookup
 611#define GET_MESH(func, var, name, ret)                               \
 612   TSMesh* var = mShape->findMesh(name);                             \
 613   if (!var)                                                         \
 614   {                                                                 \
 615      Con::errorf( "TSShapeConstructor::" #func ": Could not find "  \
 616         "mesh '%s'", name);                                         \
 617      return ret;                                                    \
 618   }
 619
 620// Do a sequence lookup
 621#define GET_SEQUENCE(func, var, name, ret)                           \
 622   S32 var##Index = mShape->findSequence(name);                      \
 623   if (var##Index < 0)                                               \
 624   {                                                                 \
 625      Con::errorf( "TSShapeConstructor::" #func ": Could not find "  \
 626         "sequence named '%s'", name);                               \
 627      return ret;                                                    \
 628   }                                                                 \
 629   TSShape::Sequence* var = &(mShape->sequences[var##Index]);        \
 630   TORQUE_UNUSED(var##Index);                                        \
 631   TORQUE_UNUSED(var);
 632
 633
 634//-----------------------------------------------------------------------------
 635// DUMP
 636DefineTSShapeConstructorMethod( dumpShape, void, ( const char* filename ), ( "" ),
 637   ( filename ),,
 638   "Dump the shape hierarchy to the console or to a file. Useful for reviewing "
 639   "the result of a series of construction commands.\n"
 640   "@param filename Destination filename. If not specified, dump to console.\n\n"
 641   "@tsexample\n"
 642   "%this.dumpShape();               // dump to console\n"
 643   "%this.dumpShape( \"./dump.txt\" ); // dump to file\n"
 644   "@endtsexample\n" )
 645{
 646   TSShapeInstance* tsi = new TSShapeInstance( mShape, false );
 647
 648   if ( dStrEqual( filename, "" ) )
 649   {
 650      // Dump the constructed shape to a memory stream
 651      MemStream* dumpStream = new MemStream( 8192 );
 652      tsi->dump( *dumpStream );
 653
 654      // Write stream to the console
 655      U32 end = dumpStream->getPosition();
 656      dumpStream->setPosition( 0 );
 657      while ( dumpStream->getPosition() < end )
 658      {
 659         char line[1024];
 660         dumpStream->readLine( (U8*)line, sizeof(line) );
 661         Con::printf( line );
 662      }
 663
 664      delete dumpStream;
 665   }
 666   else
 667   {
 668      // Dump constructed shape to file
 669      char filenameBuf[1024];
 670      Con::expandScriptFilename( filenameBuf, sizeof(filenameBuf), filename );
 671
 672      FileStream* dumpStream = new FileStream;
 673      if ( dumpStream->open( filenameBuf, Torque::FS::File::Write ) )
 674      {
 675         tsi->dump( *dumpStream );
 676         dumpStream->close();
 677      }
 678      else
 679         Con::errorf( "dumpShape failed: Could not open file '%s' for writing", filenameBuf );
 680
 681      delete dumpStream;
 682   }
 683
 684   delete tsi;
 685}}
 686
 687DefineTSShapeConstructorMethod( saveShape, void, ( const char* filename ),,
 688   ( filename ),,
 689   "Save the shape (with all current changes) to a new DTS file.\n"
 690   "@param filename Destination filename.\n\n"
 691   "@tsexample\n"
 692   "%this.saveShape( \"./myShape.dts\" );\n"
 693   "@endtsexample\n" )
 694{
 695   char filenameBuf[1024];
 696   Con::expandScriptFilename( filenameBuf, sizeof(filenameBuf), filename );
 697
 698   FileStream* dtsStream = new FileStream;
 699   if ( dtsStream->open( filenameBuf, Torque::FS::File::Write ) )
 700   {
 701      mShape->write( dtsStream );
 702      dtsStream->close();
 703   }
 704   else
 705   {
 706      Con::errorf( "saveShape failed: Could not open '%s' for writing", filenameBuf );
 707   }
 708   delete dtsStream;
 709}}
 710
 711DefineTSShapeConstructorMethod( writeChangeSet, void, (),,
 712   (),,
 713   "Write the current change set to a TSShapeConstructor script file. The "
 714   "name of the script file is the same as the model, but with ." TORQUE_SCRIPT_EXTENSION " extension. "
 715   "eg. myShape." TORQUE_SCRIPT_EXTENSION " for myShape.dts or myShape.dae.\n" )
 716{
 717   Torque::Path scriptPath( mShapePath );
 718   scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
 719
 720   // Read current file contents
 721   FileObject f;
 722   f.readMemory( scriptPath.getFullPath() );
 723
 724   // Write new file
 725   FileStream *stream;
 726   if ((stream = FileStream::createAndOpen( scriptPath.getFullPath(), Torque::FS::File::Write )) == NULL)
 727   {
 728      Con::errorf( "Failed to write TSShapeConstructor change set to %s", scriptPath.getFullPath().c_str() );
 729      return;
 730   }
 731
 732   // Write existing file contents up to the start of the onLoad function
 733   String beginMessage( avar( "function %s::onLoad(%%this)", getName() ) );
 734   String endMessage( "}" );
 735
 736   while ( !f.isEOF() )
 737   {
 738      const char* buffer = (const char *) f.readLine();
 739      if ( !String::compare( buffer, beginMessage ))
 740         break;
 741      stream->writeText( buffer );
 742      stream->writeText( "\r\n" );
 743   }
 744
 745   // Write the new contents
 746   if ( f.isEOF() )
 747      stream->writeText( "\r\n" );
 748   stream->writeText( beginMessage );
 749   stream->writeText( "\r\n{\r\n" );
 750
 751   mChangeSet.write( mShape, *stream, scriptPath.getPath() );
 752
 753   stream->writeText( endMessage );
 754   stream->writeText( "\r\n" );
 755
 756   // Now skip the contents of the function
 757   while ( !f.isEOF() )
 758   {
 759      const char* buffer = (const char *) f.readLine();
 760      if ( !String::compare( buffer, endMessage ))
 761         break;
 762   }
 763
 764   // Write the remainder of the existing file contents
 765   while( !f.isEOF() )
 766   {
 767      const char* buffer = (const char *) f.readLine();
 768      stream->writeText( buffer );
 769      stream->writeText( "\r\n" );
 770   }
 771
 772   delete stream;
 773}}
 774
 775DefineTSShapeConstructorMethod( notifyShapeChanged, void, (),,
 776   (),,
 777   "Notify game objects that this shape file has changed, allowing them to update "
 778   "internal data if needed." )
 779{
 780   ResourceManager::get().getChangedSignal().trigger( mShapePath );
 781}}
 782
 783//-----------------------------------------------------------------------------
 784// NODES
 785DefineTSShapeConstructorMethod( getNodeCount, S32, (),,
 786   (), 0,
 787   "Get the total number of nodes in the shape.\n"
 788   "@return the number of nodes in the shape.\n\n"
 789   "@tsexample\n"
 790   "%count = %this.getNodeCount();\n"
 791   "@endtsexample\n" )
 792{
 793   return mShape->nodes.size();
 794}}
 795
 796DefineTSShapeConstructorMethod( getNodeIndex, S32, ( const char* name ),,
 797   ( name ), -1,
 798   "Get the index of the node.\n"
 799   "@param name name of the node to lookup.\n"
 800   "@return the index of the named node, or -1 if no such node exists.\n\n"
 801   "@tsexample\n"
 802   "// get the index of Bip01 Pelvis node in the shape\n"
 803   "%index = %this.getNodeIndex( \"Bip01 Pelvis\" );\n"
 804   "@endtsexample\n" )
 805{
 806   return mShape->findNode( name );
 807}}
 808
 809DefineTSShapeConstructorMethod( getNodeName, const char*, ( S32 index ),,
 810   ( index ), "",
 811   "Get the name of the indexed node.\n"
 812   "@param index index of the node to lookup (valid range is 0 - getNodeCount()-1).\n"
 813   "@return the name of the indexed node, or \"\" if no such node exists.\n\n"
 814   "@tsexample\n"
 815   "// print the names of all the nodes in the shape\n"
 816   "%count = %this.getNodeCount();\n"
 817   "for (%i = 0; %i < %count; %i++)\n"
 818   "   echo(%i SPC %this.getNodeName(%i));\n"
 819   "@endtsexample\n" )
 820{
 821   CHECK_INDEX_IN_RANGE( getNodeName, index, mShape->nodes.size(), "" );
 822   return mShape->getName( mShape->nodes[index].nameIndex );
 823}}
 824
 825DefineTSShapeConstructorMethod( getNodeParentName, const char*, ( const char* name ),,
 826   ( name ), "",
 827   "Get the name of the node's parent. If the node has no parent (ie. it is at "
 828   "the root level), return an empty string.\n"
 829   "@param name name of the node to query.\n"
 830   "@return the name of the node's parent, or \"\" if the node is at the root level\n\n"
 831   "@tsexample\n"
 832   "echo( \"Bip01 Pelvis parent = \" @ %this.getNodeParentName( \"Bip01 Pelvis \") );\n"
 833   "@endtsexample\n" )
 834{
 835   GET_NODE_INDEX_NO_ROOT( getNodeParentName, node, name, "" );
 836
 837   if ( node->parentIndex < 0 )
 838      return "";
 839   else
 840      return mShape->getName( mShape->nodes[node->parentIndex].nameIndex );
 841}}
 842
 843DefineTSShapeConstructorMethod( setNodeParent, bool, ( const char* name, const char* parentName ),,
 844   ( name, parentName ), false,
 845  "Set the parent of a node.\n"
 846  "@param name name of the node to modify\n"
 847  "@param parentName name of the parent node to set (use \"\" to move the node to the root level)\n"
 848  "@return true if successful, false if failed\n\n"
 849  "@tsexample\n"
 850  "%this.setNodeParent( \"Bip01 Pelvis\", \"start01\" );\n"
 851  "@endtsexample\n" )
 852{
 853   GET_NODE_INDEX_NO_ROOT( setNodeParent, node, name, false );
 854   GET_NODE_INDEX_ALLOW_ROOT( setNodeParent, parent, parentName, false );
 855
 856   node->parentIndex = parentIndex;
 857   ADD_TO_CHANGE_SET();
 858
 859   return true;
 860}}
 861
 862DefineTSShapeConstructorMethod( getNodeChildCount, S32, ( const char* name ),,
 863   ( name ), 0,
 864   "Get the number of children of this node.\n"
 865   "@param name name of the node to query.\n"
 866   "@return the number of child nodes.\n\n"
 867   "@tsexample\n"
 868   "%count = %this.getNodeChildCount( \"Bip01 Pelvis\" );\n"
 869   "@endtsexample\n" )
 870{
 871   GET_NODE_INDEX_ALLOW_ROOT( getNodeChildCount, node, name, 0 );
 872
 873   Vector<S32> nodeChildren;
 874   mShape->getNodeChildren( nodeIndex, nodeChildren );
 875   return nodeChildren.size();
 876}}
 877
 878DefineTSShapeConstructorMethod( getNodeChildName, const char*, ( const char* name, S32 index ),,
 879   ( name, index ), "",
 880   "Get the name of the indexed child node.\n"
 881   "@param name name of the parent node to query.\n"
 882   "@param index index of the child node (valid range is 0 - getNodeChildName()-1).\n"
 883   "@return the name of the indexed child node.\n\n"
 884   "@tsexample\n"
 885   "function dumpNode( %shape, %name, %indent )\n"
 886   "{\n"
 887   "   echo( %indent @ %name );\n"
 888   "   %count = %shape.getNodeChildCount( %name );\n"
 889   "   for ( %i = 0; %i < %count; %i++ )\n"
 890   "      dumpNode( %shape, %shape.getNodeChildName( %name, %i ), %indent @ \"   \" );\n"
 891   "}\n\n"
 892   "function dumpShape( %shape )\n"
 893   "{\n"
 894   "   // recursively dump node hierarchy\n"
 895   "   %count = %shape.getNodeCount();\n"
 896   "   for ( %i = 0; %i < %count; %i++ )\n"
 897   "   {\n"
 898   "      // dump top level nodes\n"
 899   "      %name = %shape.getNodeName( %i );\n"
 900   "      if ( %shape.getNodeParentName( %name ) $= "" )\n"
 901   "         dumpNode( %shape, %name, \"\" );\n"
 902   "   }\n"
 903   "}\n"
 904   "@endtsexample\n" )
 905{
 906   GET_NODE_INDEX_ALLOW_ROOT( getNodeChildName, node, name, "" );
 907
 908   Vector<S32> nodeChildren;
 909   mShape->getNodeChildren( nodeIndex, nodeChildren );
 910   CHECK_INDEX_IN_RANGE( getNodeChildName, index, nodeChildren.size(), "" );
 911
 912   return mShape->getName( mShape->nodes[nodeChildren[index]].nameIndex );
 913}}
 914
 915DefineTSShapeConstructorMethod( getNodeObjectCount, S32, ( const char* name ),,
 916   ( name ), 0,
 917   "Get the number of geometry objects attached to this node.\n"
 918   "@param name name of the node to query.\n"
 919   "@return the number of attached objects.\n\n"
 920   "@tsexample\n"
 921   "%count = %this.getNodeObjectCount( \"Bip01 Head\" );\n"
 922   "@endtsexample\n" )
 923{
 924   GET_NODE_INDEX_ALLOW_ROOT( getNodeObjectCount, node, name, 0 );
 925
 926   Vector<S32> nodeObjects;
 927   mShape->getNodeObjects( nodeIndex, nodeObjects );
 928   return nodeObjects.size();
 929}}
 930
 931DefineTSShapeConstructorMethod( getNodeObjectName, const char*, ( const char* name, S32 index ),,
 932   ( name, index ), "",
 933   "Get the name of the indexed object.\n"
 934   "@param name name of the node to query.\n"
 935   "@param index index of the object (valid range is 0 - getNodeObjectCount()-1).\n"
 936   "@return the name of the indexed object.\n\n"
 937   "@tsexample\n"
 938   "// print the names of all objects attached to the node\n"
 939   "%count = %this.getNodeObjectCount( \"Bip01 Head\" );\n"
 940   "for ( %i = 0; %i < %count; %i++ )\n"
 941   "   echo( %this.getNodeObjectName( \"Bip01 Head\", %i ) );\n"
 942   "@endtsexample\n" )
 943{
 944   GET_NODE_INDEX_ALLOW_ROOT( getNodeObjectName, node, name, "" );
 945
 946   Vector<S32> nodeObjects;
 947   mShape->getNodeObjects( nodeIndex, nodeObjects );
 948   CHECK_INDEX_IN_RANGE( getNodeObjectName, index, nodeObjects.size(), "" );
 949
 950   return mShape->getName( mShape->objects[nodeObjects[index]].nameIndex );
 951}}
 952
 953DefineTSShapeConstructorMethod( getNodeTransform, TransformF, ( const char* name, bool isWorld ), ( false ),
 954   ( name, isWorld ), TransformF::Identity,
 955   "Get the base (ie. not animated) transform of a node.\n"
 956   "@param name name of the node to query.\n"
 957   "@param isWorld true to get the global transform, false (or omitted) to get "
 958   "the local-to-parent transform.\n"
 959   "@return the node transform in the form \"pos.x pos.y pos.z rot.x rot.y rot.z rot.angle\".\n\n"
 960   "@tsexample\n"
 961   "%ret = %this.getNodeTransform( \"mount0\" );\n"
 962   "%this.setNodeTransform( \"mount4\", %ret );\n"
 963   "@endtsexample\n" )
 964{
 965   GET_NODE_INDEX_NO_ROOT( getNodeTransform, node, name, TransformF::Identity );
 966
 967   // Get the node transform
 968   Point3F pos;
 969   AngAxisF aa;
 970
 971   if ( isWorld )
 972   {
 973      // World transform
 974      MatrixF mat;
 975      mShape->getNodeWorldTransform( nodeIndex, &mat );
 976      pos = mat.getPosition();
 977      aa.set( mat );
 978   }
 979   else
 980   {
 981      // Local transform
 982      pos = mShape->defaultTranslations[nodeIndex];
 983      const Quat16& q16 = mShape->defaultRotations[nodeIndex];
 984      aa.set( q16.getQuatF() );
 985   }
 986
 987   return TransformF( pos, aa );
 988}}
 989
 990DefineTSShapeConstructorMethod( setNodeTransform, bool, ( const char* name, TransformF txfm, bool isWorld ), ( false ),
 991   ( name, txfm, isWorld ), false,
 992   "Set the base transform of a node. That is, the transform of the node when "
 993   "in the root (not-animated) pose.\n"
 994   "@param name name of the node to modify\n"
 995   "@param txfm transform string of the form: \"pos.x pos.y pos.z rot.x rot.y rot.z rot.angle\"\n"
 996   "@param isworld (optional) flag to set the local-to-parent or the global "
 997   "transform. If false, or not specified, the position and orientation are "
 998   "treated as relative to the node's parent.\n"
 999   "@return true if successful, false otherwise\n\n"
1000   "@tsexample\n"
1001   "%this.setNodeTransform( \"mount0\", \"0 0 1 0 0 1 0\" );\n"
1002   "%this.setNodeTransform( \"mount0\", \"0 0 0 0 0 1 1.57\" );\n"
1003   "%this.setNodeTransform( \"mount0\", \"1 0 0 0 0 1 0\", true );\n"
1004   "@endtsexample\n" )
1005{
1006   GET_NODE_INDEX_NO_ROOT( setNodeTransform, node, name, false );
1007
1008   Point3F pos( txfm.getPosition() );
1009   QuatF rot( txfm.getOrientation() );
1010
1011   if ( isWorld )
1012   {
1013      // World transform
1014
1015      // Get the node's parent (if any)
1016      if ( node->parentIndex != -1 )
1017      {
1018         MatrixF mat;
1019         mShape->getNodeWorldTransform( node->parentIndex, &mat );
1020
1021         // Pre-multiply by inverse of parent's world transform to get
1022         // local node transform
1023         mat.inverse();
1024         mat.mul( txfm.getMatrix() );
1025
1026         rot.set( mat );
1027         pos = mat.getPosition();
1028      }
1029   }
1030
1031   if ( !mShape->setNodeTransform( name, pos, rot) )
1032      return false;
1033
1034   ADD_TO_CHANGE_SET();
1035   return true;
1036}}
1037
1038DefineTSShapeConstructorMethod( renameNode, bool, ( const char* oldName, const char* newName ),,
1039   ( oldName, newName ), false,
1040   "Rename a node.\n"
1041   "@note Note that node names must be unique, so this command will fail if "
1042   "there is already a node with the desired name\n"
1043   "@param oldName current name of the node\n"
1044   "@param newName new name of the node\n"
1045   "@return true if successful, false otherwise\n\n"
1046   "@tsexample\n"
1047   "%this.renameNode( \"Bip01 L Hand\", \"mount5\" );\n"
1048   "@endtsexample\n" )
1049{
1050   GET_NODE_INDEX_NO_ROOT( renameNode, node, oldName, false );
1051
1052   if ( !mShape->renameNode( oldName, newName ) )
1053      return false;
1054
1055   ADD_TO_CHANGE_SET();
1056   return true;
1057}}
1058
1059DefineTSShapeConstructorMethod( addNode, bool, ( const char* name, const char* parentName, TransformF txfm, bool isWorld ), ( TransformF::Identity, false ),
1060   ( name, parentName, txfm, isWorld ), false,
1061   "Add a new node.\n"
1062   "@param name name for the new node (must not already exist)\n"
1063   "@param parentName name of an existing node to be the parent of the new node. "
1064   "If empty (\"\"), the new node will be at the root level of the node hierarchy.\n"
1065   "@param txfm (optional) transform string of the form: \"pos.x pos.y pos.z rot.x rot.y rot.z rot.angle\"\n"
1066   "@param isworld (optional) flag to set the local-to-parent or the global "
1067   "transform. If false, or not specified, the position and orientation are "
1068   "treated as relative to the node's parent.\n"
1069   "@return true if successful, false otherwise\n\n"
1070   "@tsexample\n"
1071   "%this.addNode( \"