// =========================================================================== // 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. // =========================================================================== // // // Creation Date: December 2, 1998 // // Procedure Name: // AEgeoConnectorTemplate // // Description Name; // Creates the attribute editor controls for the geoConnector node // // Input Value: // nodeName // // Output Value: // None // global proc disableAttrsForFluid( string $nodeName ) { string $destinations[]; $destinations = `connectionInfo -destinationFromSource ($nodeName + ".sweptGeometry")`; for( $destination in $destinations) { if(`nodeType $destination` == "fluidShape") continue; editorTemplate -dimControl $nodeName "resilience" false; editorTemplate -dimControl $nodeName "friction" false; return; } editorTemplate -dimControl $nodeName "resilience" true; editorTemplate -dimControl $nodeName "friction" true; } global proc disableOffsetForNonParticles( string $nodeName ) { string $dest[] = `connectionInfo -destinationFromSource ($nodeName+".sweptGeometry")`; for( $d in $dest ) { editorTemplate -dimControl $nodeName "offset" (`nodeType $d` != "particle"); } } global proc AEgeoConnectorTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEgeoConnectorTemplate.kGeoConnectorAttributes")) -collapse 0; editorTemplate -addControl "tessellationFactor" "disableAttrsForFluid"; editorTemplate -addControl "resilience"; editorTemplate -addControl "friction"; editorTemplate -addControl "offset" "disableOffsetForNonParticles"; editorTemplate -endLayout; // suppressed attributes // editorTemplate -suppress "currentTime"; editorTemplate -suppress "nodeState"; editorTemplate -suppress "caching"; editorTemplate -suppress "inputForce"; // include/call base class/node attributes editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }