diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-04-26 10:35:25 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-04-26 10:35:25 +0400 |
commit | 4980e43dd13677d21c870b6c5cce7f1e2af3d164 (patch) | |
tree | ad5b3d4832dc27edb2a33eaf263388bd4a86f7b1 /source | |
parent | b5d28306d029acbeecc48afcabff7fdb321abdd8 (diff) |
Assorted code cleanups:
* Removed some un-needed armature code stubs
* Manually copying over the values of constraints in the constraint copy() callbacks should NOT be needed. Removed this from the Spline IK constraint. The manual process is only a hacky aspect of the modifier stack only!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 27 | ||||
-rw-r--r-- | source/blender/editors/include/ED_armature.h | 1 |
3 files changed, 7 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 9dab2c1c07e..18504bab59b 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3751,10 +3751,6 @@ static void splineik_copy (bConstraint *con, bConstraint *srccon) /* copy the binding array */ dst->points= MEM_dupallocN(src->points); - dst->numpoints= src->numpoints; - dst->chainlen= src->chainlen; - dst->flag= src->flag; - dst->xzScaleMode= src->xzScaleMode; } static void splineik_new_data (void *cdata) diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 504c5b1e3b1..a75379024d8 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -88,7 +88,6 @@ #endif /* ************* XXX *************** */ -static int okee(const char *dummy) {return 0;} static void BIF_undo_push(const char *msg) {} /* ************* XXX *************** */ @@ -140,7 +139,7 @@ static void bone_free(bArmature *arm, EditBone *bone) BLI_freelinkN(arm->edbo, bone); } -void ED_armature_edit_bone_remove(bArmature *arm, EditBone* exBone) +void ED_armature_edit_bone_remove(bArmature *arm, EditBone *exBone) { EditBone *curBone; @@ -477,9 +476,10 @@ void docenter_armature (Scene *scene, View3D *v3d, Object *ob, int centermode) /* ---------------------- */ -static EditBone *editbone_name_exists (ListBase *edbo, char *name) +/* checks if an EditBone with a matching name already, returning the matching bone if it exists */ +static EditBone *editbone_name_exists (ListBase *edbo, const char *name) { - EditBone *eBone; + EditBone *eBone; for (eBone=edbo->first; eBone; eBone=eBone->next) { if (!strcmp(name, eBone->name)) @@ -492,9 +492,9 @@ static EditBone *editbone_name_exists (ListBase *edbo, char *name) void unique_editbone_name (ListBase *edbo, char *name, EditBone *bone) { EditBone *dupli; - char tempname[64]; - int number; - char *dot; + char tempname[64]; + int number; + char *dot; dupli = editbone_name_exists(edbo, name); @@ -1925,10 +1925,6 @@ void ED_armature_deselectall(Object *obedit, int toggle, int doundo) } ED_armature_sync_selection(arm->edbo); - if (doundo) { - if (sel==1) BIF_undo_push("Select All"); - else BIF_undo_push("Deselect All"); - } } @@ -2033,15 +2029,6 @@ void ED_armature_edit_free(struct Object *ob) } } -void ED_armature_edit_remake(Object *obedit) -{ - if(okee("Reload original data")==0) return; - - ED_armature_to_edit(obedit); - -// BIF_undo_push("Delete bone"); -} - /* Put armature in EditMode */ void ED_armature_to_edit(Object *ob) { diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 81ceaffaa5e..67387dc2e08 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -102,7 +102,6 @@ void ED_keymap_armature(struct wmKeyConfig *keyconf); void ED_armature_from_edit(struct Object *obedit); void ED_armature_to_edit(struct Object *ob); void ED_armature_edit_free(struct Object *ob); -void ED_armature_edit_remake(struct Object *obedit); void ED_armature_deselectall(struct Object *obedit, int toggle, int doundo); int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, |