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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-18 21:28:14 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-18 21:28:46 +0300
commit1beb6b43c162f657607b49df9d583b38a160d683 (patch)
tree116c6f9b439a759902c24b9f15118027fe06d015 /source/blender/makesrna/intern
parent7ff3cd26932cbc93068eea4dc7438442216e4ee1 (diff)
Fix T54089: missing GLSL material draw update when changing object pass index.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_object.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 7800edc3086..e6e70694885 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -202,6 +202,12 @@ static void rna_Object_internal_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
DAG_id_tag_update(ptr->id.data, OB_RECALC_OB);
}
+static void rna_Object_internal_update_draw(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_OB);
+ WM_main_add_notifier(NC_OBJECT | ND_DRAW, ptr->id.data);
+}
+
static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
/* don't use compat so we get predictable rotation */
@@ -2562,7 +2568,7 @@ static void rna_def_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_ui_text(prop, "Pass Index", "Index number for the \"Object Index\" render pass");
- RNA_def_property_update(prop, NC_OBJECT, "rna_Object_internal_update");
+ RNA_def_property_update(prop, NC_OBJECT, "rna_Object_internal_update_draw");
prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");