Cycles: Override World per View Layer #117920
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117920
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "JonasDichelle/blender:override-background"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Override World per View Layer
Description
This pull request adds the functionality to override the current world for each view layer, this adds to the current functionality of being able to override the material for all objects per view layer.
Why?
This feature is useful for many production scenarios as it allows for the creation of separate render passes with specific worlds. This would help workflows that require different skies or other backgrounds for compositing.
Implementation
I mostly coppied the implementation of the
material_override
code and added code to set theworld
toworld_override
at render time.Design issue: #117919
WIP: Override World per View Layerto Override World per View LayerOverride World per View Layerto Cycles: Override World per View LayerThanks.
@ -1877,6 +1877,15 @@ void rna_ViewLayer_material_override_update(Main *bmain, Scene * /*scene*/, Poin
DEG_relations_tag_update(bmain);
}
void rna_ViewLayer_world_override_update(Main *bmain, Scene *scene, PointerRNA *ptr)
Instead of adding a new function, can you rename
rna_ViewLayer_material_override_update
torna_ViewLayer_override_update
, and use it for both?The
NC_SCENE | ND_RENDER_OPTIONS,
as used for material overrides are correct for the world too, it should not beNC_WORLD
because it's not the world itself that is changing.@ -4740,0 +4751,4 @@
RNA_def_property_struct_type(prop, "World");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_ui_text(prop, "World Override", "World to override world in this view layer");
Would shorten the description to: "Override world in this view layer"
@blender-bot build
@ -1874,2 +1873,3 @@
void rna_ViewLayer_override_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Scene *scene = (Scene *)ptr->owner_id;
Scene *screen = (Scene *)ptr->owner_id;
Don't change scene to screen, it's actually a scene.
I had coppied that from
rna_Scene_world_update
while testing.Do you think it's a typo there?
@ -1876,1 +1875,4 @@
Scene *screen = (Scene *)ptr->owner_id;
rna_Scene_render_update(bmain, scene, ptr);
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, &screen->id);
This should not be needed, it's already done through specifying those flags to
RNA_def_property_update
.Really the operation of this function should be unchanged, only its name needs to be changed.
@blender-bot build
@blender-bot build