Skip to content

Commit

Permalink
UIEditor : Never edit user plug for Box nodes.
Browse files Browse the repository at this point in the history
We only want the user to edit plugs directly on the box, so that the user plug is available to downstream users of References (and one day gizmo type things). But we were trying to provide help for old boxes by editing the user plugs instead if they'd been used previously. This isn't working out, so we're removing that fallback, and will provide a separate means of upgrading old boxes internally at IE.
  • Loading branch information
johnhaddon authored and davidsminor committed Sep 1, 2015
1 parent 76b2f4d commit 174c653
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/GafferUI/UIEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,12 @@ def __updateFromSetInternal( self, lazy=True ) :
self.__sectionEditor.setPlugParent( None )
else :
plugParent = self.__node["user"]
if isinstance( self.__node, Gaffer.Box ) and not len( plugParent ) :
if isinstance( self.__node, Gaffer.Box ) :
# For Boxes we want the user to edit the plugs directly
# parented to the Box, because that is where promoted plugs go,
# and because we want to leave the "user" plug empty so that it
# is available for use by the user on Reference nodes once a Box has
# been exported and referenced. We make a small concession to old-skool
# boxes (where we mistakenly used to promote to the "user" plug) by
# editing the user plugs instead if any exist.
# been exported and referenced.
plugParent = self.__node
self.__plugListing.setPlugParent( plugParent )
self.__sectionEditor.setPlugParent( plugParent )
Expand Down

0 comments on commit 174c653

Please sign in to comment.