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:
authorCampbell Barton <ideasman42@gmail.com>2013-10-16 00:15:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-10-16 00:15:45 +0400
commite7f1e1aed1a9a83763baaccc26498ad5aa1b5757 (patch)
tree084946867904c80add5ee7ba16df2206af747bd1 /source/blender/editors/object/object_hook.c
parentac602142d3a50157f91d9106dfbf2b39814ac648 (diff)
edits to r60777 - move ED_object_hook_reset_do into BKE object (if RNA needs to call ED_* functions its a hint they might be better in BKE).
Diffstat (limited to 'source/blender/editors/object/object_hook.c')
-rw-r--r--source/blender/editors/object/object_hook.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index d6f3bf0c262..7f97aa0b4c1 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -690,28 +690,6 @@ void OBJECT_OT_hook_remove(wmOperatorType *ot)
ot->prop = prop;
}
-void ED_object_hook_reset_do(Object *ob, HookModifierData *hmd)
-{
- /* reset functionality */
- if (hmd->object) {
- bPoseChannel *pchan = BKE_pose_channel_find_name(hmd->object->pose, hmd->subtarget);
-
- if (hmd->subtarget[0] && pchan) {
- float imat[4][4], mat[4][4];
-
- /* calculate the world-space matrix for the pose-channel target first, then carry on as usual */
- mul_m4_m4m4(mat, hmd->object->obmat, pchan->pose_mat);
-
- invert_m4_m4(imat, mat);
- mul_m4_m4m4(hmd->parentinv, imat, ob->obmat);
- }
- else {
- invert_m4_m4(hmd->object->imat, hmd->object->obmat);
- mul_m4_m4m4(hmd->parentinv, hmd->object->imat, ob->obmat);
- }
- }
-}
-
static int object_hook_reset_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
@@ -725,7 +703,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- ED_object_hook_reset_do(ob, hmd);
+ BKE_object_modifier_hook_reset(ob, hmd);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);