diff --git a/.github/workflows/build-linux-gcc.yml b/.github/workflows/build-linux-gcc.yml index 7734a60d7..8382d27a2 100644 --- a/.github/workflows/build-linux-gcc.yml +++ b/.github/workflows/build-linux-gcc.yml @@ -95,3 +95,4 @@ jobs: path: "**/My Projects/Torque3D/game/test_detail.xml" reporter: java-junit fail-on-error: false + if: github.event_name != 'pull_request' diff --git a/.github/workflows/build-macos-clang.yml b/.github/workflows/build-macos-clang.yml index a27f04287..a6e5b0dfb 100644 --- a/.github/workflows/build-macos-clang.yml +++ b/.github/workflows/build-macos-clang.yml @@ -76,3 +76,4 @@ jobs: path: "**/My Projects/Torque3D/game/test_detail.xml" reporter: java-junit fail-on-error: false + if: github.event_name != 'pull_request' diff --git a/.github/workflows/build-windows-msvc.yml b/.github/workflows/build-windows-msvc.yml index 0fbcd0ecd..2b9ac82ef 100644 --- a/.github/workflows/build-windows-msvc.yml +++ b/.github/workflows/build-windows-msvc.yml @@ -72,3 +72,4 @@ jobs: path: "**/My Projects/Torque3D/game/test_detail.xml" reporter: java-junit fail-on-error: false + if: github.event_name != 'pull_request' diff --git a/Engine/source/ts/tsMeshFit.cpp b/Engine/source/ts/tsMeshFit.cpp index 6c6b4ced2..944a72cc2 100644 --- a/Engine/source/ts/tsMeshFit.cpp +++ b/Engine/source/ts/tsMeshFit.cpp @@ -165,15 +165,15 @@ public: // Box void addBox( const Point3F& sides, const MatrixF& mat ); - void fitOBB(); + void fitOBB(const char* target); // Sphere void addSphere( F32 radius, const Point3F& center ); - void fitSphere(); + void fitSphere(const char* target); // Capsule void addCapsule( F32 radius, F32 height, const MatrixF& mat ); - void fitCapsule(); + void fitCapsule(const char* target); // k-DOP void fit10_DOP_X(); @@ -183,7 +183,7 @@ public: void fit26_DOP(); // Convex Hulls - void fitConvexHulls( U32 depth, F32 mergeThreshold, F32 concavityThreshold, U32 maxHullVerts, + void fitConvexHulls( const char* target, U32 depth, U32 fillType, F32 minPercentage, U32 maxHulls, U32 maxHullVerts, F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError ); }; @@ -404,6 +404,7 @@ void MeshFit::addBox( const Point3F& sides, const MatrixF& mat ) { Point3F v = mesh->mVerts[i]; v.convolve(sides); + mat.mulP(v); mesh->mVerts[i] = v; } @@ -416,23 +417,27 @@ void MeshFit::addBox( const Point3F& sides, const MatrixF& mat ) TSMesh::__TSMeshVertexBase &vdata = mesh->mVertexData.getBase(i); Point3F v = vdata.vert(); v.convolve(sides); + mat.mulP(v); vdata.vert(v); } } mesh->computeBounds(); - - mMeshes.increment(); mMeshes.last().type = MeshFit::Box; - mMeshes.last().transform = mat; mMeshes.last().tsmesh = mesh; } -void MeshFit::fitOBB() +void MeshFit::fitOBB(const char* target) { + mMeshes.increment(); + MatrixF worldtrans; + worldtrans.identity(); + mShape->getNodeWorldTransform(mShape->findNode(target), &worldtrans); + mMeshes.last().transform = worldtrans; + PrimFit primFitter; primFitter.fitBox( mVerts.size(), (F32*)mVerts.address() ); - addBox( primFitter.mBoxSides, primFitter.mBoxTransform ); + addBox( primFitter.mBoxSides, worldtrans.inverse() * primFitter.mBoxTransform ); } //--------------------------- @@ -443,11 +448,15 @@ void MeshFit::addSphere( F32 radius, const Point3F& center ) if ( !mesh ) return; + MatrixF sphereMat(true); + sphereMat.setPosition(center); + if (mesh->mVerts.size() > 0) { for (S32 i = 0; i < mesh->mVerts.size(); i++) { Point3F v = mesh->mVerts[i]; + sphereMat.mulP(v); mesh->mVerts[i] = v * radius; } @@ -459,26 +468,30 @@ void MeshFit::addSphere( F32 radius, const Point3F& center ) { TSMesh::__TSMeshVertexBase& vdata = mesh->mVertexData.getBase(i); Point3F v = vdata.vert(); + sphereMat.mulP(v); vdata.vert(v * radius); } } mesh->computeBounds(); - - mMeshes.increment(); - MeshFit::Mesh& lastMesh = mMeshes.last(); - lastMesh.type = MeshFit::Sphere; - lastMesh.transform.identity(); - lastMesh.transform.setPosition(center); - lastMesh.tsmesh = mesh; + mMeshes.last().type = MeshFit::Sphere; + mMeshes.last().tsmesh = mesh; } -void MeshFit::fitSphere() +void MeshFit::fitSphere(const char* target) { + mMeshes.increment(); + MatrixF worldtrans; + worldtrans.identity(); + mShape->getNodeWorldTransform(mShape->findNode(target), &worldtrans); + mMeshes.last().transform = worldtrans; + PrimFit primFitter; primFitter.fitSphere( mVerts.size(), (F32*)mVerts.address() ); - addSphere( primFitter.mSphereRadius, primFitter.mSphereCenter ); + worldtrans.inverse(); + worldtrans.mulP(primFitter.mSphereCenter); + addSphere( primFitter.mSphereRadius, primFitter.mSphereCenter); } //--------------------------- @@ -489,6 +502,7 @@ void MeshFit::addCapsule( F32 radius, F32 height, const MatrixF& mat ) if ( !mesh ) return; + MatrixF capTrans = mMeshes.last().transform * mat; // Translate and scale the mesh verts height = mMax( 0, height ); F32 offset = ( height / ( 2 * radius ) ) - 0.5f; @@ -498,6 +512,7 @@ void MeshFit::addCapsule( F32 radius, F32 height, const MatrixF& mat ) { Point3F v = mesh->mVerts[i]; v.y += ((v.y > 0) ? offset : -offset); + capTrans.mulP(v); mesh->mVerts[i] = v * radius; } @@ -510,22 +525,29 @@ void MeshFit::addCapsule( F32 radius, F32 height, const MatrixF& mat ) TSMesh::__TSMeshVertexBase& vdata = mesh->mVertexData.getBase(i); Point3F v = vdata.vert(); v.y += ((v.y > 0) ? offset : -offset); + capTrans.mulP(v); vdata.vert(v * radius); } } mesh->computeBounds(); - mMeshes.increment(); + mMeshes.last().type = MeshFit::Capsule; - mMeshes.last().transform = mat; mMeshes.last().tsmesh = mesh; } -void MeshFit::fitCapsule() +void MeshFit::fitCapsule(const char* target) { + mMeshes.increment(); + MatrixF worldtrans; + worldtrans.identity(); + mShape->getNodeWorldTransform(mShape->findNode(target), &worldtrans); + mMeshes.last().transform = worldtrans; + PrimFit primFitter; primFitter.fitCapsule( mVerts.size(), (F32*)mVerts.address() ); + addCapsule( primFitter.mCapRadius, primFitter.mCapHeight, primFitter.mCapTransform ); } @@ -691,17 +713,17 @@ void MeshFit::fitK_DOP( const Vector& planes ) //--------------------------- // Best-fit set of convex hulls -void MeshFit::fitConvexHulls( U32 depth, F32 mergeThreshold, F32 concavityThreshold, U32 maxHullVerts, +void MeshFit::fitConvexHulls(const char* target, U32 depth, U32 fillType, F32 minPercentage, U32 maxHulls, U32 maxHullVerts, F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError ) { VHACD::IVHACD::Parameters p; - p.m_fillMode = VHACD::FillMode::FLOOD_FILL; + p.m_fillMode = (VHACD::FillMode)fillType; p.m_maxNumVerticesPerCH = maxHullVerts; p.m_shrinkWrap = true; - p.m_maxRecursionDepth = 64; - p.m_minimumVolumePercentErrorAllowed = 10; + p.m_maxRecursionDepth = depth; + p.m_minimumVolumePercentErrorAllowed = minPercentage; p.m_resolution = 10000; - p.m_maxConvexHulls = depth; + p.m_maxConvexHulls = maxHulls; VHACD::IVHACD* iface = VHACD::CreateVHACD_ASYNC(); @@ -718,29 +740,37 @@ void MeshFit::fitConvexHulls( U32 depth, F32 mergeThreshold, F32 concavityThresh { VHACD::IVHACD::ConvexHull ch; iface->GetConvexHull(i, ch); - + mMeshes.increment(); + MeshFit::Mesh& lastMesh = mMeshes.last(); eMeshType meshType = MeshFit::Hull; + MatrixF worldtrans; + worldtrans.identity(); + mShape->getNodeWorldTransform(mShape->findNode(target), &worldtrans); + lastMesh.transform = worldtrans; + + worldtrans.inverse(); + // Compute error between actual mesh and fitted primitives + F32* points = new F32[ch.m_points.size() * 3]; + for (U32 pt = 0; pt < ch.m_points.size(); pt++) + { + Point3F point(ch.m_points[pt].mX, ch.m_points[pt].mY, ch.m_points[pt].mZ); + worldtrans.mulP(point); + points[pt * 3 + 0] = point.x; + points[pt * 3 + 1] = point.y; + points[pt * 3 + 2] = point.z; + } + + U32* indices = new U32[ch.m_triangles.size() * 3]; + for (U32 ind = 0; ind < ch.m_triangles.size(); ind++) + { + indices[ind * 3 + 0] = ch.m_triangles[ind].mI0; + indices[ind * 3 + 1] = ch.m_triangles[ind].mI1; + indices[ind * 3 + 2] = ch.m_triangles[ind].mI2; + } // Check if we can use a box, sphere or capsule primitive for this hull if (( boxMaxError > 0 ) || ( sphereMaxError > 0 ) || ( capsuleMaxError > 0 )) { - // Compute error between actual mesh and fitted primitives - F32* points = new F32[ch.m_points.size() * 3]; - for (U32 pt = 0; pt < ch.m_points.size(); pt++) - { - points[pt * 3 + 0] = ch.m_points[pt].mX; - points[pt * 3 + 1] = ch.m_points[pt].mY; - points[pt * 3 + 2] = ch.m_points[pt].mZ; - } - - U32* indices = new U32[ch.m_triangles.size() * 3]; - for (U32 ind = 0; ind < ch.m_triangles.size(); ind++) - { - indices[ind * 3 + 0] = ch.m_triangles[ind].mI0; - indices[ind * 3 + 1] = ch.m_triangles[ind].mI1; - indices[ind * 3 + 2] = ch.m_triangles[ind].mI2; - } - F32 meshVolume = FLOAT_MATH::fm_computeMeshVolume(points, ch.m_triangles.size(), indices); PrimFit primFitter; @@ -787,42 +817,19 @@ void MeshFit::fitConvexHulls( U32 depth, F32 mergeThreshold, F32 concavityThresh else if ( meshType == MeshFit::Capsule ) addCapsule( primFitter.mCapRadius, primFitter.mCapHeight, primFitter.mCapTransform ); // else fall through to Hull processing - - // cleanup - delete[] points; - delete[] indices; } if ( meshType == MeshFit::Hull ) { // Create TSMesh from convex hull - mMeshes.increment(); - MeshFit::Mesh& lastMesh = mMeshes.last(); lastMesh.type = MeshFit::Hull; - lastMesh.transform.identity(); - - U32* indices = new U32[ch.m_triangles.size() * 3]; - for (U32 ind = 0; ind < ch.m_triangles.size(); ind++) - { - indices[ind * 3 + 0] = ch.m_triangles[ind].mI0; - indices[ind * 3 + 1] = ch.m_triangles[ind].mI1; - indices[ind * 3 + 2] = ch.m_triangles[ind].mI2; - } - - F32* points = new F32[ch.m_points.size() * 3]; - for (U32 pt = 0; pt < ch.m_points.size(); pt++) - { - points[pt * 3 + 0] = ch.m_points[pt].mX; - points[pt * 3 + 1] = ch.m_points[pt].mY; - points[pt * 3 + 2] = ch.m_points[pt].mZ; - } - lastMesh.tsmesh = createTriMesh(points, ch.m_points.size(), indices, ch.m_triangles.size()); lastMesh.tsmesh->computeBounds(); - delete[] points; - delete[] indices; } + + delete[] points; + delete[] indices; } iface->Release(); @@ -929,8 +936,8 @@ DefineTSShapeConstructorMethod( addPrimitive, bool, ( const char* meshName, cons return true; }} -DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char* type, const char* target, S32 depth, F32 merge, F32 concavity, S32 maxVerts, F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError ), ( 4, 30, 30, 32, 0, 0, 0 ), - ( size, type, target, depth, merge, concavity, maxVerts, boxMaxError, sphereMaxError, capsuleMaxError ), false, +DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char* type, const char* target, S32 depth, F32 minPercentage, S32 maxHulls, S32 maxVerts, F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError, const char* fillMode), ( "bounds", 4, 10, 30, 32, 0, 0, 0, "flood fill"), + ( size, type, target, depth, minPercentage, maxHulls, maxVerts, boxMaxError, sphereMaxError, capsuleMaxError, fillMode), false, "Autofit a mesh primitive or set of convex hulls to the shape geometry. Hulls " "may optionally be converted to boxes, spheres and/or capsules based on their " "volume.\n" @@ -938,23 +945,20 @@ DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char "@param type one of: box, sphere, capsule, 10-dop x, 10-dop y, 10-dop z, 18-dop, " "26-dop, convex hulls. See the Shape Editor documentation for more details " "about these types.\n" - "@param target geometry to fit collision mesh(es) to; either \"bounds\" (for the " - "whole shape), or the name of an object in the shape\n" + "@param target geometry to fit collision mesh(es) to; either \"bounds\" (for the whole shape), or the name of an object in the shape\n" "@param depth maximum split recursion depth (hulls only)\n" - "@param merge volume % threshold used to merge hulls together (hulls only)\n" - "@param concavity volume % threshold used to detect concavity (hulls only)\n" + "@param minPercentage volume % error threshold (hulls only)\n" + "@param maxHulls allowed to be generated (hulls only)\n" "@param maxVerts maximum number of vertices per hull (hulls only)\n" - "@param boxMaxError max % volume difference for a hull to be converted to a " - "box (hulls only)\n" - "@param sphereMaxError max % volume difference for a hull to be converted to " - "a sphere (hulls only)\n" - "@param capsuleMaxError max % volume difference for a hull to be converted to " - "a capsule (hulls only)\n" + "@param boxMaxError max % volume difference for a hull to be converted to a box (hulls only)\n" + "@param sphereMaxError max % volume difference for a hull to be converted to a sphere (hulls only)\n" + "@param capsuleMaxError max % volume difference for a hull to be converted to a capsule (hulls only)\n" + "@param fillMode method for filling the voxels in the volume (hulls only)\n" "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.addCollisionDetail( -1, \"box\", \"bounds\" );\n" - "%this.addCollisionDetail( -1, \"convex hulls\", \"bounds\", 4, 30, 30, 32, 0, 0, 0 );\n" - "%this.addCollisionDetail( -1, \"convex hulls\", \"bounds\", 4, 30, 30, 32, 50, 50, 50 );\n" + "%this.addCollisionDetail( -1, \"convex hulls\", \"bounds\", 4, 10, 30, 32, 0, 0, 0 );\n" + "%this.addCollisionDetail( -1, \"convex hulls\", \"bounds\",\"flood fill\", 4, 10, 30, 32, 50, 50, 50 );\n" "@endtsexample\n" ) { MeshFit fit( mShape ); @@ -967,11 +971,11 @@ DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char } if ( !dStricmp( type, "box" ) ) - fit.fitOBB(); + fit.fitOBB(target); else if ( !dStricmp( type, "sphere" ) ) - fit.fitSphere(); + fit.fitSphere(target); else if ( !dStricmp( type, "capsule" ) ) - fit.fitCapsule(); + fit.fitCapsule(target); else if ( !dStricmp( type, "10-dop x" ) ) fit.fit10_DOP_X(); else if ( !dStricmp( type, "10-dop y" ) ) @@ -984,7 +988,13 @@ DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char fit.fit26_DOP(); else if ( !dStricmp( type, "convex hulls" ) ) { - fit.fitConvexHulls( depth, merge, concavity, maxVerts, + + U32 fillType = 0; + if (!dStricmp(fillMode, "surface only")) + fillType = 1; + if (!dStricmp(fillMode, "raycast fill")) + fillType = 2; + fit.fitConvexHulls( target, depth, fillType, minPercentage, maxHulls, maxVerts, boxMaxError, sphereMaxError, capsuleMaxError ); } else @@ -1015,6 +1025,9 @@ DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char mShape->getNodeWorldTransform( nodeIndex, &mat ); if ( !mat.isIdentity() ) setNodeTransform( colNodeName, TransformF::Identity ); + + // clean node commands that are related to this target. + cleanTargetNodes(colNodeName, target); } // Add the meshes to the shape => @@ -1032,22 +1045,32 @@ DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char default: objName = "ColConvex"; break; } - for ( S32 suffix = i; suffix != 0; suffix /= 26 ) - objName += ('A' + ( suffix % 26 ) ); - String meshName = objName + String::ToString( "%d", size ); + S32 suffix = i; + while (true) + { + String tempName = objName; + + for (S32 s = suffix; s != 0; s /= 26) { + tempName += ('A' + (s % 26)); + } + + if (mShape->findName(tempName) == -1) + break; + + suffix++; + } + + for (S32 s = suffix; s != 0; s /= 26) { + objName += ('A' + (s % 26)); + } + + String meshName = objName + String::ToString("%d", size); mShape->addMesh( mesh->tsmesh, meshName ); // Add a node for this object if needed (non-identity transform) - if ( mesh->transform.isIdentity() ) - { - mShape->setObjectNode( objName, colNodeName ); - } - else - { - addNode( meshName, colNodeName, TransformF( mesh->transform ) ); - mShape->setObjectNode( objName, meshName ); - } + addNode( meshName, colNodeName, TransformF( mesh->transform ), false, target); + mShape->setObjectNode( objName, meshName ); } mShape->init(); diff --git a/Engine/source/ts/tsShapeConstruct.cpp b/Engine/source/ts/tsShapeConstruct.cpp index 74582cefd..4a0cf272c 100644 --- a/Engine/source/ts/tsShapeConstruct.cpp +++ b/Engine/source/ts/tsShapeConstruct.cpp @@ -1111,8 +1111,8 @@ DefineTSShapeConstructorMethod(renameNode, bool, (const char* oldName, const cha return true; }} -DefineTSShapeConstructorMethod(addNode, bool, (const char* name, const char* parentName, TransformF txfm, bool isWorld), (TransformF::Identity, false), - (name, parentName, 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()); @@ -2433,6 +2433,7 @@ void TSShapeConstructor::ChangeSet::add( TSShapeConstructor::ChangeSet::Command& // Detail level commands case CmdRenameDetailLevel: addCommand = addCmd_renameDetailLevel(cmd); break; case CmdRemoveDetailLevel: addCommand = addCmd_removeDetailLevel(cmd); break; + case CmdAddCollisionDetail: addCommand = addCmd_addDetailLevel(cmd); break; case CmdSetDetailLevelSize: addCommand = addCmd_setDetailSize(cmd); break; case CmdAddImposter: addCommand = addCmd_addImposter(cmd); break; case CmdRemoveImposter: addCommand = addCmd_removeImposter(cmd); break; @@ -2538,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])) { @@ -3302,6 +3295,28 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel(const TSShapeConstr return true; } +bool TSShapeConstructor::ChangeSet::addCmd_addDetailLevel(const TSShapeConstructor::ChangeSet::Command& newCmd) +{ + const char* targ = newCmd.argv[2]; + for (S32 index = mCommands.size() - 1; index >= 0; index--) + { + Command& cmd = mCommands[index]; + switch (cmd.type) + { + case CmdAddCollisionDetail: + if (!dStricmp(targ, cmd.argv[2])) + { + mCommands.erase(index); + } + break; + default: + break; + } + } + + return true; +} + bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove any previous command that references the detail, but stop if a mesh @@ -3480,3 +3495,32 @@ void TSShapeConstructor::onActionPerformed() } } } + +void TSShapeConstructor::cleanTargetNodes(const char* detail, const char* target) +{ + for (S32 index = mChangeSet.mCommands.size() - 1; index >= 0; index--) + { + ChangeSet::Command& cmd = mChangeSet.mCommands[index]; + switch (cmd.type) + { + case ChangeSet::eCommandType::CmdAddNode: + // node name starts with col + if (dStrStartsWith(cmd.argv[0], "Col")) + { + // node has the same detail and same target + if (!dStricmp(detail, cmd.argv[1]) && !dStricmp(target, cmd.argv[4])) + { + // now remove it from shape + mShape->removeMesh(cmd.argv[0]); + mShape->removeNode(cmd.argv[0]); + + // erase the command + mChangeSet.mCommands.erase(index); + } + } + break; + default: + break; + } + } +} diff --git a/Engine/source/ts/tsShapeConstruct.h b/Engine/source/ts/tsShapeConstruct.h index b85337a83..df04078de 100644 --- a/Engine/source/ts/tsShapeConstruct.h +++ b/Engine/source/ts/tsShapeConstruct.h @@ -100,7 +100,7 @@ public: { eCommandType type; // Command type StringTableEntry name; // Command name - static const U32 MAX_ARGS = 10; + static const U32 MAX_ARGS = 11; String argv[MAX_ARGS]; // Command arguments S32 argc; // Number of arguments Command() : type(CmdInvalid), name(0), argc(0) { } @@ -142,6 +142,7 @@ public: bool addCmd_setBounds(const Command& newCmd); bool addCmd_renameDetailLevel(const Command& newCmd); + bool addCmd_addDetailLevel(const Command& newCmd); bool addCmd_removeDetailLevel(const Command& newCmd); bool addCmd_setDetailSize(const Command& newCmd); bool addCmd_addImposter(const Command& newCmd); @@ -253,6 +254,7 @@ public: /// @name Nodes ///@{ + void cleanTargetNodes(const char* detail, const char* target); S32 getNodeCount(); S32 getNodeIndex(const char* name); const char* getNodeName(S32 index); @@ -265,7 +267,7 @@ public: TransformF getNodeTransform(const char* name, bool isWorld = false); bool setNodeTransform(const char* name, TransformF txfm, bool isWorld = false); bool renameNode(const char* oldName, const char* newName); - bool addNode(const char* name, const char* parentName, TransformF txfm = TransformF::Identity, bool isWorld = false); + bool addNode(const char* name, const char* parentName, TransformF txfm = TransformF::Identity, bool isWorld = false, const char* target = ""); bool removeNode(const char* name); ///@} @@ -315,7 +317,7 @@ public: const char* getImposterSettings(S32 index); S32 addImposter(S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle); bool removeImposter(); - bool addCollisionDetail(S32 size, const char* type, const char* target, S32 depth = 4, F32 merge = 30.0f, F32 concavity = 30.0f, S32 maxVerts = 32, F32 boxMaxError = 0, F32 sphereMaxError = 0, F32 capsuleMaxError = 0); + bool addCollisionDetail(S32 size, const char* type, const char* target, S32 depth = 4, F32 minPercentage = 10.0f, S32 maxHull = 30, S32 maxVerts = 32, F32 boxMaxError = 0, F32 sphereMaxError = 0, F32 capsuleMaxError = 0, const char* fillMode = "flood fill"); ///@} /// @name Sequences diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui index c8824248a..74c61fe37 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui @@ -9,7 +9,7 @@ else } //--- OBJECT WRITE BEGIN --- -$guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) { +$guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { text = ":: Shape Editor - Advanced Properties"; resizeWidth = "0"; resizeHeight = "0"; @@ -38,112 +38,67 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) { canSave = "1"; canSaveDynamicFields = "0"; minSize = "50 50"; - + new GuiTabBookCtrl() { - TabPosition = "Top"; - TabMargin = "6"; - MinTabWidth = "32"; - docking = "client"; - Margin = "3 1 3 3"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - position = "4 24"; - extent = "220 243"; - MinExtent = "8 -500"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "ToolsGuiTabBookProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; + tabMargin = "6"; + minTabWidth = "32"; + tabHeight = "20"; + selectedPage = "3"; + docking = "Client"; + margin = "3 1 3 3"; + position = "9 29"; + extent = "1262 682"; + minExtent = "8 -500"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiTabBookProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; internalName = "tabBook"; - canSave = "1"; - canSaveDynamicFields = "0"; new GuiTabPageCtrl() { text = "Details"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - Position = "0 19"; - extent = "220 224"; - MinExtent = "0 -500"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "ToolsGuiTabPageProfile"; - Visible = "0"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; + position = "0 19"; + extent = "1262 663"; + minExtent = "0 -500"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiTabPageProfile"; + visible = "0"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hidden = "1"; new GuiContainer() { - docking = "client"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - position = "0 0"; - extent = "202 224"; - MinExtent = "8 8"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiDefaultProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; + docking = "Client"; + extent = "1262 663"; + minExtent = "8 8"; + horizSizing = "width"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; new GuiContainer() { - position = "0 0"; - extent = "202 157"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "inspectorStyleRolloutDarkProfile"; + extent = "1262 596"; + horizSizing = "width"; + vertSizing = "height"; + profile = "inspectorStyleRolloutDarkProfile"; + tooltipProfile = "GuiToolTipProfile"; new GuiTextCtrl() { text = "Levels:"; position = "4 1"; - Extent = "272 16"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; + extent = "1332 16"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiCheckBoxCtrl() { - useInactiveState = "0"; text = "Levels"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; position = "5 22"; - Extent = "49 13"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiCheckBoxProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.fixedDetail"; - Command = "ShapeEdAdvancedWindow-->detailSlider.setActive($ThisControl.getValue()); ShapeEdAdvancedWindow-->levelsInactive.setVisible( !$ThisControl.getValue() );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Allow the slider to select the current detail level"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "49 13"; + profile = "ToolsGuiCheckBoxProfile"; + variable = "ShapeEdShapeView.fixedDetail"; + command = "ShapeEdAdvancedWindow-->detailSlider.setActive($ThisControl.getValue()); ShapeEdAdvancedWindow-->levelsInactive.setVisible( !$ThisControl.getValue() );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Allow the slider to select the current detail level"; }; new GuiSliderCtrl() { range = "0 0"; @@ -151,558 +106,319 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) { snap = "1"; value = "0"; position = "57 22"; - Extent = "118 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.currentDL"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Drag the slider to change the current detail level"; - hovertime = "1000"; - isContainer = "0"; + extent = "1178 14"; + horizSizing = "width"; + profile = "ToolsGuiSliderBoxProfile"; + variable = "ShapeEdShapeView.currentDL"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Drag the slider to change the current detail level"; internalName = "detailSlider"; - canSave = "1"; - canSaveDynamicFields = "0"; }; - new GuiBitmapCtrl(){ - bitmapAsset = "ToolsModule:inactive_overlay_image"; + new GuiBitmapCtrl() { + BitmapAsset = "ToolsModule:inactive_overlay_image"; position = "57 19"; - Extent = "290 20"; + extent = "290 20"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; tooltip = "Levels needs to be selected to enable the detail level slider"; hovertime = "500"; - isContainer = true; + isContainer = "1"; internalName = "levelsInactive"; }; new GuiTextCtrl() { text = "0"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - position = "182 20"; - Extent = "15 16"; - MinExtent = "8 2"; - HorizSizing = "left"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.currentDL"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Index of the current detail level"; - hovertime = "1000"; + position = "1242 20"; + extent = "15 16"; + horizSizing = "left"; + profile = "ToolsGuiTextProfile"; + variable = "ShapeEdShapeView.currentDL"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Index of the current detail level"; isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextCtrl() { text = "Polys"; position = "37 40"; extent = "26 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; position = "77 40"; - Extent = "40 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.detailPolys"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Number of polygons in the current detail level"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "40 16"; + profile = "ToolsGuiTextProfile"; + variable = "ShapeEdShapeView.detailPolys"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Number of polygons in the current detail level"; }; new GuiTextCtrl() { text = "Size"; position = "127 40"; extent = "24 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextEditCtrl() { position = "160 39"; - extent = "35 18"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextEditProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.detailSize"; - AltCommand = "ShapeEdAdvancedWindow.onEditDetailSize();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Edit this value to change the size of the current detail"; - hovertime = "1000"; + extent = "35 20"; + profile = "ToolsGuiTextEditProfile"; + variable = "ShapeEdShapeView.detailSize"; + altCommand = "ShapeEdAdvancedWindow.onEditDetailSize();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Edit this value to change the size of the current detail"; internalName = "detailSize"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextCtrl() { text = "Pixels"; position = "35 60"; extent = "28 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; position = "77 60"; - Extent = "40 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.pixelSize"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Current size (in pixels) of the shape"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "40 16"; + profile = "ToolsGuiTextProfile"; + variable = "ShapeEdShapeView.pixelSize"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Current size (in pixels) of the shape"; }; new GuiTextCtrl() { text = "Distance"; position = "109 60"; - Extent = "42 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "42 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { - text = ""; + text = "5"; position = "160 60"; extent = "38 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.orbitDist"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Current distance from the shape to the camera"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextProfile"; + variable = "ShapeEdShapeView.orbitDist"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Current distance from the shape to the camera"; }; new GuiTextCtrl() { text = "Materials"; position = "20 80"; extent = "43 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { - text = ""; + text = "0"; position = "77 80"; extent = "40 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.numMaterials"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Number of materials used by all meshes at this detail level"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextProfile"; + variable = "ShapeEdShapeView.numMaterials"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Number of materials used by all meshes at this detail level"; }; new GuiTextCtrl() { text = "Bones"; position = "120 80"; extent = "31 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { - text = "5"; + text = "0"; position = "160 80"; extent = "38 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.numBones"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Number of bones at this detail level (skins only)"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextProfile"; + variable = "ShapeEdShapeView.numBones"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Number of bones at this detail level (skins only)"; }; new GuiTextCtrl() { text = "Primitives"; position = "19 100"; extent = "44 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { - text = ""; + text = "0"; position = "77 100"; extent = "40 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.numDrawCalls"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Total number of mesh primitives (triangle lists) at this detail level"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextProfile"; + variable = "ShapeEdShapeView.numDrawCalls"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Total number of mesh primitives (triangle lists) at this detail level"; }; new GuiTextCtrl() { text = "Weights"; position = "109 100"; - Extent = "42 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "42 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { - text = "5"; + text = "0"; position = "160 100"; extent = "38 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.numWeights"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Number of vertex weights at this detail level (skins only)"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiTextProfile"; + variable = "ShapeEdShapeView.numWeights"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Number of vertex weights at this detail level (skins only)"; }; new GuiTextCtrl() { - Profile = "ToolsGuiTextProfile"; text = "Col Meshes"; position = "7 120"; extent = "56 16"; - horizSizing = "right"; - vertSizing = "bottom"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiTextCtrl() { - text = ""; + text = "0"; position = "74 120"; extent = "40 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Variable = "ShapeEdShapeView.colMeshes"; + profile = "GuiTextProfile"; + variable = "ShapeEdShapeView.colMeshes"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiTextCtrl() { - Profile = "ToolsGuiTextProfile"; text = "Col Polys"; position = "108 120"; extent = "43 16"; - horizSizing = "right"; - vertSizing = "bottom"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiTextCtrl() { - text = ""; + text = "0"; position = "160 120"; extent = "38 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Variable = "ShapeEdShapeView.colPolys"; + profile = "GuiTextProfile"; + variable = "ShapeEdShapeView.colPolys"; + tooltipProfile = "GuiToolTipProfile"; }; }; new GuiContainer() { position = "0 138"; - Extent = "202 90"; - MinExtent = "8 8"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "inspectorStyleRolloutDarkProfile"; - isContainer = "1"; + extent = "1262 90"; + minExtent = "8 8"; + horizSizing = "width"; + profile = "inspectorStyleRolloutDarkProfile"; + tooltipProfile = "GuiToolTipProfile"; - new GuiTextCtrl() { // Header + new GuiTextCtrl() { text = "Imposters:"; position = "5 1"; - Extent = "192 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; + extent = "192 16"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiCheckBoxCtrl() { - useInactiveState = "0"; text = "Use Imposters"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; position = "72 2"; - Extent = "83 13"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiCheckBoxProfile"; - Visible = "1"; - Command = "ShapeEdDetails.onToggleImposter( $ThisControl.getValue() );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Controls whether this shape uses an imposter detail level"; - hovertime = "1000"; - isContainer = "0"; + extent = "83 13"; + profile = "ToolsGuiCheckBoxProfile"; + command = "ShapeEdDetails.onToggleImposter( $ThisControl.getValue() );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Controls whether this shape uses an imposter detail level"; internalName = "bbUseImposters"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextCtrl() { text = "Detail Level"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; position = "6 23"; - Extent = "57 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; + extent = "57 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextEditCtrl() { position = "68 22"; - Extent = "36 18"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextEditProfile"; - Visible = "1"; - AltCommand = "ShapeEdDetails.onEditImposter();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Specifies the detail level used to generate the imposters"; - hovertime = "1000"; + extent = "36 20"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "ShapeEdDetails.onEditImposter();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Specifies the detail level used to generate the imposters"; internalName = "bbDetailLevel"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextCtrl() { text = "Dimension"; position = "6 43"; - Extent = "57 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "57 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextEditCtrl() { position = "72 43"; - Extent = "36 18"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextEditProfile"; - Visible = "1"; - AltCommand = "ShapeEdDetails.onEditImposter();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Specifies the dimension (width/height) of the imposters in pixels"; - hovertime = "1000"; + extent = "36 20"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "ShapeEdDetails.onEditImposter();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Specifies the dimension (width/height) of the imposters in pixels"; internalName = "bbDimension"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextCtrl() { text = "X Steps"; position = "6 65"; - Extent = "57 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "57 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextEditCtrl() { position = "68 64"; - Extent = "36 18"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextEditProfile"; - Visible = "1"; - AltCommand = "ShapeEdDetails.onEditImposter();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Number of steps in the horizontal axis"; - hovertime = "1000"; + extent = "36 20"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "ShapeEdDetails.onEditImposter();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Number of steps in the horizontal axis"; internalName = "bbEquatorSteps"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiCheckBoxCtrl() { - useInactiveState = "0"; text = "Include Poles"; - groupNum = "-1"; - buttonType = "ToggleButton"; position = "113 24"; - Extent = "83 18"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiCheckBoxProfile"; - Visible = "1"; - Command = "ShapeEdDetails.onEditImposter();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Specifies whether to include the poles (top and bottom) of the shape"; - hovertime = "1000"; + extent = "83 18"; + profile = "ToolsGuiCheckBoxProfile"; + command = "ShapeEdDetails.onEditImposter();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Specifies whether to include the poles (top and bottom) of the shape"; internalName = "bbIncludePoles"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextCtrl() { text = "Y Steps"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; position = "116 44"; - Extent = "41 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - Tooltip = "Number of steps in the vertical axis"; - hovertime = "1000"; + extent = "41 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Number of steps in the vertical axis"; isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextEditCtrl() { position = "161 43"; - Extent = "36 18"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextEditProfile"; - Visible = "1"; - AltCommand = "ShapeEdDetails.onEditImposter();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; + extent = "36 20"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "ShapeEdDetails.onEditImposter();"; + tooltipProfile = "ToolsGuiToolTipProfile"; internalName = "bbPolarSteps"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextCtrl() { text = "Y Angle"; position = "116 65"; - Extent = "41 16"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; + extent = "41 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; tooltip = "Polar Angle - Y axis"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextEditCtrl() { position = "161 64"; - Extent = "36 18"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiTextEditProfile"; - Visible = "1"; - AltCommand = "ShapeEdDetails.onEditImposter();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; + extent = "36 20"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "ShapeEdDetails.onEditImposter();"; + tooltipProfile = "ToolsGuiToolTipProfile"; internalName = "bbPolarAngle"; - canSave = "1"; - canSaveDynamicFields = "0"; }; - new GuiBitmapCtrl(){ - bitmapAsset = "ToolsModule:inactive_overlay_image"; + new GuiBitmapCtrl() { + BitmapAsset = "ToolsModule:inactive_overlay_image"; position = "4 18"; - Extent = "193 68"; + extent = "193 68"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; tooltip = "Imposters must be enabled, and an imposter detail level selected to edit these properties"; hovertime = "500"; isContainer = "1"; @@ -713,1060 +429,716 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) { }; new GuiTabPageCtrl() { text = "Mounting"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - Position = "0 19"; - extent = "220 224"; - MinExtent = "0 -500"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "ToolsGuiTabPageProfile"; - Visible = "0"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; - isContainer = "1"; - - new GuiControl(){ - docking = "client"; - Margin = "0 0 0 0"; - Profile = "ToolsGuiScrollProfile"; - position = "0 0"; + position = "0 19"; + extent = "1262 663"; + minExtent = "0 -500"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiTabPageProfile"; + visible = "0"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hidden = "1"; + + new GuiControl() { extent = "294 224"; - + profile = "ToolsGuiScrollProfile"; + tooltipProfile = "GuiToolTipProfile"; + isContainer = "1"; }; new GuiContainer(ShapeEdMountWindow) { - docking = "none"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "1"; - position = "0 0"; - extent = "220 224"; - MinExtent = "8 8"; - HorizSizing = "width"; + docking = "None"; + extent = "1262 663"; + minExtent = "8 8"; + horizSizing = "width"; vertSizing = "height"; - Profile = "ToolsGuiDefaultProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; new GuiCheckBoxCtrl() { - useInactiveState = "0"; text = " Render mounted shapes"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; position = "2 2"; extent = "200 13"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiCheckBoxProfile"; - Visible = "1"; - Variable = "ShapeEdShapeView.renderMounts"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Controls whether mounted shapes will be rendered in the 3D view"; - hovertime = "1000"; - isContainer = "0"; + profile = "ToolsGuiCheckBoxProfile"; + variable = "ShapeEdShapeView.renderMounts"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Controls whether mounted shapes will be rendered in the 3D view"; internalName = "renderMounts"; - canSave = "1"; - canSaveDynamicFields = "0"; }; - new GuiScrollCtrl() { - willFirstRespond = "1"; hScrollBar = "alwaysOff"; vScrollBar = "dynamic"; - lockHorizScroll = "true"; - lockVertScroll = "false"; - constantThumbHeight = "0"; - childMargin = "0 0"; - mouseWheelScrollSpeed = "-1"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "0"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; + lockHorizScroll = "1"; + anchorTop = "0"; position = "0 17"; - extent = "202 124"; - MinExtent = "8 8"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "ToolsGuiShapeEdScrollProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - canSave = "1"; - isContainer = "1"; + extent = "1244 563"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiScrollProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; new GuiContainer() { - position = "0 0"; - extent = "200 121"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "inspectorStyleRolloutListProfile"; + position = "1 1"; + extent = "1242 560"; + horizSizing = "width"; + vertSizing = "height"; + profile = "inspectorStyleRolloutListProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiTextListCtrl() { columns = "-1 0 110 152"; - fitParentWidth = "1"; clipColumnText = "1"; - Position = "1 1"; - Extent = "200 11"; - MinExtent = "8 11"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiShapeEdTextListProfile"; - Visible = "1"; - Command = "ShapeEdMountWindow.update_onMountSelectionChanged();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; + position = "1 1"; + extent = "1242 11"; + minExtent = "8 11"; + profile = "GuiDefaultProfile"; + command = "ShapeEdMountWindow.update_onMountSelectionChanged();"; + tooltipProfile = "ToolsGuiToolTipProfile"; internalName = "mountList"; - canSave = "1"; - canSaveDynamicFields = "0"; }; }; new GuiContainer() { - position = "0 140"; - extent = "202 85"; - HorizSizing = "width"; - VertSizing = "top"; - Profile = "inspectorStyleRolloutDarkProfile"; - + position = "0 579"; + extent = "1244 85"; + horizSizing = "width"; + vertSizing = "top"; + profile = "inspectorStyleRolloutDarkProfile"; + tooltipProfile = "GuiToolTipProfile"; + new GuiTextCtrl() { text = "Mount Item"; position = "5 1"; extent = "134 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:delete_n_image"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "182 1"; - Extent = "16 16"; - MinExtent = "8 2"; - HorizSizing = "left"; - VertSizing = "bottom"; - Profile = "ToolsGuiDefaultProfile"; - Visible = "1"; - Command = "ShapeEdMountWindow.unmountShape();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Delete the selected mount item"; - canSaveDynamicFields = "0"; - canSave = "1"; - isContainer = "0"; + BitmapAsset = "ToolsModule:delete_n_image"; + position = "1224 1"; + extent = "16 16"; + horizSizing = "left"; + profile = "ToolsGuiDefaultProfile"; + command = "ShapeEdMountWindow.unmountShape();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Delete the selected mount item"; }; new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:new_n_image"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "168 1"; - Extent = "16 16"; - MinExtent = "8 2"; - HorizSizing = "left"; - VertSizing = "bottom"; - Profile = "ToolsGuiDefaultProfile"; - Visible = "1"; - Command = "ShapeEdMountWindow.mountShape(-1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Mounts a new shape to the current model"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + BitmapAsset = "ToolsModule:new_n_image"; + position = "1210 1"; + extent = "16 16"; + horizSizing = "left"; + profile = "ToolsGuiDefaultProfile"; + command = "ShapeEdMountWindow.mountShape(-1);"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Mounts a new shape to the current model"; }; - /*new GuiButtonCtrl() { - text = "Unmount All"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "109 97"; - extent = "78 18"; - MinExtent = "8 2"; - HorizSizing = "right"; - vertSizing = "top"; - Profile = "ToolsGuiButtonProfile"; - Visible = "1"; - Command = "ShapeEdMountWindow.unmountAll();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Unmount all shapes"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - };*/ new GuiTextCtrl() { text = "Shape"; position = "5 21"; extent = "33 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl(ShapeEdMountShapeMenu) { + text = "Browse..."; position = "42 20"; - extent = "156 18"; - HorizSizing = "width"; - vertSizing = "bottom"; - Profile = "ToolsGuiPopUpMenuProfile"; - ToolTip = "Select the model to mount"; + extent = "1198 18"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuProfile"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the model to mount"; }; new GuiTextCtrl() { text = "Node"; position = "5 42"; extent = "33 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { position = "42 41"; - extent = "62 18"; - minExtent = "8 2"; + extent = "1104 18"; horizSizing = "width"; - vertSizing = "bottom"; - Profile = "ToolsGuiPopUpMenuProfile"; - Command = "ShapeEdMountWindow.updateSelectedMount();"; - ToolTip = "Select the node on which to mount the model"; + profile = "ToolsGuiPopUpMenuProfile"; + command = "ShapeEdMountWindow.updateSelectedMount();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the node on which to mount the model"; internalName = "mountNode"; }; new GuiTextCtrl() { text = "Type"; - position = "110 42"; + position = "1152 42"; extent = "24 16"; - minExtent = "8 2"; horizSizing = "left"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { - position = "138 41"; + text = "Image"; + position = "1180 41"; extent = "60 18"; horizSizing = "left"; - vertSizing = "bottom"; - Profile = "ToolsGuiPopUpMenuProfile"; - Command = "ShapeEdMountWindow.updateSelectedMount();"; - ToolTip = "Select the type of mounting to use"; + profile = "ToolsGuiPopUpMenuProfile"; + command = "ShapeEdMountWindow.updateSelectedMount();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the type of mounting to use"; internalName = "mountType"; }; new GuiPopUpMenuCtrl() { + text = ""; position = "5 62"; - extent = "99 18"; - HorizSizing = "width"; - vertSizing = "bottom"; - Profile = "ToolsGuiPopUpMenuProfile"; - Command = "ShapeEdMountWindow.setMountThreadSequence();"; - ToolTip = "Select the sequence to play on the mounted model"; + extent = "1141 18"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuProfile"; + command = "ShapeEdMountWindow.setMountThreadSequence();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the sequence to play on the mounted model"; internalName = "mountSeq"; }; new GuiSliderCtrl(ShapeEdMountSeqSlider) { - range = "0 1"; ticks = "0"; - snap = "0"; value = "0"; position = "109 64"; - extent = "68 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "top"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Drag the slider to scrub through the sequence keyframes"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "1110 14"; + horizSizing = "width"; + vertSizing = "top"; + profile = "ToolsGuiSliderBoxProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Drag the slider to scrub through the sequence keyframes"; }; new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:playfwd_btn_n_image"; + BitmapAsset = "ToolsModule:playfwd_btn_n_image"; groupNum = "0"; buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "180 62"; - Extent = "18 18"; - MinExtent = "8 2"; - HorizSizing = "left"; + position = "1222 62"; + extent = "18 18"; + horizSizing = "left"; vertSizing = "top"; - Profile = "ToolsGuiButtonProfile"; - Visible = "1"; - Command = "ShapeEdMountWindow.toggleMountThreadPlayback();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Play forwards"; - hovertime = "1000"; - isContainer = "0"; + profile = "ToolsGuiButtonProfile"; + command = "ShapeEdMountWindow.toggleMountThreadPlayback();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Play forwards"; internalName = "mountPlayBtn"; - canSave = "1"; - canSaveDynamicFields = "0"; }; }; }; }; new GuiTabPageCtrl() { text = "Threads"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - Position = "0 19"; - extent = "220 224"; - MinExtent = "0 -500"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "ToolsGuiTabPageProfile"; - Visible = "0"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - + position = "0 19"; + extent = "1262 663"; + minExtent = "0 -500"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiTabPageProfile"; + visible = "0"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hidden = "1"; + new GuiContainer(ShapeEdThreadWindow) { - docking = "client"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - position = "0 0"; - extent = "202 224"; - MinExtent = "8 8"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiDefaultProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - + docking = "Client"; + extent = "1262 663"; + minExtent = "8 8"; + horizSizing = "width"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + new GuiContainer() { - position = "0 0"; - extent = "203 141"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "inspectorStyleRolloutDarkProfile"; - + extent = "1263 580"; + horizSizing = "width"; + vertSizing = "height"; + profile = "inspectorStyleRolloutDarkProfile"; + tooltipProfile = "GuiToolTipProfile"; + new GuiTextCtrl() { text = "Thread"; position = "4 1"; extent = "41 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiScrollCtrl() { - willFirstRespond = "1"; hScrollBar = "alwaysOff"; vScrollBar = "dynamic"; - lockHorizScroll = "true"; - lockVertScroll = "false"; - constantThumbHeight = "0"; - childMargin = "0 0"; - mouseWheelScrollSpeed = "-1"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "0"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; + lockHorizScroll = "1"; + anchorTop = "0"; position = "0 17"; - extent = "47 124"; - MinExtent = "8 8"; - HorizSizing = "right"; - VertSizing = "height"; - Profile = "ToolsGuiShapeEdScrollProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "47 563"; + minExtent = "8 8"; + vertSizing = "height"; + profile = "GuiScrollProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; new GuiTextListCtrl(ShapeEdThreadList) { - fitParentWidth = "1"; clipColumnText = "1"; position = "1 1"; extent = "45 11"; - MinExtent = "8 11"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiShapeEdTextListProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSave = "1"; - canSaveDynamicFields = "0"; + minExtent = "8 11"; + profile = "GuiDefaultProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; }; }; new GuiTextCtrl() { text = "Sequence"; position = "52 1"; extent = "53 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextProfile"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiScrollCtrl() { - willFirstRespond = "1"; hScrollBar = "dynamic"; vScrollBar = "dynamic"; - lockHorizScroll = "true"; - lockVertScroll = "false"; - constantThumbHeight = "0"; - childMargin = "0 0"; - mouseWheelScrollSpeed = "-1"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "0"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; + lockHorizScroll = "1"; + anchorTop = "0"; position = "46 17"; - extent = "202 124"; - MinExtent = "8 8"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "ToolsGuiShapeEdScrollProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; + extent = "1262 563"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiScrollProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; new GuiTextListCtrl() { - fitParentWidth = "1"; clipColumnText = "1"; - Position = "1 1"; - extent = "202 11"; - MinExtent = "8 11"; - HorizSizing = "right"; - VertSizing = "bottom"; - Profile = "ToolsGuiShapeEdTextListProfile"; - Visible = "1"; - Command = "ShapeEdSequenceList.setSelectedById( $ThisControl.getSelectedId() );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; + position = "1 1"; + extent = "1260 11"; + minExtent = "8 11"; + profile = "GuiDefaultProfile"; + command = "ShapeEdSequenceList.setSelectedById( $ThisControl.getSelectedId() );"; + tooltipProfile = "ToolsGuiToolTipProfile"; internalName = "seqList"; - canSave = "1"; - canSaveDynamicFields = "0"; }; }; new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:delete_n_image"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "184 1"; - Extent = "16 16"; - MinExtent = "8 2"; - HorizSizing = "left"; - VertSizing = "bottom"; - Profile = "ToolsGuiDefaultProfile"; - Visible = "1"; - Command = "ShapeEdThreadWindow.onRemoveThread();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Delete the selected thread"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + BitmapAsset = "ToolsModule:delete_n_image"; + position = "1244 1"; + extent = "16 16"; + horizSizing = "left"; + profile = "ToolsGuiDefaultProfile"; + command = "ShapeEdThreadWindow.onRemoveThread();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Delete the selected thread"; }; new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:new_n_image"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "171 1"; - Extent = "16 16"; - MinExtent = "8 2"; - HorizSizing = "left"; - VertSizing = "bottom"; - Profile = "ToolsGuiDefaultProfile"; - Visible = "1"; - Command = "ShapeEdThreadWindow.onAddThread();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Add a new thread"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + BitmapAsset = "ToolsModule:new_n_image"; + position = "1231 1"; + extent = "16 16"; + horizSizing = "left"; + profile = "ToolsGuiDefaultProfile"; + command = "ShapeEdThreadWindow.onAddThread();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Add a new thread"; }; }; new GuiSliderCtrl(ShapeEdThreadSlider) { range = "0 0"; ticks = "0"; - snap = "0"; value = "0"; - position = "29 146"; - extent = "133 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "top"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Drag the slider to scrub through the sequence keyframes"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + position = "29 585"; + extent = "1193 14"; + horizSizing = "width"; + vertSizing = "top"; + profile = "ToolsGuiSliderBoxProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Drag the slider to scrub through the sequence keyframes"; }; new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:playbkwd_btn_n_image"; + BitmapAsset = "ToolsModule:playbkwd_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "6 144"; + position = "6 583"; extent = "18 18"; - MinExtent = "8 2"; - HorizSizing = "right"; vertSizing = "top"; - Profile = "ToolsGuiButtonProfile"; - Visible = "1"; - Command = "ShapeEdAnimWindow-->playBkwdBtn.performClick();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Play backwards"; - hovertime = "1000"; - isContainer = "0"; + profile = "ToolsGuiButtonProfile"; + command = "ShapeEdAnimWindow-->playBkwdBtn.performClick();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Play backwards"; internalName = "playBkwdBtn"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:pause_btn_n_image"; + BitmapAsset = "ToolsModule:pause_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "166 144"; - Extent = "18 18"; - MinExtent = "8 2"; - HorizSizing = "left"; + position = "1226 583"; + extent = "18 18"; + horizSizing = "left"; vertSizing = "top"; - Profile = "ToolsGuiButtonProfile"; - Visible = "1"; - Command = "ShapeEdAnimWindow-->pauseBtn.performClick();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Toggle Pause (SPACE)"; - hovertime = "1000"; - isContainer = "0"; + profile = "ToolsGuiButtonProfile"; + command = "ShapeEdAnimWindow-->pauseBtn.performClick();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Toggle Pause (SPACE)"; internalName = "pauseBtn"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:playfwd_btn_n_image"; + BitmapAsset = "ToolsModule:playfwd_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "184 144"; - Extent = "18 18"; - MinExtent = "8 2"; - HorizSizing = "left"; + position = "1244 583"; + extent = "18 18"; + horizSizing = "left"; vertSizing = "top"; - Profile = "ToolsGuiButtonProfile"; - Visible = "1"; - Command = "ShapeEdAnimWindow-->playFwdBtn.performClick();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Play forwards"; - hovertime = "1000"; - isContainer = "0"; + profile = "ToolsGuiButtonProfile"; + command = "ShapeEdAnimWindow-->playFwdBtn.performClick();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Play forwards"; internalName = "playFwdBtn"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiCheckBoxCtrl() { - useInactiveState = "0"; text = " Transition lasts"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "3 167"; + position = "3 606"; extent = "88 13"; - MinExtent = "8 2"; - HorizSizing = "right"; - VertSizing = "top"; - Profile = "ToolsGuiCheckBoxProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Controls whether the thread will smoothly transition when a new sequence is selected"; - hovertime = "1000"; - isContainer = "0"; + vertSizing = "top"; + profile = "ToolsGuiCheckBoxProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Controls whether the thread will smoothly transition when a new sequence is selected"; internalName = "useTransitions"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextEditCtrl() { - position = "98 164"; - extent = "49 18"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "top"; - Profile = "ToolsGuiTextEditProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Number of seconds over which to transition to the new sequence"; - hovertime = "1000"; + text = "0.5"; + position = "98 603"; + extent = "1109 20"; + horizSizing = "width"; + vertSizing = "top"; + profile = "ToolsGuiTextEditProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Number of seconds over which to transition to the new sequence"; internalName = "transitionTime"; - canSave = "1"; - canSaveDynamicFields = "0"; }; new GuiTextCtrl() { text = "seconds"; - position = "153 165"; + position = "1213 604"; extent = "44 16"; - minExtent = "8 2"; horizSizing = "left"; vertSizing = "top"; - Profile = "ToolsGuiTextProfile"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiTextCtrl() { text = "Transition to"; - position = "4 186"; + position = "4 625"; extent = "62 16"; - minExtent = "8 2"; - horizSizing = "right"; vertSizing = "top"; - Profile = "ToolsGuiTextProfile"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { - position = "68 185"; - extent = "133 18"; - HorizSizing = "width"; + text = "synched position"; + position = "68 624"; + extent = "1193 18"; + horizSizing = "width"; vertSizing = "top"; - Profile = "ToolsGuiPopUpMenuProfile"; - ToolTip = "Select the start position of the new sequence"; + profile = "ToolsGuiPopUpMenuProfile"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the start position of the new sequence"; internalName = "transitionTo"; }; new GuiTextCtrl() { text = "Target anim"; - position = "4 207"; + position = "4 646"; extent = "58 16"; - minExtent = "8 2"; - horizSizing = "right"; vertSizing = "top"; - Profile = "ToolsGuiTextProfile"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { - position = "68 206"; - extent = "133 18"; - minExtent = "8 2"; + text = "plays during transition"; + position = "68 645"; + extent = "1193 18"; horizSizing = "width"; vertSizing = "top"; - Profile = "ToolsGuiPopUpMenuProfile"; - ToolTip = "Select the initial play state of the new sequence"; + profile = "ToolsGuiPopUpMenuProfile"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the initial play state of the new sequence"; internalName = "transitionTarget"; }; }; }; new GuiTabPageCtrl() { text = "Collision"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - Position = "0 19"; - extent = "220 224"; - MinExtent = "0 -500"; - HorizSizing = "width"; - VertSizing = "height"; - Profile = "ToolsGuiTabPageProfile"; - Visible = "0"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - + position = "0 19"; + extent = "1262 663"; + minExtent = "0 -500"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiTabPageProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + new GuiContainer(ShapeEdColWindow) { - docking = "client"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - position = "0 0"; - extent = "202 225"; - MinExtent = "8 8"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiDefaultProfile"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - + docking = "Client"; + extent = "1262 663"; + minExtent = "8 8"; + horizSizing = "width"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + new GuiTextCtrl() { text = "Fit Type"; position = "5 5"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { position = "85 4"; extent = "170 18"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiPopUpMenuProfile"; - Command = "ShapeEdColWindow.editCollision();"; - ToolTip = "Select the method used to auto-generate the collision geometry"; + profile = "ToolsGuiPopUpMenuProfile"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the method used to auto-generate the collision geometry"; internalName = "colType"; }; new GuiTextCtrl() { text = "Fit Target"; position = "5 25"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { position = "85 24"; extent = "170 18"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiPopUpMenuProfile"; - Command = "ShapeEdColWindow.editCollision();"; - ToolTip = "Select the object to fit collision geometry to"; + profile = "ToolsGuiPopUpMenuProfile"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the object to fit collision geometry to"; internalName = "colTarget"; }; new GuiTextCtrl() { - text = "Max Depth"; - position = "5 47"; + text = "Fill Mode"; + position = "5 44"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "85 43"; + extent = "170 18"; + profile = "ToolsGuiPopUpMenuProfile"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Select the object to fit collision geometry to"; + internalName = "fillMode"; + }; + new GuiTextCtrl() { + text = "Max Depth"; + position = "5 71"; + extent = "70 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiSliderCtrl() { - range = "0 8"; + range = "2 64"; ticks = "4"; - snap = "0"; value = "4"; - position = "80 48"; - extent = "90 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - AltCommand = "ShapeEdColWindow-->hullDepthText.setText( mFloor($ThisControl.getValue()) );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Maximum hull split depth"; - hovertime = "1000"; - isContainer = "0"; + position = "80 72"; + extent = "1150 14"; + horizSizing = "width"; + profile = "ToolsGuiSliderBoxProfile"; + altCommand = "ShapeEdColWindow-->hullDepthText.setText( mFloor($ThisControl.getValue()) );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Maximum hull split depth"; internalName = "hullDepth"; }; new GuiTextCtrl() { text = "4"; - position = "320 47"; + position = "320 71"; extent = "25 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; internalName = "hullDepthText"; }; new GuiTextCtrl() { - text = "Merge %"; - position = "5 68"; + text = "Error %"; + position = "5 92"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiSliderCtrl() { - range = "0 60"; + range = "0.001 10"; ticks = "4"; - snap = "0"; - value = "30"; - position = "80 69"; - extent = "90 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - AltCommand = "ShapeEdColWindow-->hullMergeText.setText( mFloor($ThisControl.getValue()) );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Hull volume merge threshold"; - hovertime = "1000"; - isContainer = "0"; + value = "10"; + position = "80 93"; + extent = "1150 14"; + horizSizing = "width"; + profile = "ToolsGuiSliderBoxProfile"; + altCommand = "ShapeEdColWindow-->hullMergeText.setText( mFloor($ThisControl.getValue()) );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Hull volume merge threshold"; internalName = "hullMergeThreshold"; }; new GuiTextCtrl() { - text = "30"; - position = "320 68"; + text = "10"; + position = "320 92"; extent = "25 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; internalName = "hullMergeText"; }; new GuiTextCtrl() { - text = "Concavity %"; - position = "5 89"; + text = "Max Hulls"; + position = "5 113"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiSliderCtrl() { - range = "0 60"; + range = "1 100"; ticks = "4"; - snap = "0"; value = "30"; - position = "80 90"; - extent = "90 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - AltCommand = "ShapeEdColWindow-->hullConcaveText.setText( mFloor($ThisControl.getValue()) );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Hull concavity threshold"; - hovertime = "1000"; - isContainer = "0"; + position = "80 114"; + extent = "1150 14"; + horizSizing = "width"; + profile = "ToolsGuiSliderBoxProfile"; + altCommand = "ShapeEdColWindow-->hullConcaveText.setText( mFloor($ThisControl.getValue()) );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Hull concavity threshold"; internalName = "hullConcaveThreshold"; }; new GuiTextCtrl() { text = "30"; - position = "320 89"; + position = "320 113"; extent = "25 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; internalName = "hullConcaveText"; }; new GuiTextCtrl() { text = "Max Verts"; - position = "5 110"; + position = "5 134"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiSliderCtrl() { range = "8 64"; ticks = "4"; - snap = "0"; value = "32"; - position = "80 111"; - extent = "90 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - AltCommand = "ShapeEdColWindow-->hullMaxVertsText.setText( mFloor($ThisControl.getValue()) );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Maximum number of verts in a convex hull"; - hovertime = "1000"; - isContainer = "0"; + position = "80 135"; + extent = "1150 14"; + horizSizing = "width"; + profile = "ToolsGuiSliderBoxProfile"; + altCommand = "ShapeEdColWindow-->hullMaxVertsText.setText( mFloor($ThisControl.getValue()) );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Maximum number of verts in a convex hull"; internalName = "hullMaxVerts"; }; new GuiTextCtrl() { text = "32"; - position = "320 110"; + position = "320 134"; extent = "25 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; internalName = "hullMaxVertsText"; }; new GuiTextCtrl() { text = "Box %"; - position = "5 131"; + position = "5 155"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiSliderCtrl() { range = "0 100"; ticks = "4"; - snap = "0"; value = "30"; - position = "80 132"; - extent = "90 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - AltCommand = "ShapeEdColWindow-->hullMaxBoxErrorText.setText( mFloor($ThisControl.getValue()) );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Maximum box volume error %"; - hovertime = "1000"; - isContainer = "0"; + position = "80 156"; + extent = "1150 14"; + horizSizing = "width"; + profile = "ToolsGuiSliderBoxProfile"; + altCommand = "ShapeEdColWindow-->hullMaxBoxErrorText.setText( mFloor($ThisControl.getValue()) );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Maximum box volume error %"; internalName = "hullMaxBoxError"; }; new GuiTextCtrl() { text = "30"; - position = "320 131"; + position = "320 155"; extent = "25 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; internalName = "hullMaxBoxErrorText"; }; new GuiTextCtrl() { text = "Sphere %"; - position = "5 152"; + position = "5 176"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiSliderCtrl() { range = "0 100"; ticks = "4"; - snap = "0"; value = "30"; - position = "80 153"; - extent = "90 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - AltCommand = "ShapeEdColWindow-->hullMaxSphereErrorText.setText( mFloor($ThisControl.getValue()) );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Maximum sphere volume error %"; - hovertime = "1000"; - isContainer = "0"; + position = "80 177"; + extent = "1150 14"; + horizSizing = "width"; + profile = "ToolsGuiSliderBoxProfile"; + altCommand = "ShapeEdColWindow-->hullMaxSphereErrorText.setText( mFloor($ThisControl.getValue()) );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Maximum sphere volume error %"; internalName = "hullMaxSphereError"; }; new GuiTextCtrl() { text = "30"; - position = "320 152"; + position = "320 176"; extent = "25 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; internalName = "hullMaxSphereErrorText"; }; new GuiTextCtrl() { text = "Capsule %"; - position = "5 173"; + position = "5 197"; extent = "70 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; }; new GuiSliderCtrl() { range = "0 100"; ticks = "4"; - snap = "0"; value = "30"; - position = "80 174"; - extent = "90 14"; - MinExtent = "8 2"; - HorizSizing = "width"; - VertSizing = "bottom"; - Profile = "ToolsGuiSliderBoxProfile"; - Visible = "1"; - AltCommand = "ShapeEdColWindow-->hullMaxCapsuleErrorText.setText( mFloor($ThisControl.getValue()) );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Maximum capsule volume error %"; - hovertime = "1000"; - isContainer = "0"; + position = "80 198"; + extent = "1150 14"; + horizSizing = "width"; + profile = "ToolsGuiSliderBoxProfile"; + altCommand = "ShapeEdColWindow-->hullMaxCapsuleErrorText.setText( mFloor($ThisControl.getValue()) );"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Maximum capsule volume error %"; internalName = "hullMaxCapsuleError"; }; new GuiTextCtrl() { text = "30"; - position = "320 173"; + position = "320 197"; extent = "25 16"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiTextRightProfile"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; internalName = "hullMaxCapsuleErrorText"; }; new GuiButtonCtrl() { text = "Update Hulls"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "7 200"; + position = "7 224"; extent = "100 20"; - MinExtent = "8 2"; - HorizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiButtonProfile"; - Visible = "1"; - Command = "ShapeEdColWindow.editCollision();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Update the convex hull(s)"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiButtonProfile"; + command = "ShapeEdColWindow.editCollision();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Update the convex hull(s)"; }; new GuiButtonCtrl() { text = "Revert Changes"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "115 200"; + position = "115 224"; extent = "100 20"; - MinExtent = "8 2"; - HorizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiButtonProfile"; - Visible = "1"; - Command = "ShapeEdColWindow.update_onCollisionChanged();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Revert changes to settings"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + profile = "ToolsGuiButtonProfile"; + command = "ShapeEdColWindow.update_onCollisionChanged();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Revert changes to settings"; }; new GuiBitmapCtrl() { - bitmapAsset = "ToolsModule:inactive_overlay_image"; + BitmapAsset = "ToolsModule:inactive_overlay_image"; position = "0 47"; extent = "199 178"; - horizSizing = "right"; - vertSizing = "bottom"; - Profile = "ToolsGuiDefaultProfile"; + profile = "ToolsGuiDefaultProfile"; visible = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; + tooltipProfile = "GuiToolTipProfile"; internalName = "hullInactive"; + hidden = "1"; }; }; }; diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript index de06ac9a3..a7114117f 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript @@ -2935,11 +2935,18 @@ function ShapeEdColWindow::onWake( %this ) %this-->colType.add( "18-DOP" ); %this-->colType.add( "26-DOP" ); %this-->colType.add( "Convex Hulls" ); + + %this-->fillMode.clear(); + %this-->fillMode.add("Flood fill"); + %this-->fillMode.add("Surface only"); + %this-->fillMode.add("Raycast Fill"); + + %this-->fillMode.setSelected( %this-->fillMode.findText( "Flood fill" ), false ); } function ShapeEdColWindow::update_onShapeSelectionChanged( %this ) { - %this.lastColSettings = "" TAB "Bounds"; + %this.lastColSettings = "" TAB "Bounds" TAB "Flood fill"; // Initialise collision mesh target list %this-->colTarget.clear(); @@ -2979,6 +2986,8 @@ function ShapeEdColWindow::update_onCollisionChanged( %this ) %this-->hullMaxSphereErrorText.setText( mFloor( %this-->hullMaxSphereError.getValue() ) ); %this-->hullMaxCapsuleError.setValue( getField( %colData, 8 ) ); %this-->hullMaxCapsuleErrorText.setText( mFloor( %this-->hullMaxCapsuleError.getValue() ) ); + %fillModeID = %this-->fillMode.findText( getField( %colData, 9 ) ); + %this-->fillMode.setSelected( %fillModeID, false ); } else { @@ -3007,6 +3016,7 @@ function ShapeEdColWindow::editCollisionOK( %this ) { %type = %this-->colType.getText(); %target = %this-->colTarget.getText(); + %fillMode = %this-->fillMode.getText(); %depth = %this-->hullDepth.getValue(); %merge = %this-->hullMergeThreshold.getValue(); %concavity = %this-->hullConcaveThreshold.getValue(); @@ -3015,7 +3025,7 @@ function ShapeEdColWindow::editCollisionOK( %this ) %maxSphere = %this-->hullMaxSphereError.getValue(); %maxCapsule = %this-->hullMaxCapsuleError.getValue(); - ShapeEditor.doEditCollision( %type, %target, %depth, %merge, %concavity, %maxVerts, + ShapeEditor.doEditCollision( %type, %target, %fillMode, %depth, %merge, %concavity, %maxVerts, %maxBox, %maxSphere, %maxCapsule ); } diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript index f3c27f8a3..09168cbca 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript @@ -1046,7 +1046,7 @@ function ActionAddMeshFromFile::undo( %this ) //------------------------------------------------------------------------------ // Add/edit collision geometry -function ShapeEditor::doEditCollision( %this, %type, %target, %depth, %merge, %concavity, +function ShapeEditor::doEditCollision( %this, %type, %target, %fillMode, %depth, %merge, %concavity, %maxVerts, %boxMax, %sphereMax, %capsuleMax ) { %colData = ShapeEdColWindow.lastColSettings; @@ -1062,6 +1062,7 @@ function ShapeEditor::doEditCollision( %this, %type, %target, %depth, %merge, %c %action.oldBoxMax = getField( %colData, 6 ); %action.oldSphereMax = getField( %colData, 7 ); %action.oldCapsuleMax = getField( %colData, 8 ); + %action.oldFillMode = getField(%colData, 9); %action.newType = %type; %action.newTarget = %target; @@ -1072,50 +1073,33 @@ function ShapeEditor::doEditCollision( %this, %type, %target, %depth, %merge, %c %action.newBoxMax = %boxMax; %action.newSphereMax = %sphereMax; %action.newCapsuleMax = %capsuleMax; + %action.newFillMode = %fillMode; %this.doAction( %action ); } -function ActionEditCollision::updateCollision( %this, %type, %target, %depth, %merge, %concavity, +function ActionEditCollision::updateCollision( %this, %type, %target, %fillMode, %depth, %merge, %concavity, %maxVerts, %boxMax, %sphereMax, %capsuleMax ) { %colDetailSize = -1; %colNode = "Col" @ %colDetailSize; - + %colData = ShapeEdColWindow.lastColSettings; + %oldTarget = getField( %colData, 1 ); // TreeView items are case sensitive, but TSShape names are not, so fixup case // if needed %index = ShapeEditor.shape.getNodeIndex( %colNode ); if ( %index != -1 ) %colNode = ShapeEditor.shape.getNodeName( %index ); - // First remove the old detail and collision nodes - %meshList = ShapeEditor.getDetailMeshList( %colDetailSize ); - %meshCount = getFieldCount( %meshList ); - if ( %meshCount > 0 ) - { - ShapeEditor.shape.removeDetailLevel( %colDetailSize ); - for ( %i = 0; %i < %meshCount; %i++ ) - ShapeEdPropWindow.update_onMeshRemoved( getField( %meshList, %i ) ); - } - - %nodeList = ShapeEditor.getNodeNames( %colNode, "" ); - %nodeCount = getFieldCount( %nodeList ); - if ( %nodeCount > 0 ) - { - for ( %i = 0; %i < %nodeCount; %i++ ) - ShapeEditor.shape.removeNode( getField( %nodeList, %i ) ); - ShapeEdPropWindow.update_onNodeRemoved( %nodeList, %nodeCount ); - } - // Add the new node and geometry if ( %type $= "" ) return; - + if ( !ShapeEditor.shape.addCollisionDetail( %colDetailSize, %type, %target, %depth, %merge, %concavity, %maxVerts, - %boxMax, %sphereMax, %capsuleMax ) ) + %boxMax, %sphereMax, %capsuleMax, %fillMode) ) return false; - + // Update UI %meshList = ShapeEditor.getDetailMeshList( %colDetailSize ); ShapeEdPropWindow.update_onNodeAdded( %colNode, ShapeEditor.shape.getNodeCount() ); // will also add child nodes @@ -1124,7 +1108,7 @@ function ActionEditCollision::updateCollision( %this, %type, %target, %depth, %m ShapeEdPropWindow.update_onMeshAdded( getField( %meshList, %i ) ); ShapeEdColWindow.lastColSettings = %type TAB %target TAB %depth TAB %merge TAB - %concavity TAB %maxVerts TAB %boxMax TAB %sphereMax TAB %capsuleMax; + %concavity TAB %maxVerts TAB %boxMax TAB %sphereMax TAB %capsuleMax TAB %fillMode ; ShapeEdColWindow.update_onCollisionChanged(); return true; @@ -1133,7 +1117,7 @@ function ActionEditCollision::updateCollision( %this, %type, %target, %depth, %m function ActionEditCollision::doit( %this ) { ShapeEdWaitGui.show( "Generating collision geometry..." ); - %success = %this.updateCollision( %this.newType, %this.newTarget, %this.newDepth, %this.newMerge, + %success = %this.updateCollision( %this.newType, %this.newTarget, %this.newFillMode, %this.newDepth, %this.newMerge, %this.newConcavity, %this.newMaxVerts, %this.newBoxMax, %this.newSphereMax, %this.newCapsuleMax ); ShapeEdWaitGui.hide(); @@ -1146,7 +1130,7 @@ function ActionEditCollision::undo( %this ) Parent::undo( %this ); ShapeEdWaitGui.show( "Generating collision geometry..." ); - %this.updateCollision( %this.oldType, %this.oldTarget, %this.oldDepth, %this.oldMerge, + %this.updateCollision( %this.oldType, %this.oldTarget, %this.oldFillMode, %this.oldDepth, %this.oldMerge, %this.oldConcavity, %this.oldMaxVerts, %this.oldBoxMax, %this.oldSphereMax, %this.oldCapsuleMax ); ShapeEdWaitGui.hide();