diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-03-15 13:39:02 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-03-15 13:39:02 +0300 |
commit | 329aa658c97470a6ac2861c0c9b8108ff0c48182 (patch) | |
tree | 7ed0dac0fb21860dfaab04c4c5269ed6057249eb /source/blender/blenkernel/BKE_fcurve.h | |
parent | 6508ad460fa91d605de2f62320711b19a319e2cb (diff) |
F-Curve Modifiers: Groundwork for getting these working
- Completed cleaning up the drawing code so that F-Curves with modifiers now get drawn to reflect this.
- Added a temporary operator to add modifiers (hotkey Ctrl-Shift-M)
Diffstat (limited to 'source/blender/blenkernel/BKE_fcurve.h')
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index a8b1ad49648..23c4579de14 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -44,6 +44,8 @@ typedef struct FModifierTypeInfo { /* admin/ident */ short type; /* FMODIFIER_TYPE_### */ short size; /* size in bytes of the struct */ + short acttype; /* eFMI_Action_Types */ + short requires; /* eFMI_Requirement_Flags */ char name[32]; /* name of modifier in interface */ char structName[32]; /* name of struct for SDNA */ @@ -60,13 +62,37 @@ typedef struct FModifierTypeInfo { void (*evaluate_modifier)(struct FCurve *fcu, struct FModifier *fcm, float *cvalue, float evaltime); } FModifierTypeInfo; +/* Values which describe the behaviour of a FModifier Type */ +enum { + /* modifier only modifies values outside of data range */ + FMI_TYPE_EXTRAPOLATION = 0, + /* modifier leaves data-points alone, but adjusts the interpolation between and around them */ + FMI_TYPE_INTERPOLATION, + /* modifier only modifies the values of points (but times stay the same) */ + FMI_TYPE_REPLACE_VALUES, + /* modifier generates a curve regardless of what came before */ + FMI_TYPE_GENERATE_CURVE, +} eFMI_Action_Types; + +/* Flags for the requirements of a FModifier Type */ +enum { + /* modifier requires original data-points (kindof beats the purpose of a modifier stack?) */ + FMI_REQUIRES_ORIGINAL_DATA = (1<<0), + /* modifier doesn't require on any preceeding data (i.e. it will generate a curve). + * Use in conjunction with FMI_TYPE_GENRATE_CURVE + */ + FMI_REQUIRES_NOTHING = (1<<1), + /* refer to modifier instance */ + FMI_REQUIRES_RUNTIME_CHECK = (1<<2), +} eFMI_Requirement_Flags; + /* Function Prototypes for FModifierTypeInfo's */ FModifierTypeInfo *fmodifier_get_typeinfo(struct FModifier *fcm); FModifierTypeInfo *get_fmodifier_typeinfo(int type); /* ---------------------- */ -// TODO... general API here.. +struct FModifier *fcurve_active_modifier(struct FCurve *fcu); struct FModifier *fcurve_add_modifier(struct FCurve *fcu, int type); void fcurve_copy_modifiers(ListBase *dst, ListBase *src); void fcurve_remove_modifier(struct FCurve *fcu, struct FModifier *fcm); |