// =========================================================================== // 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. // =========================================================================== // // Procedure Name: // AEplace2dTextureTemplate // // Description Name; // Creates the attribute editor controls for the place2dTexture Node // // Input Value: // nodeName // // Output Value: // None // global proc AEplace2dTextureTemplate ( string $nodeName ) { AEswatchDisplay $nodeName; editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEplace2dTextureTemplate.kTwoDTexturePlacementAttr")) -collapse 0; editorTemplate -callCustom "AEnewPlace2dTxContext" "AEreplacePlace2dTxContext" ""; editorTemplate -addControl "coverage"; editorTemplate -addControl "translateFrame"; editorTemplate -addControl "rotateFrame"; editorTemplate -addControl "mirrorU"; editorTemplate -addControl "mirrorV"; editorTemplate -addControl "wrapU"; editorTemplate -addControl "wrapV"; editorTemplate -addControl "stagger"; editorTemplate -addControl "repeatUV"; editorTemplate -addControl "offset"; editorTemplate -addControl "rotateUV"; editorTemplate -addControl "noiseUV"; editorTemplate -addControl "fast"; editorTemplate -endLayout; // include/call base class/node attributes AEdependNodeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; } global proc AEnewPlace2dTxContext(string $attrNodeName) { setUITemplate -pst attributeEditorTemplate; rowLayout -nc 2; text -label ""; button -label (uiRes("m_AEplace2dTextureTemplate.kInteractivePlacement")) contextButton; setParent ..; setUITemplate -ppt; AEreplacePlace2dTxContext($attrNodeName); } global proc AEreplacePlace2dTxContext(string $attrNodeName) { string $nodeName[]; tokenize($attrNodeName, ".", $nodeName); button -e -c ("select -r "+$nodeName[0]+ "; setToolTo defaultTexturePlacementContext;") contextButton; } global proc PPmirrorU(string $plug, string $attr, string $label) { string $checkBox = `checkBoxGrp -numberOfCheckBoxes 2 -labelArray2 $attr "" mirrorCheckBoxGrp`; connectControl -index 2 $checkBox $plug; } global proc PPmirrorV(string $plug, string $attr, string $label) { checkBoxGrp -e -label2 $attr mirrorCheckBoxGrp; connectControl -index 3 mirrorCheckBoxGrp $plug; } global proc PPwrapU(string $plug, string $attr, string $label) { string $checkBox = `checkBoxGrp -numberOfCheckBoxes 2 -labelArray2 $attr "" wrapCheckBoxGrp`; connectControl -index 2 $checkBox $plug; } global proc PPwrapV(string $plug, string $attr, string $label) { checkBoxGrp -e -label2 $attr wrapCheckBoxGrp; connectControl -index 3 wrapCheckBoxGrp $plug; } global proc PPstagger(string $plug, string $attr, string $label) { string $checkBox = `checkBoxGrp -numberOfCheckBoxes 1 -label1 $attr staggerCheckBoxGrp`; connectControl -index 2 $checkBox $plug; }