Skip to content

Commit

Permalink
renderPassEditor : Register camera inclusions and exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
murraystevenson committed Apr 22, 2024
1 parent 35ae94c commit 122c936
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <kbd>Shift</kbd> while dragging will add to the set expression. Holding <kbd>Control</kbd> 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
-----
Expand Down
24 changes: 24 additions & 0 deletions startup/GafferScene/standardOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
)
2 changes: 2 additions & 0 deletions startup/gui/renderPassEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down

0 comments on commit 122c936

Please sign in to comment.