mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #146377: Light groups not updating with persistent data enabled
This feature is not used for viewport rendering, so a missing update is not visible there. But for persistent data the depsgraph tag is required. Pull Request: https://projects.blender.org/blender/blender/pulls/154271
This commit is contained in:
parent
62a604bb54
commit
e580ddf160
3 changed files with 4 additions and 2 deletions
|
|
@ -124,10 +124,10 @@ void BlenderSync::sync_background_light(blender::bScreen *b_screen, blender::Vie
|
|||
if (update) {
|
||||
/* Lights should be shadow catchers by default. */
|
||||
object->set_is_shadow_catcher(true);
|
||||
object->set_lightgroup(
|
||||
ustring((b_world && b_world->lightgroup) ? b_world->lightgroup->name : ""));
|
||||
}
|
||||
|
||||
object->set_lightgroup(
|
||||
ustring((b_world && b_world->lightgroup) ? b_world->lightgroup->name : ""));
|
||||
object->set_asset_name(ustring(b_world->id.name + 2));
|
||||
|
||||
/* Create geometry. */
|
||||
|
|
|
|||
|
|
@ -3724,6 +3724,7 @@ static void rna_def_object(BlenderRNA *brna)
|
|||
"rna_Object_lightgroup_set");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Lightgroup", "Lightgroup that the object belongs to");
|
||||
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update_draw");
|
||||
|
||||
/* Light Linking. */
|
||||
prop = RNA_def_property(srna, "light_linking", PROP_POINTER, PROP_NONE);
|
||||
|
|
|
|||
|
|
@ -280,6 +280,7 @@ void RNA_def_world(BlenderRNA *brna)
|
|||
prop, "rna_World_lightgroup_get", "rna_World_lightgroup_length", "rna_World_lightgroup_set");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Lightgroup", "Lightgroup that the world belongs to");
|
||||
RNA_def_property_update(prop, 0, "rna_World_draw_update");
|
||||
|
||||
/* Reflection Probe Baking. */
|
||||
prop = RNA_def_property(srna, "probe_resolution", PROP_ENUM, PROP_NONE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue