Skip to content

Commit

Permalink
fixup! RenderPassEditor : Add Rename Render Pass menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
murraystevenson committed Jan 30, 2025
1 parent 8edae92 commit 42b68dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/GafferSceneUI/RenderPassEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ def __renameSelectedRenderPass( self ) :
confirmLabel = "Rename",
actionDescription = "Rename render pass in",
defaultName = selectedRenderPasses[0],
warning = "<h4>Renaming will only update the current edit scope.</h4>\nEdits elsewhere in the node graph will need to be manually updated."
message = "<h4>Renaming will only affect the current edit scope.</h4>\nReferences elsewhere in the node graph may need to be updated manually."
)

renderPassName = dialogue.waitForRenderPassName( parentWindow = self.ancestor( GafferUI.Window ) )
Expand Down Expand Up @@ -931,7 +931,7 @@ def __drop( self, widget, event ) :

class _RenderPassCreationDialogue( GafferUI.Dialogue ) :

def __init__( self, existingNames = [], editScope = None, title = "Add Render Pass", cancelLabel = "Cancel", confirmLabel = "Add", actionDescription = "Add render pass to", defaultName = "", warning = "", **kw ) :
def __init__( self, existingNames = [], editScope = None, title = "Add Render Pass", cancelLabel = "Cancel", confirmLabel = "Add", actionDescription = "Add render pass to", defaultName = "", message = "", **kw ) :

GafferUI.Dialogue.__init__( self, title, sizeMode=GafferUI.Window.SizeMode.Fixed, **kw )

Expand All @@ -947,11 +947,11 @@ def __init__( self, existingNames = [], editScope = None, title = "Add Render Pa
GafferUI.Image.createSwatch( editScopeColor )
GafferUI.Label( "<h4>{}</h4>".format( editScope.relativeName( editScope.ancestor( Gaffer.ScriptNode ) ) ) )

if warning != "" :
lines = warning.split( "\n" )
if message != "" :
lines = message.split( "\n" )
with GafferUI.ListContainer( GafferUI.ListContainer.Orientation.Vertical, spacing = 4 ) :
with GafferUI.ListContainer( GafferUI.ListContainer.Orientation.Horizontal, spacing = 4 ) :
GafferUI.Image( "warningSmall.png" )
GafferUI.Image( "infoSmall.png" )
GafferUI.Label( "{}".format( lines[0] ) )
for line in lines[1:] :
GafferUI.Label( "{}".format( line ) )
Expand Down

0 comments on commit 42b68dc

Please sign in to comment.