- UNUSED macro wasn't throwing an error with GCC if a var become used.
[blender.git] / source / blender / editors / armature / poseSlide.c
index 64426b7dc6b7afb4551cf37e9b43c4d949fd4d54..7b2ec9891f42b9c7c9a9ce2210e95a5b64d6d305 100644 (file)
@@ -157,7 +157,7 @@ static int pose_slide_init (bContext *C, wmOperator *op, short mode)
 }
 
 /* exiting the operator - free data */
-static void pose_slide_exit (bContext *C, wmOperator *op)
+static void pose_slide_exit(wmOperator *op)
 {
        tPoseSlideOp *pso= op->customdata;
        
@@ -376,7 +376,7 @@ static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
 }
 
 /* apply() - perform the pose sliding based on weighting various poses */
-static void pose_slide_apply (bContext *C, wmOperator *op, tPoseSlideOp *pso)
+static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
 {
        tPChanFCurveLink *pfl;
        
@@ -434,7 +434,7 @@ static void pose_slide_autoKeyframe (bContext *C, tPoseSlideOp *pso)
 }
 
 /* reset changes made to current pose */
-static void pose_slide_reset (bContext *C, tPoseSlideOp *pso)
+static void pose_slide_reset (tPoseSlideOp *pso)
 {
        /* wrapper around the generic call, so that custom stuff can be added later */
        poseAnim_mapping_reset(&pso->pfLinks);
@@ -501,7 +501,7 @@ static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *
        
        /* initial apply for operator... */
        // TODO: need to calculate percentage for initial round too...
-       pose_slide_apply(C, op, pso);
+       pose_slide_apply(C, pso);
        
        /* depsgraph updates + redraws */
        pose_slide_refresh(C, pso);
@@ -528,7 +528,7 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
                        
                        /* insert keyframes as required... */
                        pose_slide_autoKeyframe(C, pso);
-                       pose_slide_exit(C, op);
+                       pose_slide_exit(op);
                        
                        /* done! */
                        return OPERATOR_FINISHED;
@@ -541,13 +541,13 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
                        WM_cursor_restore(win);
                        
                        /* reset transforms back to original state */
-                       pose_slide_reset(C, pso);
+                       pose_slide_reset(pso);
                        
                        /* depsgraph updates + redraws */
                        pose_slide_refresh(C, pso);
                        
                        /* clean up temp data */
-                       pose_slide_exit(C, op);
+                       pose_slide_exit(op);
                        
                        /* cancelled! */
                        return OPERATOR_CANCELLED;
@@ -562,10 +562,10 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
                        RNA_float_set(op->ptr, "percentage", pso->percentage);
                        
                        /* reset transforms (to avoid accumulation errors) */
-                       pose_slide_reset(C, pso);
+                       pose_slide_reset(pso);
                        
                        /* apply... */
-                       pose_slide_apply(C, op, pso);
+                       pose_slide_apply(C, pso);
                }
                        break;
                        
@@ -579,10 +579,10 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
 }
 
 /* common code for cancel() */
-static int pose_slide_cancel (bContext *C, wmOperator *op)
+static int pose_slide_cancel (bContext *UNUSED(C), wmOperator *op)
 {
        /* cleanup and done */
-       pose_slide_exit(C, op);
+       pose_slide_exit(op);
        return OPERATOR_CANCELLED;
 }
 
@@ -590,13 +590,13 @@ static int pose_slide_cancel (bContext *C, wmOperator *op)
 static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *pso)
 {
        /* settings should have been set up ok for applying, so just apply! */
-       pose_slide_apply(C, op, pso);
+       pose_slide_apply(C, pso);
        
        /* insert keyframes if needed */
        pose_slide_autoKeyframe(C, pso);
        
        /* cleanup and done */
-       pose_slide_exit(C, op);
+       pose_slide_exit(op);
        
        return OPERATOR_FINISHED;
 }
@@ -618,7 +618,7 @@ static int pose_slide_push_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(
        
        /* initialise data  */
        if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) {
-               pose_slide_exit(C, op);
+               pose_slide_exit(op);
                return OPERATOR_CANCELLED;
        }
        else
@@ -635,7 +635,7 @@ static int pose_slide_push_exec (bContext *C, wmOperator *op)
        
        /* initialise data (from RNA-props) */
        if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) {
-               pose_slide_exit(C, op);
+               pose_slide_exit(op);
                return OPERATOR_CANCELLED;
        }
        else
@@ -675,7 +675,7 @@ static int pose_slide_relax_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
        
        /* initialise data  */
        if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) {
-               pose_slide_exit(C, op);
+               pose_slide_exit(op);
                return OPERATOR_CANCELLED;
        }
        else
@@ -692,7 +692,7 @@ static int pose_slide_relax_exec (bContext *C, wmOperator *op)
        
        /* initialise data (from RNA-props) */
        if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) {
-               pose_slide_exit(C, op);
+               pose_slide_exit(op);
                return OPERATOR_CANCELLED;
        }
        else
@@ -732,7 +732,7 @@ static int pose_slide_breakdown_invoke (bContext *C, wmOperator *op, wmEvent *UN
        
        /* initialise data  */
        if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) {
-               pose_slide_exit(C, op);
+               pose_slide_exit(op);
                return OPERATOR_CANCELLED;
        }
        else
@@ -749,7 +749,7 @@ static int pose_slide_breakdown_exec (bContext *C, wmOperator *op)
        
        /* initialise data (from RNA-props) */
        if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) {
-               pose_slide_exit(C, op);
+               pose_slide_exit(op);
                return OPERATOR_CANCELLED;
        }
        else