mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24:33 +00:00
moar fixes
Fixed: convex and shape nodes are now the same transform as the target nodes Changed: addNode now has the target at the end of its call for backwards compat Fixed: renameNode was overwriting addNode calls, should not have been so
This commit is contained in:
parent
280102d565
commit
4b2165668f
3 changed files with 86 additions and 89 deletions
|
|
@ -1111,8 +1111,8 @@ DefineTSShapeConstructorMethod(renameNode, bool, (const char* oldName, const cha
|
|||
return true;
|
||||
}}
|
||||
|
||||
DefineTSShapeConstructorMethod(addNode, bool, (const char* name, const char* parentName, const char* target, TransformF txfm, bool isWorld), (TransformF::Identity, false),
|
||||
(name, parentName, target, txfm, isWorld), false,
|
||||
DefineTSShapeConstructorMethod(addNode, bool, (const char* name, const char* parentName, TransformF txfm, bool isWorld, const char* target), (TransformF::Identity, false, ""),
|
||||
(name, parentName, txfm, isWorld, target), false,
|
||||
"Add a new node.\n"
|
||||
"@param name name for the new node (must not already exist)\n"
|
||||
"@param parentName name of an existing node to be the parent of the new node. "
|
||||
|
|
@ -1125,7 +1125,7 @@ DefineTSShapeConstructorMethod(addNode, bool, (const char* name, const char* par
|
|||
"@tsexample\n"
|
||||
"%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 );\n"
|
||||
"%this.addNode( \"Nodes\", \"Bip01 Head\", \"0 2 0 0 0 1 0\", true,\"Bounds\");\n"
|
||||
"@endtsexample\n")
|
||||
{
|
||||
Point3F pos(txfm.getPosition());
|
||||
|
|
@ -2539,14 +2539,6 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameNode(const TSShapeConstructor::
|
|||
Command& cmd = mCommands[index];
|
||||
switch (cmd.type)
|
||||
{
|
||||
case CmdAddNode:
|
||||
if (namesEqual(cmd.argv[0], newCmd.argv[0]))
|
||||
{
|
||||
cmd.argv[0] = newCmd.argv[1]; // Replace initial name argument
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case CmdRenameNode:
|
||||
if (namesEqual(cmd.argv[1], newCmd.argv[0]))
|
||||
{
|
||||
|
|
@ -3516,7 +3508,7 @@ void TSShapeConstructor::cleanTargetNodes(const char* detail, const char* target
|
|||
if (dStrStartsWith(cmd.argv[0], "Col"))
|
||||
{
|
||||
// node has the same detail and same target
|
||||
if (!dStricmp(detail, cmd.argv[1]) && !dStricmp(target, cmd.argv[2]))
|
||||
if (!dStricmp(detail, cmd.argv[1]) && !dStricmp(target, cmd.argv[4]))
|
||||
{
|
||||
// now remove it from shape
|
||||
mShape->removeMesh(cmd.argv[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue