// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // Description: // Define the appearance of the attribute editor for the bulletInitialState node. // global proc callUpdateNeverSleep( string $nodeName ) { /* Called when the attribute editor UI for the rigid body needs to be updated to reflect the latest attribute values. Enables and disables controls. */ $neverSleeps = getAttr($nodeName+".neverSleeps"); editorTemplate -dimControl $nodeName "initiallySleeping" $neverSleeps; } global proc AEbulletInitialStateTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEbulletInitialStateTemplate.kRigidAttributes")); editorTemplate -addControl "defaultMass"; editorTemplate -addControl "linearDamping"; editorTemplate -addControl "angularDamping"; editorTemplate -addControl "friction"; editorTemplate -addControl "restitution"; editorTemplate -endLayout; // Initial Conditions editorTemplate -beginLayout (uiRes("m_AEbulletInitialStateTemplate.kInitConditions")) -collapse true; editorTemplate -addControl "neverSleeps" callUpdateNeverSleep; editorTemplate -addControl "initiallySleeping"; editorTemplate -addControl "initialVelocity"; editorTemplate -addControl "initialAngularVelocity"; editorTemplate -ann (uiRes("m_AEbulletInitialStateTemplate.kGlueShapes")) -addControl "glueShapes"; editorTemplate -ann (uiRes("m_AEbulletInitialStateTemplate.kBreakThreshold")) -addControl "glueBreakingThreshold"; editorTemplate -label (uiRes("m_AEbulletInitialStateTemplate.kGlueMaxConstraintsPerBodyLabel")) -ann (uiRes("m_AEbulletInitialStateTemplate.kGlueMaxConstraintsPerBody")) -addControl "glueMaxConstraintsPerBody"; editorTemplate -endLayout; /* WANT_BULLET_RIGIDSET_IMPULSE // Forces/Impulses editorTemplate -beginLayout (uiRes("m_AEbulletInitialStateTemplate.kForces")) -collapse true; editorTemplate -addControl impulse; editorTemplate -addControl impulsePosition; editorTemplate -addControl torqueImpulse; editorTemplate -endLayout; */ // Collider Attributes editorTemplate -beginLayout (uiRes("m_AEbulletInitialStateTemplate.kCollisionAttributes")); editorTemplate -addControl "collisionShapeType"; editorTemplate -addControl "collisionFilterGroup"; editorTemplate -addControl "collisionFilterMask"; editorTemplate -ann (uiRes("m_AEbulletInitialStateTemplate.kCollisionShapeMargin")) -addControl "collisionShapeMargin"; editorTemplate -endLayout; // include/call base class/node attributes AEsurfaceShapeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; editorTemplate -suppress "solver"; editorTemplate -suppress "solvedState"; editorTemplate -suppress "collisionOffsetVelocityIncrement"; editorTemplate -suppress "collisionDepthVelocityIncrement"; editorTemplate -suppress "collisionOffsetVelocityMultiplier"; editorTemplate -suppress "collisionDepthVelocityMultiplier"; editorTemplate -suppress "bodyType"; // hidden this attribute }