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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-04-22 14:50:21 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-04-22 15:31:32 +0300
commit6c9a88234038f500c3e75472088f14dff05d073b (patch)
treeff49ded5ba5c9b5bd959dd4cf0dca174218a4883 /source/blender/makesrna/intern/rna_depsgraph.c
parent9aeb475e99b0b469bb6ce657da6480f971112a45 (diff)
Fix T75964: changing object's viewport display color does not update
cycles Caused by rB00466e756e33. While that commit sounds logical, Cycles uses is_updated_transform() to detect updates. Now introduce is_updated_shading() and use that on top. Maniphest Tasks: T75964 Differential Revision: https://developer.blender.org/D7493
Diffstat (limited to 'source/blender/makesrna/intern/rna_depsgraph.c')
-rw-r--r--source/blender/makesrna/intern/rna_depsgraph.c11
1 files changed, 11 insertions, 0 deletions
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)