diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 15:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 15:30:59 +0300 |
commit | cd972535027a73ba70069051fe9038b6a8b5696a (patch) | |
tree | b50696bddbc710192b89e34fcdd1e82e6c8073b7 /source/blender/editors/armature | |
parent | aca76ddb502cbf0ee7888c3356f9f35240919410 (diff) |
- added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 26 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature_retarget.c | 7 | ||||
-rw-r--r-- | source/blender/editors/armature/meshlaplacian.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/poselib.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/poseobject.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/reeb.h | 4 |
6 files changed, 19 insertions, 28 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 2f6bccff404..9260a3a9953 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -1212,16 +1212,10 @@ void ARMATURE_OT_separate (wmOperatorType *ot) /* only for opengl selection indices */ Bone *get_indexed_bone (Object *ob, int index) { - bPoseChannel *pchan; - int a= 0; - if(ob->pose==NULL) return NULL; index>>=16; // bone selection codes use left 2 bytes - for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, a++) { - if(a==index) return pchan->bone; - } - return NULL; + return BLI_findlink(&ob->pose->chanbase, index); } /* See if there are any selected bones in this buffer */ @@ -1780,7 +1774,7 @@ EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo) static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) { bArmature *arm; - EditBone *curBone, *next; + EditBone *curBone, *ebone_next; bConstraint *con; Object *obedit= CTX_data_edit_object(C); // XXX get from context arm = obedit->data; @@ -1794,9 +1788,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) for (curBone=arm->edbo->first; curBone; curBone=curBone->next) { if (arm->layer & curBone->layer) { if (curBone->flag & BONE_SELECTED) { - next = ED_armature_bone_get_mirrored(arm->edbo, curBone); - if (next) - next->flag |= BONE_SELECTED; + ebone_next= ED_armature_bone_get_mirrored(arm->edbo, curBone); + if (ebone_next) + ebone_next->flag |= BONE_SELECTED; } } } @@ -1804,9 +1798,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) /* First erase any associated pose channel */ if (obedit->pose) { - bPoseChannel *pchan, *next; - for (pchan=obedit->pose->chanbase.first; pchan; pchan=next) { - next= pchan->next; + bPoseChannel *pchan, *pchan_next; + for (pchan=obedit->pose->chanbase.first; pchan; pchan= pchan_next) { + pchan_next= pchan->next; curBone = editbone_name_exists(arm->edbo, pchan->name); if (curBone && (curBone->flag & BONE_SELECTED) && (arm->layer & curBone->layer)) { @@ -1844,8 +1838,8 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) } - for (curBone=arm->edbo->first;curBone;curBone=next) { - next=curBone->next; + for (curBone=arm->edbo->first; curBone; curBone= ebone_next) { + ebone_next= curBone->next; if (arm->layer & curBone->layer) { if (curBone->flag & BONE_SELECTED) { if(curBone==arm->act_edbone) arm->act_edbone= NULL; diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 5ef13bcdc1b..d043c2e472d 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -304,7 +304,7 @@ void RIG_freeRigGraph(BGraph *rg) /************************************* ALLOCATORS ******************************************************/ -static RigGraph *newRigGraph() +static RigGraph *newRigGraph(void) { RigGraph *rg; int totthread; @@ -1535,8 +1535,7 @@ RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm) if (obedit == ob) { - bArmature *arm = obedit->data; - rg->editbones = arm->edbo; + rg->editbones = ((bArmature *)obedit->data)->edbo; } else { @@ -2792,7 +2791,7 @@ int RIG_nbJoints(RigGraph *rg) return total; } -void BIF_freeRetarget() +void BIF_freeRetarget(void) { if (GLOBAL_RIGG) { diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index f193defc129..e93775f593b 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -63,8 +63,8 @@ /* ************* XXX *************** */ static void waitcursor(int UNUSED(val)) {} static void progress_bar(int UNUSED(dummy_val), const char *UNUSED(dummy)) {} -static void start_progress_bar() {} -static void end_progress_bar() {} +static void start_progress_bar(void) {} +static void end_progress_bar(void) {} static void error(char *str) { printf("error: %s\n", str); } /* ************* XXX *************** */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index d1430808fca..2ec940d25bc 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -73,7 +73,7 @@ /* ******* XXX ********** */ -static void action_set_activemarker() {} +static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUSED(c)) {} /* ************************************************************* */ /* == POSE-LIBRARY TOOL FOR BLENDER == diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 6b12bafc187..db2e8eb276a 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -833,9 +833,7 @@ void pose_copy_menu(Scene *scene) * appending to list of constraints for this channel */ copy_constraints(&tmp_constraints, &const_copy, TRUE); - if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { - bConstraint *con; - + if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { /* add proxy-local tags */ for (con= tmp_constraints.first; con; con= con->next) con->flag |= CONSTRAINT_PROXY_LOCAL; diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h index 3bebc423235..39f83407d74 100644 --- a/source/blender/editors/armature/reeb.h +++ b/source/blender/editors/armature/reeb.h @@ -149,7 +149,7 @@ void angleToVCol(struct EditMesh *em, int index); void renormalizeWeight(struct EditMesh *em, float newmax); ReebGraph * generateReebGraph(struct EditMesh *me, int subdivisions); -ReebGraph * newReebGraph(); +ReebGraph * newReebGraph(void); void initArcIterator(BArcIterator *iter, struct ReebArc *arc, struct ReebNode *head); void initArcIterator2(BArcIterator *iter, struct ReebArc *arc, int start, int end); @@ -195,7 +195,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node); void REEB_freeGraph(ReebGraph *rg); void REEB_freeArc(BArc *barc); void REEB_exportGraph(ReebGraph *rg, int count); -void REEB_draw(); +void REEB_draw(void); #endif /*REEB_H_*/ |