[Bf-blender-cvs] [9c76ec615aa] blender2.8: Fix T53759: Cycles / 2.8: Light position doesnt update in viewport render

Sergey Sharybin noreply at git.blender.org
Fri Jan 12 15:01:03 CET 2018


Commit: 9c76ec615aabe6d8bf523e7872a3d203c9c5376c
Author: Sergey Sharybin
Date:   Thu Jan 11 16:04:29 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB9c76ec615aabe6d8bf523e7872a3d203c9c5376c

Fix T53759: Cycles / 2.8: Light position doesnt update in viewport render

===================================================================

M	source/blender/makesrna/intern/rna_ID.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index f2b6cc954b5..b253702b848 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -772,6 +772,13 @@ static PointerRNA rna_IDPreview_get(PointerRNA *ptr)
 	return rna_pointer_inherit_refine(ptr, &RNA_ImagePreview, prv_img);
 }
 
+static int rna_ID_is_updated_get(PointerRNA *ptr)
+{
+	ID *id = (ID *)ptr->data;
+	/* TODO(sergey): Do we need to limit some of flags here? */
+	return ((id->recalc & ID_RECALC_ALL) != 0);
+}
+
 static int rna_ID_is_updated_data_get(PointerRNA *ptr)
 {
 	ID *id = (ID *)ptr->data;
@@ -1037,8 +1044,8 @@ static void rna_def_ID(BlenderRNA *brna)
 	                         "(initial state is undefined)");
 
 	prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "recalc", ID_RECALC);
 	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+	RNA_def_property_boolean_funcs(prop, "rna_ID_is_updated_get", NULL);
 	RNA_def_property_ui_text(prop, "Is Updated", "Data-block is tagged for recalculation");
 
 	prop = RNA_def_property(srna, "is_updated_data", PROP_BOOLEAN, PROP_NONE);



More information about the Bf-blender-cvs mailing list