diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-17 15:13:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-17 16:04:36 +0400 |
commit | f5076d54cb3a95ab583cddb7de07ed746d2e2be6 (patch) | |
tree | 421505d1a20dcb53fd8bfeb97e67e9a97a30566a /source/blender/editors/armature/armature_utils.c | |
parent | db795b66fa865ad99bc52fb3c9b053b9bb332f9b (diff) |
'Transform' Python Function for armature, curve and lattice.
patch by Paolo Acampora with some edits.
Diffstat (limited to 'source/blender/editors/armature/armature_utils.c')
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 7d6b3710a38..7c7027641d7 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -492,9 +492,8 @@ static void fix_bonelist_roll(ListBase *bonelist, ListBase *editbonelist) } /* put EditMode back in Object */ -void ED_armature_from_edit(Object *obedit) +void ED_armature_from_edit(bArmature *arm) { - bArmature *arm = obedit->data; EditBone *eBone, *neBone; Bone *newBone; Object *obt; @@ -601,12 +600,11 @@ void ED_armature_from_edit(Object *obedit) BKE_pose_rebuild(obt, arm); } - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DAG_id_tag_update(&arm->id, 0); } -void ED_armature_edit_free(struct Object *ob) +void ED_armature_edit_free(struct bArmature *arm) { - bArmature *arm = ob->data; EditBone *eBone; /* Clear the editbones list */ @@ -628,11 +626,9 @@ void ED_armature_edit_free(struct Object *ob) } /* Put armature in EditMode */ -void ED_armature_to_edit(Object *ob) +void ED_armature_to_edit(bArmature *arm) { - bArmature *arm = ob->data; - - ED_armature_edit_free(ob); + ED_armature_edit_free(arm); arm->edbo = MEM_callocN(sizeof(ListBase), "edbo armature"); arm->act_edbone = make_boneList(arm->edbo, &arm->bonebase, NULL, arm->act_bone); |