From eb24076e01ae4457e03e014e7f493709045fc094 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:53:19 -0800 Subject: [PATCH] Attribute metadata : Register `ui:scene:acceptsSetExpression` This enables the "Select Affected Objects" menu item in the Attribute Editor via the InspectorColumn context menu. --- Changes.md | 5 +++++ startup/GafferScene/arnoldAttributes.py | 1 + startup/GafferScene/standardAttributes.py | 1 + 3 files changed, 7 insertions(+) diff --git a/Changes.md b/Changes.md index db9e52b41d7..c8e850cf9f0 100644 --- a/Changes.md +++ b/Changes.md @@ -1,6 +1,11 @@ 1.5.x.x (relative to 1.5.3.0) ======= +Improvements +------------ + +- AttributeEditor : Added "Select Affected Objects" menu item to the "Linked Lights" and Arnold "Shadow Group" columns. + Fixes ----- diff --git a/startup/GafferScene/arnoldAttributes.py b/startup/GafferScene/arnoldAttributes.py index b4dc457a6a4..9d32a282c3e 100644 --- a/startup/GafferScene/arnoldAttributes.py +++ b/startup/GafferScene/arnoldAttributes.py @@ -73,6 +73,7 @@ contribute to illumination by default. """, ) +Gaffer.Metadata.registerValue( "attribute:ai:visibility:shadow_group", "ui:scene:acceptsSetExpression", True ) Gaffer.Metadata.registerValue( "attribute:ai:visibility:diffuse_reflect", "label", "Diffuse Reflection" ) Gaffer.Metadata.registerValue( "attribute:ai:visibility:diffuse_reflect", "defaultValue", IECore.BoolData( True ) ) diff --git a/startup/GafferScene/standardAttributes.py b/startup/GafferScene/standardAttributes.py index 13d8371ec5e..c33c43efd4c 100644 --- a/startup/GafferScene/standardAttributes.py +++ b/startup/GafferScene/standardAttributes.py @@ -152,6 +152,7 @@ all lights that contribute to illumination by default. """ ) +Gaffer.Metadata.registerValue( "attribute:linkedLights", "ui:scene:acceptsSetExpression", True ) Gaffer.Metadata.registerValue( "attribute:filteredLights", "label", "Filtered Lights" ) Gaffer.Metadata.registerValue( "attribute:filteredLights", "defaultValue", IECore.StringData( "" ) )