Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/cycles/blender/blender_sync.cpp2
-rw-r--r--source/blender/makesrna/intern/rna_depsgraph.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 9e95cdb3f20..f4c100bcd2b 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -142,7 +142,7 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d
BL::Object b_ob(b_id);
const bool updated_geometry = b_update->is_updated_geometry();
- if (b_update->is_updated_transform()) {
+ if (b_update->is_updated_transform() || b_update->is_updated_shading()) {
object_map.set_recalc(b_ob);
light_map.set_recalc(b_ob);
}
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c
index 41c107b8d04..ca34f69ab1e 100644
--- a/source/blender/makesrna/intern/rna_depsgraph.c
+++ b/source/blender/makesrna/intern/rna_depsgraph.c
@@ -203,6 +203,12 @@ static bool rna_DepsgraphUpdate_is_updated_transform_get(PointerRNA *ptr)
return ((id->recalc & ID_RECALC_TRANSFORM) != 0);
}
+static bool rna_DepsgraphUpdate_is_updated_shading_get(PointerRNA *ptr)
+{
+ ID *id = ptr->data;
+ return ((id->recalc & ID_RECALC_SHADING) != 0);
+}
+
static bool rna_DepsgraphUpdate_is_updated_geometry_get(PointerRNA *ptr)
{
ID *id = ptr->data;
@@ -601,6 +607,11 @@ static void rna_def_depsgraph_update(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Geometry", "Object geometry is updated");
RNA_def_property_boolean_funcs(prop, "rna_DepsgraphUpdate_is_updated_geometry_get", NULL);
+
+ prop = RNA_def_property(srna, "is_updated_shading", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Shading", "Object shading is updated");
+ RNA_def_property_boolean_funcs(prop, "rna_DepsgraphUpdate_is_updated_shading_get", NULL);
}
static void rna_def_depsgraph(BlenderRNA *brna)