2.5 - Silenced various compiler warnings

This commit is contained in:
2009-01-03 10:03:26 +00:00
parent 10cce9cec6
commit 38fcc20580
4 changed files with 57 additions and 8 deletions

View File

@@ -271,6 +271,8 @@ static short bezt_nlamapping_restore(BeztEditData *bed, BezTriple *bezt)
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 @@ static short bezt_nlamapping_apply(BeztEditData *bed, BezTriple *bezt)
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;
}

View File

@@ -546,7 +546,6 @@ static int animdata_filter_actionchannel (ListBase *anim_data, bActionChannel *a
{
bAnimListElem *ale = NULL;
bConstraintChannel *conchan;
IpoCurve *icu;
short owned= (owner && ownertype)? 1 : 0;
int items = 0;
@@ -857,7 +856,6 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads,
{
bAnimListElem *ale=NULL;
Object *ob= base->object;
IpoCurve *icu;
int items = 0;
/* include materials-expand widget? */

View File

@@ -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 @@ short ANIM_icu_keys_bezier_loop(BeztEditData *bed, IpoCurve *icu, BeztEditFunc b
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 @@ short ANIM_ipo_keys_bezier_loop(BeztEditData *bed, Ipo *ipo, BeztEditFunc bezt_o
/* -------------------------------- 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 @@ short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, bAnimListElem *ale, B
/* 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;

View File

@@ -197,6 +197,7 @@ void convertViewVec(TransInfo *t, float *vec, short dx, short dy)
// 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 @@ int transformEnd(bContext *C, TransInfo *t)
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 @@ int NodeTranslate(TransInfo *t, short mval[2])
{
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 @@ int NodeTranslate(TransInfo *t, short mval[2])
t->values[0] = cval[0] - sval[0];
t->values[1] = cval[1] - sval[1];
applyNodeTranslate(t);
recalcData(t);