[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28425] trunk/blender/source/blender: Assorted code cleanups:

Joshua Leung aligorith at gmail.com
Mon Apr 26 08:35:26 CEST 2010


Revision: 28425
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28425
Author:   aligorith
Date:     2010-04-26 08:35:25 +0200 (Mon, 26 Apr 2010)

Log Message:
-----------
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!

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/constraint.c
    trunk/blender/source/blender/editors/armature/editarmature.c
    trunk/blender/source/blender/editors/include/ED_armature.h

Modified: trunk/blender/source/blender/blenkernel/intern/constraint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/constraint.c	2010-04-26 06:33:04 UTC (rev 28424)
+++ trunk/blender/source/blender/blenkernel/intern/constraint.c	2010-04-26 06:35:25 UTC (rev 28425)
@@ -3751,10 +3751,6 @@
 	
 	/* 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)

Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c	2010-04-26 06:33:04 UTC (rev 28424)
+++ trunk/blender/source/blender/editors/armature/editarmature.c	2010-04-26 06:35:25 UTC (rev 28425)
@@ -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 @@
 	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 @@
 
 /* ---------------------- */
 
-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 @@
 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 @@
 	}
 	
 	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_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)
 {

Modified: trunk/blender/source/blender/editors/include/ED_armature.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_armature.h	2010-04-26 06:33:04 UTC (rev 28424)
+++ trunk/blender/source/blender/editors/include/ED_armature.h	2010-04-26 06:35:25 UTC (rev 28425)
@@ -102,7 +102,6 @@
 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, 





More information about the Bf-blender-cvs mailing list