diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-11 18:04:29 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-12 17:00:58 +0300 |
commit | 9c76ec615aabe6d8bf523e7872a3d203c9c5376c (patch) | |
tree | fc3b7b1097323b9e2a979f1844e7896f17f30838 /source/blender/makesrna/intern/rna_ID.c | |
parent | d931f6f785390388666be43f05f509800ccf43b0 (diff) |
Fix T53759: Cycles / 2.8: Light position doesnt update in viewport render
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); |