// =========================================================================== // 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: 28 June 1996 // // Description: // This procedure adds property sheet controls for // a new group of boolean attributes. This is for internal // use only. // // Input Arguments: // An array of names of plugs for the attributes // An array of names of the attributes // The number of attributes in the array // // Return Value: // The name of the newly-created control. // global proc string AEnewBooleanGroup ( string $plugNames[], string $attrNames[], string $changedCommand[], int $attrCount ) { setUITemplate -pushTemplate attributeEditorTemplate; string $createdControl; $createdControl = `formLayout`; checkBoxGrp -ncb $attrCount valueFld; checkBoxGrp -e -l1 $attrNames[0] valueFld; if ( $attrCount > 1 ) { checkBoxGrp -e -l2 $attrNames[1] valueFld; } if ( $attrCount > 2 ) { checkBoxGrp -e -l3 $attrNames[2] valueFld; } if ( $attrCount > 3 ) { checkBoxGrp -e -l4 $attrNames[3] valueFld; } formLayout -e -af valueFld top 0 -af valueFld left 0 -af valueFld right 0 -af valueFld bottom 0 $createdControl; // get a list of the sub-components of the checkboxgrp, // so that each scriptJob can be attached to a unique // component (making it easier to replace them in AEreplaceBoolean.mel) // string $subC[] = `layout -q -ca valueFld`; int $i,$j; string $buffer[]; tokenize($plugNames[0],".",$buffer); for ( $i = 0; $i < $attrCount; $i++ ) { $j = $i+2; connectControl -in $j valueFld $plugNames[$i]; if ($changedCommand[$i] != "") { string $cmd = $changedCommand[$i] + " \"" + $buffer[0] + "\""; scriptJob -p $subC[$i] -rp -ac $plugNames[$i] $cmd; } } setParent ..; setUITemplate -popTemplate; return $createdControl; }