diff --git a/python/GafferSceneUI/_HistoryWindow.py b/python/GafferSceneUI/_HistoryWindow.py index b4fc39f5a5..5a1948d4fa 100644 --- a/python/GafferSceneUI/_HistoryWindow.py +++ b/python/GafferSceneUI/_HistoryWindow.py @@ -79,21 +79,17 @@ def headerData( self, canceller = None ) : class _NodeNameColumn( GafferUI.PathColumn ) : - def __init__( self, title, property, scriptNode ) : + def __init__( self, title, property ) : GafferUI.PathColumn.__init__( self ) self.__title = title self.__property = property - self.__scriptNode = scriptNode def cellData( self, path, canceller = None ) : - cellValue = path.property( self.__property ) - - data = self.CellData( cellValue.relativeName( self.__scriptNode ) ) - - return data + node = path.property( self.__property ) + return self.CellData( node.relativeName( node.scriptNode() ) ) def headerData( self, canceller = None ) : @@ -136,9 +132,7 @@ def headerData( self, canceller = None ) : class _HistoryWindow( GafferUI.Window ) : - def __init__( self, inspector, scenePath, context, scriptNode, title=None, **kw ) : - - assert( isinstance( scriptNode, Gaffer.ScriptNode ) ) + def __init__( self, inspector, scenePath, context, title=None, **kw ) : if title is None : title = "History" @@ -147,13 +141,12 @@ def __init__( self, inspector, scenePath, context, scriptNode, title=None, **kw self.__inspector = inspector self.__scenePath = scenePath - self.__scriptNode = scriptNode with self : self.__pathListingWidget = GafferUI.PathListingWidget( Gaffer.DictPath( {}, "/" ), columns = ( - _NodeNameColumn( "Node", "history:node", self.__scriptNode ), + _NodeNameColumn( "Node", "history:node" ), _ValueColumn( "Value", "history:value", "history:fallbackValue" ), _OperationIconColumn( "Operation", "history:operation" ), ), @@ -291,7 +284,7 @@ def __updateFinished( self, pathListing ) : # The node and all of its parents up to the script node # contribute to the path name. - while node is not self.__scriptNode and node is not None : + while node is not None and not isinstance( node, Gaffer.ScriptNode ) : self.__nodeNameChangedSignals.append( node.nameChangedSignal().connect( Gaffer.WeakMethod( self.__nodeNameChanged ), diff --git a/python/GafferSceneUI/_InspectorColumn.py b/python/GafferSceneUI/_InspectorColumn.py index 490b954f9f..8f1e3d5b74 100644 --- a/python/GafferSceneUI/_InspectorColumn.py +++ b/python/GafferSceneUI/_InspectorColumn.py @@ -342,7 +342,6 @@ def __showHistory( pathListing ) : column.inspector(), pathString, inspectionContext, - pathListing.ancestor( GafferUI.Editor ).scriptNode(), "History : {} : {}".format( pathString, column.headerData().value ) ) pathListing.ancestor( GafferUI.Window ).addChildWindow( window, removeOnClose = True )