diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-08-09 17:17:40 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-08-13 19:02:49 +0300 |
commit | a5aeca4a64dfd2ec6d0d68acf2fd9e4a9498558d (patch) | |
tree | 22a4b37f06121e36ee35c14046835f08ba702d81 /source/blender/makesrna/intern/rna_armature.c | |
parent | ff6bd57873ec11f7748bc74bf3d628b3cbe38f70 (diff) |
Fix dependency graph for constraints depending on B-Bone shape.
Some constraints have an option to take the final bezier shape of
the target B-Bone into account. This shape usually depends on two
other bones in addition to the target itself, so the graph should
include the relevant dependencies.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D3591
Diffstat (limited to 'source/blender/makesrna/intern/rna_armature.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_armature.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index a4126e921d9..a44ccffdd05 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -52,6 +52,7 @@ #include "BKE_armature.h" #include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" static void rna_Armature_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { @@ -62,6 +63,15 @@ static void rna_Armature_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), /*WM_main_add_notifier(NC_OBJECT|ND_POSE, NULL); */ } +static void rna_Armature_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) +{ + ID *id = ptr->id.data; + + DEG_relations_tag_update(bmain); + + DEG_id_tag_update(id, 0); + WM_main_add_notifier(NC_GEOM | ND_DATA, id); +} static void rna_Armature_act_bone_set(PointerRNA *ptr, PointerRNA value) { @@ -722,7 +732,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone) RNA_def_property_int_sdna(prop, NULL, "segments"); RNA_def_property_range(prop, 1, 32); RNA_def_property_ui_text(prop, "B-Bone Segments", "Number of subdivisions of bone (for B-Bones only)"); - RNA_def_property_update(prop, 0, "rna_Armature_update_data"); + RNA_def_property_update(prop, 0, "rna_Armature_dependency_update"); prop = RNA_def_property(srna, "bbone_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xwidth"); |