Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-01-26 06:16:14 +0300
committerJoshua Leung <aligorith@gmail.com>2010-01-26 06:16:14 +0300
commit14d4feca576e78d3707872bfb8b29c749bb20572 (patch)
tree1f9b6fa131a1011ea6d4f60876b3fccca2ca8e78 /source/blender/editors/include
parente6a23762da3f6b88da21669b7ae30c834ace2f55 (diff)
Radians vs Degrees: The Second Attempt
F-Curves now internally store radians again instead of degrees. - This solves problems with inconsistencies when working with drivers. - No need to version patch old files, potentially screwing them up. As such, removed the version patching for F-Curves. - Is better suited to optionally showing radians throughout the UI instead or degrees. As a result, values are now converted on the fly in the Graph Editor for display and operators that operate on values. I've made the conversion system for this rather general, so that other unit type conversions can also be hooked up with the type conversion backend. Also, made some tweaks to F-Curve RNA wrapping to make it represent the data better. TODO: - Transform code currently still needs to be corrected to work with these changes. Currently moving keyframes for rotation curves will make them change too rapidly vertically when using degrees.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_anim_api.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 02430fea3ef..5b5733a3d43 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -73,6 +73,7 @@ typedef struct bAnimContext {
struct Scene *scene; /* active scene */
struct Object *obact; /* active object */
ListBase *markers; /* active set of markers */
+ ListBase *reports; /* pointer to current reports list */ // XXX not yet used
} bAnimContext;
/* Main Data container types */
@@ -448,7 +449,7 @@ int getname_anim_fcurve(char *name, struct ID *id, struct FCurve *fcu);
/* Automatically determine a color for the nth F-Curve */
void getcolor_fcurve_rainbow(int cur, int tot, float *out);
-/* ------------- NLA-Mapping ----------------------- */
+/* ----------------- NLA-Mapping ----------------------- */
/* anim_draw.c */
/* Obtain the AnimData block providing NLA-scaling for the given channel if applicable */
@@ -463,6 +464,15 @@ void ANIM_nla_mapping_apply_fcurve(struct AnimData *adt, struct FCurve *fcu, sho
// NOTE: defined in space_nla/nla_edit.c, not in animation/
void ED_nla_postop_refresh(bAnimContext *ac);
+/* ------------- Unit Conversion Mappings ------------- */
+/* anim_draw.c */
+
+/* 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);
+
/* ------------- Utility macros ----------------------- */
/* provide access to Keyframe Type info in BezTriple