Skip to content

Commit

Permalink
fixup! VisualiserTool : Add visualiser modes
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmehl committed Jan 27, 2025
1 parent 2c0c92c commit be2fd8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions include/GafferSceneUI/Private/VisualiserTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class GAFFERSCENEUI_API VisualiserTool : public SelectionTool
enum class Mode
{
Auto,
ColorTypeRange,
ColorManualRange,
ColorAutoRange,
Color,
VertexLabel,

First = Auto,
Expand Down
10 changes: 5 additions & 5 deletions python/GafferSceneUI/VisualiserToolUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"order", 8,
"tool:exclusive", False,

"toolbarLayout:activator:modeIsColorManualRange", lambda node : node["mode"].getValue() == GafferSceneUI.VisualiserTool.Mode.ColorManualRange,
"toolbarLayout:activator:modeIsColor", lambda node : node["mode"].getValue() == GafferSceneUI.VisualiserTool.Mode.Color,

plugs = {

Expand Down Expand Up @@ -115,8 +115,8 @@
""",

"preset:Auto", GafferSceneUI.VisualiserTool.Mode.Auto,
"preset:Color (Type Range)", GafferSceneUI.VisualiserTool.Mode.ColorTypeRange,
"preset:Color (Manual Range)", GafferSceneUI.VisualiserTool.Mode.ColorManualRange,
"preset:Color (Auto Range)", GafferSceneUI.VisualiserTool.Mode.ColorAutoRange,
"preset:Color", GafferSceneUI.VisualiserTool.Mode.Color,
"preset:Vertex Label", GafferSceneUI.VisualiserTool.Mode.VertexLabel,

"plugValueWidget:type", "GafferUI.PresetsPlugValueWidget",
Expand All @@ -138,7 +138,7 @@
"toolbarLayout:section", "Bottom",
"toolbarLayout:width", 175,

"toolbarLayout:visibilityActivator", "modeIsColorManualRange",
"toolbarLayout:visibilityActivator", "modeIsColor",

],
"valueMax" : [
Expand All @@ -154,7 +154,7 @@
"toolbarLayout:section", "Bottom",
"toolbarLayout:width", 175,

"toolbarLayout:visibilityActivator", "modeIsColorManualRange",
"toolbarLayout:visibilityActivator", "modeIsColor",

],
"size": [
Expand Down
4 changes: 2 additions & 2 deletions src/GafferSceneUIModule/ToolBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ void GafferSceneUIModule::bindTools()

enum_<VisualiserTool::Mode>( "Mode" )
.value( "Auto", VisualiserTool::Mode::Auto )
.value( "ColorTypeRange", VisualiserTool::Mode::ColorTypeRange )
.value( "ColorManualRange", VisualiserTool::Mode::ColorManualRange )
.value( "ColorAutoRange", VisualiserTool::Mode::ColorAutoRange )
.value( "Color", VisualiserTool::Mode::Color )
.value( "VertexLabel", VisualiserTool::Mode::VertexLabel )
;
}
Expand Down

0 comments on commit be2fd8f

Please sign in to comment.