From 0e1eca2d08035a24067406167aa5cdea0b16d274 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 26 Jan 2010 09:25:32 +0000 Subject: Finishing off the Transform code changes for Degrees/Radians: Added flags for the mapping function offering more control over what values were affected and when. In the WIP code, the values for unselected verts were getting the restoration conversion being repeatedly applied, resulting in the values tending to zero. --- source/blender/editors/include/ED_anim_api.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include/ED_anim_api.h') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 5b5733a3d43..1b1b31ff704 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -467,11 +467,23 @@ void ED_nla_postop_refresh(bAnimContext *ac); /* ------------- Unit Conversion Mappings ------------- */ /* anim_draw.c */ +/* flags for conversion mapping */ +typedef enum eAnimUnitConv_Flags { + /* restore to original internal values */ + ANIM_UNITCONV_RESTORE = (1<<0), + /* ignore handles (i.e. only touch main keyframes) */ + ANIM_UNITCONV_ONLYKEYS = (1<<1), + /* only touch selected BezTriples */ + ANIM_UNITCONV_ONLYSEL = (1<<2), + /* only touch selected vertices */ + ANIM_UNITCONV_SELVERTS = (1<<3), +} eAnimUnitConv_Flags; + /* Get unit conversion factor for given ID + F-Curve */ float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FCurve *fcu, short restore); /* Apply/Unapply units conversions to keyframes */ -void ANIM_unit_mapping_apply_fcurve(struct Scene *scene, struct ID *id, struct FCurve *fcu, short restore, short only_keys); +void ANIM_unit_mapping_apply_fcurve(struct Scene *scene, struct ID *id, struct FCurve *fcu, short flag); /* ------------- Utility macros ----------------------- */ -- cgit v1.2.3