// =========================================================================== // 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: 99 // // // Description: // This creates a window with a slider set the blend factor on // brush preset selection // global proc setPresetBrushShadeBlend( float $val) { global float $gPresetBrushShadeBlend; $gPresetBrushShadeBlend = $val * .01; } global proc setPresetBrushShapeBlend( float $val) { global float $gPresetBrushShapeBlend; $gPresetBrushShapeBlend = $val * .01; // floatSliderGrp -e -v $val presetBlendShapewidget; } global proc brushPresetBlendWin() { global int $gPresetBlending; global float $gPresetBrushShadeBlend; global float $gPresetBrushShapeBlend; // Make sure the Generate menu is created global string $gMainGenerateMenu; if(`menu -q -ni $gMainGenerateMenu` == 0) { buildCreatorMenu($gMainGenerateMenu); } $gPresetBlending = 1; menuItem -e -cb 1 presetBlendMenu; if ( !`window -ex brushPresetBlendWnd` ) { window -rtf 1 -title (uiRes("m_brushPresetBlendWin.kBrushPresetBlend")) -in (uiRes("m_brushPresetBlendWin.kBrushPresetIconName")) -menuBar 0 -s 1 brushPresetBlendWnd; setParent brushPresetBlendWnd; formLayout brushPresetBlendform; rowLayout -nc 1 -cw 1 120 brushPresetBlendrow1; setParent brushPresetBlendform; columnLayout brushPresetBlendcol; floatSliderGrp -label (uiRes("m_brushPresetBlendWin.kShading")) -field 1 -min 0.0 -max 100.0 -pre 1 -v ($gPresetBrushShadeBlend * 100) -dc "setPresetBrushShadeBlend #1" -cc "setPresetBrushShadeBlend #1" presetBlendShadewidget; floatSliderGrp -label (uiRes("m_brushPresetBlendWin.kShape")) -field 1 -min 0.0 -max 100.0 -pre 1 -v ($gPresetBrushShapeBlend * 100) -dc "setPresetBrushShapeBlend #1" -cc "setPresetBrushShapeBlend #1" presetBlendShapewidget; formLayout -e -af brushPresetBlendcol top 3 -af brushPresetBlendcol left 3 -af brushPresetBlendcol right 3 -af brushPresetBlendcol bottom 3 brushPresetBlendform; } showWindow brushPresetBlendWnd; }