// =========================================================================== // 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. // =========================================================================== global proc MASHcheckVisibilitySettings ( string $nodeName ) { if ( `objExists $nodeName` == 0 ) return; string $nodeAttr = $nodeName + ".enableFrustum"; int $value = `getAttr $nodeAttr`; //fixed if ($value) { editorTemplate -dimControl $nodeName "frustumBorder" false; editorTemplate -dimControl $nodeName "useFilmGate" false; } else { editorTemplate -dimControl $nodeName "frustumBorder" true; editorTemplate -dimControl $nodeName "useFilmGate" true; } } global proc AEMASH_VisibilityTemplate( string $nodeName ) { editorTemplate -beginScrollLayout; python("import MASH.nodeHeaders; MASH.nodeHeaders.addHeader('" + $nodeName + "', 'Visibility')") editorTemplate -endLayout; editorTemplate -label (getPluginResource("MASH", "kRandStrength")) -addControl "randEnvelope"; editorTemplate -label (getPluginResource("MASH", "kStepStrength")) -addControl "StepEnvelope"; editorTemplate -label (getPluginResource("MASH", "kStrengthMap")) -addControl "mColour"; editorTemplate -label (getPluginResource("MASH", "kMapProjAxis")) -addControl "mapDirection"; editorTemplate -callCustom "MASHmapHelperButton" "MASHmapHelperButtonEdit" ""; editorTemplate -addSeparator; editorTemplate -label (getPluginResource("MASH", "kFilterOnSplit")) -addControl "stringVis"; editorTemplate -label (getPluginResource("MASH", "kFilterOffSplit")) -addControl "stringInvis"; editorTemplate -addSeparator; editorTemplate -label (getPluginResource("MASH", "kInvert")) -addControl "reverse"; editorTemplate -label (getPluginResource("MASH", "kRandSeed")) -addControl "seed"; editorTemplate -beginLayout (getPluginResource("MASH", "kFrustumFiltering")) -collapse 1; editorTemplate -bn; editorTemplate -label (getPluginResource("MASH", "kEnableFrustum")) -addControl "enableFrustum" "MASHcheckVisibilitySettings"; editorTemplate -label (getPluginResource("MASH", "kUseFilmGate")) -addControl "useFilmGate"; editorTemplate -label (getPluginResource("MASH", "kFrustumBorder")) -addControl "frustumBorder"; editorTemplate -callCustom "MASHvisCameraMatrixSingleInputBuildQt" "MASHvisCameraMatrixUpdateQt" ""; editorTemplate -en; editorTemplate -endLayout; editorTemplate -beginLayout (getPluginResource("MASH", "kFalloffObject")) -collapse 1; editorTemplate -callCustom "MASHfalloffButtons" "MASHfalloffButtonsEdit" ""; editorTemplate -endLayout; editorTemplate -endLayout; AEdependNodeTemplate $nodeName; editorTemplate -suppress "inIterations"; editorTemplate -suppress "randEnvelope"; editorTemplate -suppress "StepEnvelope"; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; } global proc MASHvisCameraMatrixSingleInputBuildQt(string $nodeName) { string $buffer[]; tokenize($nodeName, ".", $buffer); $nodeName = $buffer[0]; python("import MASHsingleInputQtWidget"); rowLayout -numberOfColumns 2 -columnWidth2 139 250 cameraMatrixLay; text -w 105 -h 20 -vis 1 -label (getPluginResource("MASH", "kDDCamera")) -align "right" -font "plainLabelFont" ; //get python to create the widget, include the desired nodeType as an arguement python("MASHsingleInputQtWidget.build_qt_widget('cameraMatrixLay', '" + $nodeName + "', 'camera', 'camera', 'worldMatrix', '')"); setParent..; } global proc MASHvisCameraMatrixUpdateQt(string $nodeName ) { string $buffer[]; tokenize($nodeName, ".", $buffer); $nodeName = $buffer[0]; python("import MASHsingleInputQtWidget"); python("MASHsingleInputQtWidget.update_qt_widget('cameraMatrixLay', '" + $nodeName + "', 'camera', 'camera', 'worldMatrix', '')"); }