diff --git a/Changes.md b/Changes.md index 89497319dcc..bc4b51bf7e8 100644 --- a/Changes.md +++ b/Changes.md @@ -8,6 +8,7 @@ Improvements - USD : Added automatic render-time translation of UsdPreviewSurface shaders to Cycles. - SetEditor : Added support for dragging a set name onto a node in the Graph Editor to create or modify a connected `SetFilter` node. Holding Shift while dragging will add to the set expression. Holding Control will remove from the set expression. Only set expressions with a simple list of sets are supported. Expressions with boolean or hierarchy operators are not supported. - GraphEditor : Improved pointer used to indicate when dropping a location would find the source node. +- RenderPassEditor : Added "Camera Inclusions" and "Camera Exclusions" columns, providing control over the camera visibility of scene locations in each render pass. Fixes ----- diff --git a/startup/GafferScene/standardOptions.py b/startup/GafferScene/standardOptions.py index b9acb555fdc..8ed308a977f 100644 --- a/startup/GafferScene/standardOptions.py +++ b/startup/GafferScene/standardOptions.py @@ -156,3 +156,27 @@ by this set expression. """ ) + +Gaffer.Metadata.registerValue( "option:render:cameraInclusions", "label", "Camera Inclusions" ) +Gaffer.Metadata.registerValue( "option:render:cameraInclusions", "defaultValue", IECore.StringData( "/" ) ) +Gaffer.Metadata.registerValue( + "option:render:cameraInclusions", + "description", + """ + A set expression that limits the objects visible to camera rays to only those matched + and their descendants. Camera visibility attributes authored in the scene take + precedence over this option. + """ +) + +Gaffer.Metadata.registerValue( "option:render:cameraExclusions", "label", "Camera Exclusions" ) +Gaffer.Metadata.registerValue( "option:render:cameraExclusions", "defaultValue", IECore.StringData( "" ) ) +Gaffer.Metadata.registerValue( + "option:render:cameraExclusions", + "description", + """ + A set expression that excludes the matched objects and their descendants from camera + ray visibility. Camera visibility attributes authored in the scene take precedence + over this option. + """ +) diff --git a/startup/gui/renderPassEditor.py b/startup/gui/renderPassEditor.py index ef91f11fbff..bf62014cc23 100644 --- a/startup/gui/renderPassEditor.py +++ b/startup/gui/renderPassEditor.py @@ -44,6 +44,8 @@ GafferSceneUI.RenderPassEditor.registerOption( "*", "render:inclusions" ) GafferSceneUI.RenderPassEditor.registerOption( "*", "render:exclusions" ) GafferSceneUI.RenderPassEditor.registerOption( "*", "render:additionalLights" ) +GafferSceneUI.RenderPassEditor.registerOption( "*", "render:cameraInclusions" ) +GafferSceneUI.RenderPassEditor.registerOption( "*", "render:cameraExclusions" ) GafferSceneUI.RenderPassEditor.registerOption( "*", "render:defaultRenderer", "Render" ) GafferSceneUI.RenderPassEditor.registerOption( "*", "render:camera", "Render" )