// =========================================================================== // 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. // =========================================================================== // // Script: AEcolorRemapNew.mel // // SYNOPSIS // Creates a color re-map button on a texture. // global proc AEcolorRemapPointer ( string $outColor ) { string $rgbToHsvNode[] = `listConnections $outColor`; if (`attributeQuery -exists -node $rgbToHsvNode[0] outHsvH `) { string $remapRamp[] = `listConnections ($rgbToHsvNode[0] + ".outHsvH")`; select $remapRamp[0]; editSelected; } } global proc AEcolorRemapNew (string $outColor) // // Description: // Setup up button that makes a color reamp network. // { setUITemplate -pst attributeEditorTemplate; rowLayout -nc 3 ;//-cat 3 both 0 -cal 3 center; text -label (uiRes("m_AEcolorRemapNew.kColorRemap")) ; button -label (uiRes("m_AEcolorRemapNew.kInsert")) -c ("AEcolorRemap " + $outColor) colorRemapControl; symbolButton -i "inArrow.png" -c ("AEcolorRemapPointer " + $outColor) colorRemapPointer; setParent ..; setUITemplate -ppt; } // // Procedure Name: // AEspotLightFogReplace // // global proc AEcolorRemapReplace (string $outColor) // // Description: // Replace the button with the command to create a color // remap for this texture. // { button -e -c ("AEcolorRemap " + $outColor) colorRemapControl; symbolButton -e -c ("AEcolorRemapPointer " + $outColor) colorRemapPointer; }