Skip to content

Commit

Permalink
fixup! SceneViewUI : Add "Send to Catalog" context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmehl committed Nov 15, 2023
1 parent 138bf09 commit e00cc40
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/GafferSceneUI/SceneViewUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ def __snapshotCataloguesSubMenu( view, scriptNode ) :
)

else :
snapshotDescription = __snapshotDescription( view )
commonDescription = __snapshotDescription( view )
commonActive = view["renderer"]["name"].getValue() != "OpenGL"

for c in catalogueList :
Expand All @@ -1149,6 +1149,13 @@ def __snapshotCataloguesSubMenu( view, scriptNode ) :
not Gaffer.MetadataAlgo.readOnly( c["images"].source() ) and
not Gaffer.MetadataAlgo.readOnly( c["imageIndex"].source() )
)

snapshotDescription = commonDescription
if Gaffer.MetadataAlgo.readOnly( c["images"].source() ) :
snapshotDescription = "\"images\" plug is read-only"
if Gaffer.MetadataAlgo.readOnly( c["imageIndex"].source() ) :
snapshotDescription = "\"imageIndex\" plug is read-only"

menuDefinition.append(
"/" + ( nName + ( " ({})".format( cName ) if cName else "" ) ),
{
Expand Down

0 comments on commit e00cc40

Please sign in to comment.