diff options
author | Luca Rood <dev@lucarood.com> | 2017-06-08 11:14:53 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-06-08 11:17:04 +0300 |
commit | d675415eef9f565b1828f48dfe874321af1c4af8 (patch) | |
tree | 84f7e210a0dd17c538e3480a33af82f4e1f86dc2 /source/blender/editors/armature | |
parent | 7f480352caaa14a20c0438ae0ed1c2607b6c2c00 (diff) |
Replace all old DAG calls with direct calls to new DEG and remove BKE_depsgraph.h
This removes BKE_depsgraph.h and depsgraph.c
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_naming.c | 7 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_relations.c | 12 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 5 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_edit.c | 13 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_lib.c | 9 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_select.c | 23 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 11 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_utils.c | 5 |
9 files changed, 48 insertions, 38 deletions
diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt index b213aca478f..5348298f57e 100644 --- a/source/blender/editors/armature/CMakeLists.txt +++ b/source/blender/editors/armature/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c index c928508237d..14db676cd01 100644 --- a/source/blender/editors/armature/armature_naming.c +++ b/source/blender/editors/armature/armature_naming.c @@ -48,11 +48,12 @@ #include "BKE_constraint.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_main.h" #include "BKE_modifier.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -375,7 +376,7 @@ static int armature_flip_names_exec(bContext *C, wmOperator *UNUSED(op)) BLI_freelistN(&bones_names); /* since we renamed stuff... */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* copied from #rna_Bone_update_renamed */ /* redraw view */ @@ -425,7 +426,7 @@ static int armature_autoside_names_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* since we renamed stuff... */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 0dc97483dfc..a6f63548c96 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -47,13 +47,15 @@ #include "BKE_animsys.h" #include "BKE_constraint.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_layer.h" #include "BKE_main.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -406,7 +408,7 @@ int join_armature_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - DAG_relations_tag_update(bmain); /* because we removed object(s) */ + DEG_relations_tag_update(bmain); /* because we removed object(s) */ ED_armature_from_edit(arm); ED_armature_edit_free(arm); @@ -624,7 +626,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op) /* 2) duplicate base */ newbase = ED_object_add_duplicate(bmain, scene, sl, oldbase, USER_DUP_ARM); /* only duplicate linked armature */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); newob = newbase->object; newbase->flag &= ~BASE_SELECTED; @@ -638,8 +640,8 @@ static int separate_armature_exec(bContext *C, wmOperator *op) /* 4) fix links before depsgraph flushes */ // err... or after? separated_armature_fix_links(oldob, newob); - DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ - DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ + DEG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ + DEG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ /* 5) restore original conditions */ diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index a3b439536b7..a2663cdd935 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -39,11 +39,12 @@ #include "BKE_armature.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_main.h" +#include "DEG_depsgraph.h" + #include "ED_armature.h" #include "ED_util.h" @@ -672,7 +673,7 @@ void ED_armature_from_edit(bArmature *arm) } } - DAG_id_tag_update(&arm->id, 0); + DEG_id_tag_update(&arm->id, 0); } void ED_armature_edit_free(struct bArmature *arm) diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 86b7271bfff..736329d29bf 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -43,10 +43,11 @@ #include "BKE_armature.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -580,7 +581,7 @@ static void pose_copy_menu(Scene *scene) BKE_pose_tag_recalc(bmain, ob->pose); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations BIF_undo_push("Copy Pose Attributes"); @@ -613,7 +614,7 @@ static int pose_flip_names_exec(bContext *C, wmOperator *UNUSED(op)) BLI_freelistN(&bones_names); /* since we renamed stuff... */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -660,7 +661,7 @@ static int pose_autoside_names_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* since we renamed stuff... */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -709,7 +710,7 @@ static int pose_bone_rotmode_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* notifiers and updates */ - DAG_id_tag_update((ID *)ob, OB_RECALC_DATA); + DEG_id_tag_update((ID *)ob, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); return OPERATOR_FINISHED; @@ -1166,7 +1167,7 @@ static int pose_flip_quats_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; /* notifiers and updates */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index e3c64b523b1..c4336338176 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -46,7 +46,6 @@ #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_library.h" @@ -55,6 +54,8 @@ #include "BKE_context.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -1090,7 +1091,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) */ // FIXME: shouldn't this use the builtin stuff? if ((pld->arm->flag & ARM_DELAYDEFORM) == 0) - DAG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */ else BKE_pose_where_is(pld->scene, pld->ob); } @@ -1598,7 +1599,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) * - note: code copied from transform_generics.c -> recalcData() */ if ((arm->flag & ARM_DELAYDEFORM) == 0) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ else BKE_pose_where_is(scene, ob); } @@ -1611,7 +1612,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) action_set_activemarker(act, marker, NULL); /* Update event for pose and deformation children */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* updates */ if (IS_AUTOKEY_MODE(scene, NORMAL)) { diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index fdc58f6e253..0d1752e07a1 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -43,10 +43,11 @@ #include "BKE_armature.h" #include "BKE_constraint.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -122,7 +123,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) * (see rna_Bone_select_update() in rna_armature.c for details) */ if (arm->flag & ARM_HAS_VIZ_DEPS) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } /* send necessary notifiers */ @@ -197,7 +198,7 @@ bool ED_do_pose_selectbuffer( if (ob_act->mode & OB_MODE_WEIGHT_PAINT) { if (nearBone == arm->act_bone) { ED_vgroup_select_by_name(ob_act, nearBone->name); - DAG_id_tag_update(&ob_act->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_act->id, OB_RECALC_DATA); } } /* if there are some dependencies for visualizing armature state @@ -207,7 +208,7 @@ bool ED_do_pose_selectbuffer( /* NOTE: ob not ob_act here is intentional - it's the source of the * bones being selected [T37247] */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } } @@ -314,7 +315,7 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, const wmEve if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -370,7 +371,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) /* weightpaint or mask modifiers need depsgraph updates */ if (multipaint || (arm->flag & ARM_HAS_VIZ_DEPS)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -422,7 +423,7 @@ static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op)) if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -489,7 +490,7 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -583,7 +584,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op) if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -828,7 +829,7 @@ static int pose_select_grouped_exec(bContext *C, wmOperator *op) if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } /* report done status */ @@ -921,7 +922,7 @@ static int pose_select_mirror_exec(bContext *C, wmOperator *op) /* in weightpaint we select the associated vertex group too */ if (ob_act->mode & OB_MODE_WEIGHT_PAINT) { ED_vgroup_select_by_name(ob_act, pchan_mirror_act->name); - DAG_id_tag_update(&ob_act->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_act->id, OB_RECALC_DATA); } } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 063ba37f20d..c2f66db63f8 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -45,13 +45,14 @@ #include "BKE_blender_copybuffer.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_main.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -225,7 +226,7 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) } CTX_DATA_END; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -534,7 +535,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op) } BKE_main_free(tmp_bmain); /* Update event for pose and deformation children. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* Notifiers for updates, */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -760,7 +761,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op, ED_pose_recalculate_paths(scene, ob); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); @@ -907,7 +908,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op) } /* notifiers and updates */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index b960bec3603..124cf24f12b 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -39,11 +39,12 @@ #include "BKE_action.h" #include "BKE_armature.h" -#include "BKE_depsgraph.h" #include "BKE_idprop.h" #include "BKE_context.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "WM_api.h" @@ -187,7 +188,7 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob) */ /* FIXME: shouldn't this use the builtin stuff? */ if ((arm->flag & ARM_DELAYDEFORM) == 0) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ else BKE_pose_where_is(scene, ob); |