diff --git a/Changes.md b/Changes.md index 56480dd77d5..4bf78f08496 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,11 @@ +1.1.9.x (relative to 1.1.9.1) +======= + +Fixes +----- + +- Tweak nodes : Fixed bugs which prevented the creation of new tweaks when an existing tweak had an input connection. + 1.1.9.1 (relative to 1.1.9.0) ======= diff --git a/python/GafferSceneUI/AttributeTweaksUI.py b/python/GafferSceneUI/AttributeTweaksUI.py index 9ed9dcb3774..fe4cfd43d10 100644 --- a/python/GafferSceneUI/AttributeTweaksUI.py +++ b/python/GafferSceneUI/AttributeTweaksUI.py @@ -183,7 +183,10 @@ def __init__( self, plug ) : def _updateFromPlug( self ) : - self.__button.setEnabled( self._editable() ) + # Not using `_editable()` as it considers the whole plug to be non-editable if + # any child has an input connection, but that shouldn't prevent us adding a new + # tweak. + self.__button.setEnabled( self.getPlug().getInput() is None and not Gaffer.MetadataAlgo.readOnly( self.getPlug() ) ) def __menuDefinition( self ) : diff --git a/python/GafferSceneUI/CameraTweaksUI.py b/python/GafferSceneUI/CameraTweaksUI.py index 26c8d479abf..1cb0a63b5a2 100644 --- a/python/GafferSceneUI/CameraTweaksUI.py +++ b/python/GafferSceneUI/CameraTweaksUI.py @@ -184,7 +184,10 @@ def __init__( self, plug ) : def _updateFromPlug( self ) : - self.__button.setEnabled( self._editable() ) + # Not using `_editable()` as it considers the whole plug to be non-editable if + # any child has an input connection, but that shouldn't prevent us adding a new + # tweak. + self.__button.setEnabled( self.getPlug().getInput() is None and not Gaffer.MetadataAlgo.readOnly( self.getPlug() ) ) def __menuDefinition( self ) : diff --git a/python/GafferSceneUI/OptionTweaksUI.py b/python/GafferSceneUI/OptionTweaksUI.py index 6921b447dc5..f9e47da6b91 100644 --- a/python/GafferSceneUI/OptionTweaksUI.py +++ b/python/GafferSceneUI/OptionTweaksUI.py @@ -143,7 +143,10 @@ def __init__( self, plug ) : def _updateFromPlug( self ) : - self.__button.setEnabled( self._editable() ) + # Not using `_editable()` as it considers the whole plug to be non-editable if + # any child has an input connection, but that shouldn't prevent us adding a new + # tweak. + self.__button.setEnabled( self.getPlug().getInput() is None and not Gaffer.MetadataAlgo.readOnly( self.getPlug() ) ) def __menuDefinition( self ) : diff --git a/python/GafferSceneUI/ShaderTweaksUI.py b/python/GafferSceneUI/ShaderTweaksUI.py index 6e1c412d44d..78d8d8efd05 100644 --- a/python/GafferSceneUI/ShaderTweaksUI.py +++ b/python/GafferSceneUI/ShaderTweaksUI.py @@ -234,7 +234,10 @@ def __init__( self, plug ) : def _updateFromPlug( self ) : - self.__button.setEnabled( self._editable() ) + # Not using `_editable()` as it considers the whole plug to be non-editable if + # any child has an input connection, but that shouldn't prevent us adding a new + # tweak. + self.__button.setEnabled( self.getPlug().getInput() is None and not Gaffer.MetadataAlgo.readOnly( self.getPlug() ) ) def __menuDefinition( self ) : diff --git a/python/GafferUI/ContextVariableTweaksUI.py b/python/GafferUI/ContextVariableTweaksUI.py index e2d78057329..0360316f0b7 100644 --- a/python/GafferUI/ContextVariableTweaksUI.py +++ b/python/GafferUI/ContextVariableTweaksUI.py @@ -121,7 +121,10 @@ def __init__( self, plug ) : def _updateFromPlug( self ) : - self.__button.setEnabled( self._editable() ) + # Not using `_editable()` as it considers the whole plug to be non-editable if + # any child has an input connection, but that shouldn't prevent us adding a new + # tweak. + self.__button.setEnabled( self.getPlug().getInput() is None and not Gaffer.MetadataAlgo.readOnly( self.getPlug() ) ) def __menuDefinition( self ) :