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 3d73663 commit ae00e62
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 @@ -1145,7 +1145,7 @@ def __snapshotCataloguesSubMenu( view, scriptNode ) :
)

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

for c in catalogueList :
Expand All @@ -1158,6 +1158,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 ae00e62

Please sign in to comment.