Skip to content

Commit

Permalink
Merge pull request #4698 from johnhaddon/toolColorPlugFix
Browse files Browse the repository at this point in the history
ColorSwatchPlugValueWidget : Fix dialogue for Tool plugs
  • Loading branch information
ericmehl authored Jun 6, 2022
2 parents 07db256 + 50925d1 commit 24e36e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Fixes

- PlugLayout : Fixed visibility of collapsible layouts with nesting (#4694).
- Image Node Mix : Fixed incorrect results outside mask data window, and incorrect results when changing inputs.
- ColorSwatchPlugValueWidget : Fixed popup dialogue for plugs belonging to Tools.

0.61.11.0 (relative to 0.61.10.0)
=========
Expand Down
8 changes: 8 additions & 0 deletions python/GafferUI/ColorSwatchPlugValueWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ def acquire( cls, plugs ) :
plug = next( iter( plugs ) )

script = plug.node().scriptNode()
if script is None :
# Plug might be part of the UI rather than the node graph (e.g. a
# Tool or View setting). Find the script.
view = plug.ancestor( GafferUI.View )
if view is not None :
script = view["in"].getInput().node().scriptNode()

assert( script is not None )
scriptWindow = GafferUI.ScriptWindow.acquire( script )

for window in scriptWindow.childWindows() :
Expand Down

0 comments on commit 24e36e0

Please sign in to comment.