Revision: 18288
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18288
Author:   aligorith
Date:     2009-01-03 11:03:26 +0100 (Sat, 03 Jan 2009)

Log Message:
-----------
2.5 - Silenced various compiler warnings

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c
    branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
    
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c
    branches/blender2.5/blender/source/blender/editors/transform/transform.c

Modified: 
branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c    
2009-01-03 08:08:44 UTC (rev 18287)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c    
2009-01-03 10:03:26 UTC (rev 18288)
@@ -271,6 +271,8 @@
                bezt->vec[2][0]= get_action_frame(ob, bezt->vec[2][0]);
        }                                       
        bezt->vec[1][0]= get_action_frame(ob, bezt->vec[1][0]);
+       
+       return 0;
 }
 
 /* helper function for ANIM_nla_mapping_apply_ipocurve() -> "apply", i.e. 
mapping points to NLA-mapped global time */
@@ -286,6 +288,8 @@
                bezt->vec[2][0]= get_action_frame_inv(ob, bezt->vec[2][0]);
        }
        bezt->vec[1][0]= get_action_frame_inv(ob, bezt->vec[1][0]);
+       
+       return 0;
 }
 
 

Modified: 
branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c  
2009-01-03 08:08:44 UTC (rev 18287)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c  
2009-01-03 10:03:26 UTC (rev 18288)
@@ -546,7 +546,6 @@
 {
        bAnimListElem *ale = NULL;
        bConstraintChannel *conchan;
-       IpoCurve *icu;
        short owned= (owner && ownertype)? 1 : 0;
        int items = 0;
        
@@ -857,7 +856,6 @@
 {
        bAnimListElem *ale=NULL;
        Object *ob= base->object;
-       IpoCurve *icu;
        int items = 0;
        
        /* include materials-expand widget? */

Modified: 
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c   
    2009-01-03 08:08:44 UTC (rev 18287)
+++ 
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c   
    2009-01-03 10:03:26 UTC (rev 18288)
@@ -35,6 +35,7 @@
 #include "BLI_arithb.h"
 
 #include "DNA_action_types.h"
+#include "DNA_constraint_types.h"
 #include "DNA_curve_types.h"
 #include "DNA_ipo_types.h"
 #include "DNA_key_types.h"
@@ -116,7 +117,7 @@
     return 0;
 }
 
-/* This function is used to loop over the IPO curves (and subsequently the 
keyframes in them) */
+/* This function is used to loop over the IPO curves in the given IPO (and 
subsequently the keyframes in them) */
 short ANIM_ipo_keys_bezier_loop(BeztEditData *bed, Ipo *ipo, BeztEditFunc 
bezt_ok, BeztEditFunc bezt_cb, IcuEditFunc icu_cb)
 {
     IpoCurve *icu;
@@ -136,6 +137,48 @@
 
 /* -------------------------------- Further Abstracted 
----------------------------- */
 
+/* This function is used to loop over the keyframe data in an Action Group */
+static short agrp_keys_bezier_loop(BeztEditData *bed, bActionGroup *agrp, 
BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, IcuEditFunc icu_cb)
+{
+       bActionChannel *achan;
+       bConstraintChannel *conchan;
+       
+       /* only iterate over the action-channels and their sub-channels that 
are in this group */
+       for (achan= agrp->channels.first; achan && achan->grp==agrp; achan= 
achan->next) {
+               if (ANIM_ipo_keys_bezier_loop(bed, achan->ipo, bezt_ok, 
bezt_cb, icu_cb))
+                       return 1;
+               
+               for (conchan=achan->constraintChannels.first; conchan; 
conchan=conchan->next) {
+                       if (ANIM_ipo_keys_bezier_loop(bed, conchan->ipo, 
bezt_ok, bezt_cb, icu_cb))
+                               return 1;
+               }
+       }
+       
+       return 0;
+}
+
+/* This function is used to loop over the keyframe data in an Action Group */
+static short act_keys_bezier_loop(BeztEditData *bed, bAction *act, 
BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, IcuEditFunc icu_cb)
+{
+       bActionChannel *achan;
+       bConstraintChannel *conchan;
+       
+       for (achan= act->chanbase.first; achan; achan= achan->next) {
+               if (ANIM_ipo_keys_bezier_loop(bed, achan->ipo, bezt_ok, 
bezt_cb, icu_cb))
+                       return 1;
+               
+               for (conchan=achan->constraintChannels.first; conchan; 
conchan=conchan->next) {
+                       if (ANIM_ipo_keys_bezier_loop(bed, conchan->ipo, 
bezt_ok, bezt_cb, icu_cb))
+                               return 1;
+               }
+       }
+       
+       return 0;
+}
+
+/* --- */
+
+
 /* This function is used to apply operation to all keyframes, regardless of 
the type */
 short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, bAnimListElem *ale, 
BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, IcuEditFunc icu_cb)
 {
@@ -145,14 +188,17 @@
        
        /* method to use depends on the type of keyframe data */
        switch (ale->datatype) {
+                       /* direct keyframe data (these loops are exposed) */
                case ALE_ICU: /* ipo-curve */
                        return ANIM_icu_keys_bezier_loop(bed, ale->key_data, 
bezt_ok, bezt_cb, icu_cb);
                case ALE_IPO: /* ipo */
                        return ANIM_ipo_keys_bezier_loop(bed, ale->key_data, 
bezt_ok, bezt_cb, icu_cb);
                
+                       /* indirect 'summaries' (these are not exposed) */
                case ALE_GROUP: /* action group */
-                       //return group_keys_bezier_loop(bed, ale->data, 
bezt_ok, bezt_cb, icu_cb);
-                       break;
+                       return agrp_keys_bezier_loop(bed, (bActionGroup 
*)ale->data, bezt_ok, bezt_cb, icu_cb);
+               case ALE_ACT: /* action */
+                       return act_keys_bezier_loop(bed, (bAction *)ale->data, 
bezt_ok, bezt_cb, icu_cb);
        }
        
        return 0;

Modified: 
branches/blender2.5/blender/source/blender/editors/transform/transform.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/transform/transform.c    
2009-01-03 08:08:44 UTC (rev 18287)
+++ branches/blender2.5/blender/source/blender/editors/transform/transform.c    
2009-01-03 10:03:26 UTC (rev 18288)
@@ -197,6 +197,7 @@
                
                // TRANSFORM_FIX_ME
                //transform_aspect_ratio_tface_uv(&aspx, &aspy);
+               aspx= aspy= 1.0f;
                
                divx= v2d->mask.xmax-v2d->mask.xmin;
                divy= v2d->mask.ymax-v2d->mask.ymin;
@@ -1092,11 +1093,12 @@
        if (t->state != TRANS_RUNNING)
        {
                /* handle restoring objects */
-               if(t->state == TRANS_CANCEL)
+               if(t->state == TRANS_CANCEL) {
                        if(t->spacetype == SPACE_NODE)
                                restoreTransNodes(t);
                        else
                                restoreTransObjects(t); // calls recalcData()
+               }
                
                /* free data */
                postTrans(t);
@@ -4571,7 +4573,6 @@
 {
        View2D *v2d = &t->ar->v2d;
        float cval[2], sval[2];
-       char str[200];
        
        /* calculate translation amount from mouse movement - in 'node-grid 
space' */
        UI_view2d_region_to_view(v2d, mval[0], mval[1], &cval[0], &cval[1]);
@@ -4579,7 +4580,7 @@
 
        t->values[0] = cval[0] - sval[0];
        t->values[1] = cval[1] - sval[1];
-               
+       
        applyNodeTranslate(t);
 
        recalcData(t);


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to