// =========================================================================== // 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 bulletSoftBody node. // global proc callUpdateSoftbodyUI( string $nodeName ) { python "import maya.app.mayabullet.SoftBodyUI"; python ("maya.app.mayabullet.SoftBodyUI.updateSoftBodyUI( \"" + $nodeName + "\" )"); } global proc AEbulletSoftBodyShapeTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; // Add attrs editorTemplate -beginLayout (uiRes("m_AEbulletSoftBodyShapeTemplate.kSBConstruction")) -collapse false; string $inputMesh = (uiRes("m_AEbulletSoftBodyShapeTemplate.kInputMesh")); editorTemplate -callCustom ("AEinputNew \"" + $inputMesh + "\"") ("AEinputReplace \"" + $inputMesh + "\"") "inWorldMesh"; editorTemplate -addControl generateBendConstraints callUpdateSoftbodyUI; editorTemplate -interruptOptimize; editorTemplate -addControl selfCollision; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbulletSoftBodyShapeTemplate.kSBProperties")) -collapse false; editorTemplate -addControl bendResistance; editorTemplate -addControl linearStiffness; editorTemplate -addControl friction; editorTemplate -addControl damping; editorTemplate -addControl mass; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbulletSoftBodyShapeTemplate.kAero")) -collapse true; editorTemplate -addControl pressure; editorTemplate -addControl drag; editorTemplate -addControl lift; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbulletSoftBodyShapeTemplate.kPoseMatching")) -collapse true; editorTemplate -addControl enableShapeMatching callUpdateSoftbodyUI;; editorTemplate -addControl shapeCoefficient; editorTemplate -addControl enableVolumeMatching callUpdateSoftbodyUI;; editorTemplate -addControl volumeCoefficient; editorTemplate -addControl maxVolumeRatio; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbulletSoftBodyShapeTemplate.kContacts")) -collapse true; editorTemplate -addControl rigidContactHardness; editorTemplate -addControl kineticContactHardness; editorTemplate -addControl softContactHardness; editorTemplate -addControl anchorContactHardness; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEbulletSoftBodyShapeTemplate.kSBSolver")) -collapse true; editorTemplate -addControl collisionMargin; editorTemplate -addControl positionIterations; //editorTemplate -addControl velocityCorrection; obsolete editorTemplate -endLayout; //editorTemplate -beginLayout "Initial Conditions" -collapse false; //editorTemplate -addControl TBD; //editorTemplate -endLayout; // == Inherit == AEbulletShapeTemplate( $nodeName ); // System Properties editorTemplate -beginLayout (uiRes("m_AEbulletSoftBodyShapeTemplate.kDynamicsSystem")) -collapse true; string $solvedMesh = (uiRes("m_AEbulletSoftBodyShapeTemplate.kSolvedMesh")); editorTemplate -callCustom ("AEinputNew \"" + $solvedMesh + "\"") ("AEinputReplace \"" + $solvedMesh + "\"") "outSolvedMesh"; string $solver = (uiRes("m_AEbulletSoftBodyShapeTemplate.kSolver")); editorTemplate -callCustom ("AEinputNew \"" + $solver + "\"") ("AEinputReplace \"" + $solver + "\"") "solverInitialized"; editorTemplate -endLayout; // Suppress editorTemplate -suppress solverInitialized; editorTemplate -suppress solverUpdated; editorTemplate -suppress startTime; editorTemplate -suppress currentTime; editorTemplate -suppress collisionFilterGroup; editorTemplate -suppress collisionFilterMask; editorTemplate -suppress particleMass; // Inherit AEshapeTemplate( $nodeName ); // == Footer == editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }