// =========================================================================== // 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: 17 June 2005 // // Description: // Define the Toon shelf. // global proc shelf_Toon () { global string $gBuffStr; global string $gBuffStr0; global string $gBuffStr1; string $label; string $annot; string $format = "^1s: ^2s"; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kSolidColorAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kSolidColor")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonSolid.png" -image1 "toonSolid.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignToonShader \"solid\"" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kLightAngleTwoToneAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kLightAngleTwoTone")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonLightAngle2.png" -image1 "toonLightAngle2.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignToonShader \"lightAngle\"" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kShadedBrightnessTwoToneAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kShadedBrightnessTwoTone")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonBrightness2.png" -image1 "toonBrightness2.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignToonShader \"shadedBrightness\"" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kShadedBrightnessThreeToneAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kShadedBrightnessThreeTone")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonBrightness3.png" -image1 "toonBrightness3.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignToonShader \"threeToneBrightness\"" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kDarkProfileAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kDarkProfile")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonDarkProfile.png" -image1 "toonDarkProfile.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignToonShader \"darkProfile\"" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kRimLightAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kRimLight")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonRimLight.png" -image1 "toonRimLight.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignToonShader \"rimLight\"" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kCircleHighlightAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kCircleHighlight")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonCircleHigh.png" -image1 "toonCircleHigh.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignToonShader \"circleHighlight\"" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kAddNewToonOutlineAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kAddNewToonOutline")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonAddOutline.png" -image1 "toonAddOutline.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignNewPfxToon" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kRemoveCurrentToonOutlinesAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kRemoveCurrentToonOutlines")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonRemoveOutline.png" -image1 "toonRemoveOutline.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "removePfxToonOutlines" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kCreateModifierAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kCreateModifier")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonLineModifier.png" -image1 "toonLineModifier.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "createLineModifier" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kPerspAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kPersp")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonPerspBackground.png" -image1 "toonPerspBackground.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "editAttributeColor persp.backgroundColor" ; $label = (uiRes("m_shelf_Toon.kGetToonExample")) ; $annot = getRunTimeCommandAnnotation("GetToonExample") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -align "center" -labelOffset 0 -font "tinyBoldLabelFont" -image "toonGetExample.png" -image1 "toonGetExample.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "GetToonExample" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kReverseSurfacesAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kReverseSurfaces")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonReverseSurfaces.png" -image1 "toonReverseSurfaces.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "reverseToonObjects 0" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kAssignPaintEffectsBrushAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kAssignPaintEffectsBrush")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonAssignPfxBrush.png" -image1 "toonAssignPfxBrush.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "assignBrushToPfxToon" ; $label = (uiRes("m_shelf_Toon.kConvertToonToPolygons")) ; $annot = getRunTimeCommandAnnotation("PaintEffectsToPoly") ; shelfButton -label $label -annotation `format -s $label -s $annot $format` -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -align "center" -labelOffset 0 -font "tinyBoldLabelFont" -image "toonToPolygons.png" -image1 "toonToPolygons.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "PaintEffectsToPoly" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kLineWidthAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kLineWidth")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonPaintWidth.png" -image1 "toonPaintWidth.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "paintToonAttribute \"lineWidthMap\" \"Line Width\"" ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kLineOffsetAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kLineOffset")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonPaintOffset.png" -image1 "toonPaintOffset.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "paintToonAttribute \"lineOffsetMap\" \"Line Offset\" " ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kLineOpacityAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kLineOpacity")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonPaintOpacity.png" -image1 "toonPaintOpacity.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "paintToonAttribute \"lineOpacityMap\" \"Line Opacity\" " ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kProfileColorAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kProfileColor")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonPaintProfileColor.png" -image1 "toonPaintProfileColor.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "paintToonAttribute \"profileColor\" \"Profile Color\" " ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kCreaseColorAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kCreaseColor")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonPaintCreaseColor.png" -image1 "toonPaintCreaseColor.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "paintToonAttribute \"creaseColor\" \"Crease Color\" " ; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -annotation (uiRes("m_shelf_Toon.kBorderColorAnnot")) -align "center" -label (uiRes("m_shelf_Toon.kBorderColor")) -labelOffset 0 -font "tinyBoldLabelFont" -image "toonPaintBorderColor.png" -image1 "toonPaintBorderColor.png" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "paintToonAttribute \"borderColor\" \"Border Color\" " ; }