Skip to content

Commit

Permalink
ContextVariablesTweaksUI : Start plug names at tweak0
Browse files Browse the repository at this point in the history
The `name` being passed to `__addTweak()` is always empty, so we never hit the original naming code, and ended up with the first plug being called `tweak` and the second being called `tweak1`. Starting with `tweak0` matches us up with the other tweaks nodes.
  • Loading branch information
johnhaddon committed Jul 6, 2023
1 parent 3a329c7 commit 3af6aa0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/GafferUI/ContextVariableTweaksUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ def __addTweak( self, name, plugTypeOrValue ) :
else :
plug = Gaffer.TweakPlug( name, plugTypeOrValue() )

if name :
plug.setName( name.replace( ':', '_' ) )
plug.setName( "tweak0" )

with Gaffer.UndoScope( self.getPlug().ancestor( Gaffer.ScriptNode ) ) :
self.getPlug().addChild( plug )

0 comments on commit 3af6aa0

Please sign in to comment.