Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_fcurve.h
| Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | |||||
| void set_active_fmodifier(ListBase *modifiers, struct FModifier *fcm); | void set_active_fmodifier(ListBase *modifiers, struct FModifier *fcm); | ||||
| /** | /** | ||||
| * Do we have any modifiers which match certain criteria. | * Do we have any modifiers which match certain criteria. | ||||
| * | * | ||||
| * \param mtype: Type of modifier (if 0, doesn't matter). | * \param mtype: Type of modifier (if 0, doesn't matter). | ||||
| * \param acttype: Type of action to perform (if -1, doesn't matter). | * \param acttype: Type of action to perform (if -1, doesn't matter). | ||||
| */ | */ | ||||
| bool list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype); | bool list_has_suitable_fmodifier(const ListBase *modifiers, int mtype, short acttype); | ||||
| typedef struct FModifiersStackStorage { | typedef struct FModifiersStackStorage { | ||||
| uint modifier_count; | uint modifier_count; | ||||
| uint size_per_modifier; | uint size_per_modifier; | ||||
| void *buffer; | void *buffer; | ||||
| } FModifiersStackStorage; | } FModifiersStackStorage; | ||||
| uint evaluate_fmodifiers_storage_size_per_modifier(ListBase *modifiers); | uint evaluate_fmodifiers_storage_size_per_modifier(ListBase *modifiers); | ||||
| ▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | int BKE_fcurve_pathcache_find_array(struct FCurvePathCache *fcache, | ||||
| const char *rna_path, | const char *rna_path, | ||||
| struct FCurve **fcurve_result, | struct FCurve **fcurve_result, | ||||
| int fcurve_result_len); | int fcurve_result_len); | ||||
| /** | /** | ||||
| * Calculate the extents of F-Curve's keyframes. | * Calculate the extents of F-Curve's keyframes. | ||||
| */ | */ | ||||
| bool BKE_fcurve_calc_range( | bool BKE_fcurve_calc_range( | ||||
| struct FCurve *fcu, float *min, float *max, bool do_sel_only, bool do_min_length); | const struct FCurve *fcu, float *min, float *max, bool do_sel_only, bool do_min_length); | ||||
| /** | /** | ||||
| * Calculate the extents of F-Curve's data. | * Calculate the extents of F-Curve's data. | ||||
| */ | */ | ||||
| bool BKE_fcurve_calc_bounds(struct FCurve *fcu, | bool BKE_fcurve_calc_bounds(const struct FCurve *fcu, | ||||
| float *xmin, | float *xmin, | ||||
| float *xmax, | float *xmax, | ||||
| float *ymin, | float *ymin, | ||||
| float *ymax, | float *ymax, | ||||
| bool do_sel_only, | bool do_sel_only, | ||||
| bool include_handles); | bool include_handles); | ||||
| /** | /** | ||||
| Show All 30 Lines | |||||
| /* .............. */ | /* .............. */ | ||||
| /** | /** | ||||
| * Are keyframes on F-Curve of any use (to final result, and to show in editors)? | * Are keyframes on F-Curve of any use (to final result, and to show in editors)? | ||||
| * Usability of keyframes refers to whether they should be displayed, | * Usability of keyframes refers to whether they should be displayed, | ||||
| * and also whether they will have any influence on the final result. | * and also whether they will have any influence on the final result. | ||||
| */ | */ | ||||
| bool BKE_fcurve_are_keyframes_usable(struct FCurve *fcu); | bool BKE_fcurve_are_keyframes_usable(const struct FCurve *fcu); | ||||
| /** | /** | ||||
| * Can keyframes be added to F-Curve? | * Can keyframes be added to F-Curve? | ||||
| * Keyframes can only be added if they are already visible. | * Keyframes can only be added if they are already visible. | ||||
| */ | */ | ||||
| bool BKE_fcurve_is_keyframable(struct FCurve *fcu); | bool BKE_fcurve_is_keyframable(const struct FCurve *fcu); | ||||
| bool BKE_fcurve_is_protected(struct FCurve *fcu); | bool BKE_fcurve_is_protected(const struct FCurve *fcu); | ||||
| /** | /** | ||||
| * Are any of the keyframe control points selected on the F-Curve? | * Are any of the keyframe control points selected on the F-Curve? | ||||
| */ | */ | ||||
| bool BKE_fcurve_has_selected_control_points(const struct FCurve *fcu); | bool BKE_fcurve_has_selected_control_points(const struct FCurve *fcu); | ||||
| /** | /** | ||||
| * Checks if the F-Curve has a Cycles modifier with simple settings | * Checks if the F-Curve has a Cycles modifier with simple settings | ||||
| * that warrant transition smoothing. | * that warrant transition smoothing. | ||||
| */ | */ | ||||
| bool BKE_fcurve_is_cyclic(struct FCurve *fcu); | bool BKE_fcurve_is_cyclic(const struct FCurve *fcu); | ||||
| /* Type of infinite cycle for a curve. */ | /* Type of infinite cycle for a curve. */ | ||||
| typedef enum eFCU_Cycle_Type { | typedef enum eFCU_Cycle_Type { | ||||
| FCU_CYCLE_NONE = 0, | FCU_CYCLE_NONE = 0, | ||||
| /* The cycle repeats identically to the base range. */ | /* The cycle repeats identically to the base range. */ | ||||
| FCU_CYCLE_PERFECT, | FCU_CYCLE_PERFECT, | ||||
| /* The cycle accumulates the change between start and end keys. */ | /* The cycle accumulates the change between start and end keys. */ | ||||
| FCU_CYCLE_OFFSET, | FCU_CYCLE_OFFSET, | ||||
| } eFCU_Cycle_Type; | } eFCU_Cycle_Type; | ||||
| /** | /** | ||||
| * Checks if the F-Curve has a Cycles modifier, and returns the type of the cycle behavior. | * Checks if the F-Curve has a Cycles modifier, and returns the type of the cycle behavior. | ||||
| */ | */ | ||||
| eFCU_Cycle_Type BKE_fcurve_get_cycle_type(struct FCurve *fcu); | eFCU_Cycle_Type BKE_fcurve_get_cycle_type(const struct FCurve *fcu); | ||||
| /** | /** | ||||
| * Recompute bezier handles of all three given BezTriples, so that `bezt` can be inserted between | * Recompute bezier handles of all three given BezTriples, so that `bezt` can be inserted between | ||||
| * `prev` and `next` without changing the resulting curve shape. | * `prev` and `next` without changing the resulting curve shape. | ||||
| * | * | ||||
| * \param r_pdelta: return Y difference between `bezt` and the original curve value at its X | * \param r_pdelta: return Y difference between `bezt` and the original curve value at its X | ||||
| * position. | * position. | ||||
| * \return Whether the split was successful. | * \return Whether the split was successful. | ||||
| ▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
| float evaluate_fcurve_only_curve(struct FCurve *fcu, float evaltime); | float evaluate_fcurve_only_curve(struct FCurve *fcu, float evaltime); | ||||
| float evaluate_fcurve_driver(struct PathResolvedRNA *anim_rna, | float evaluate_fcurve_driver(struct PathResolvedRNA *anim_rna, | ||||
| struct FCurve *fcu, | struct FCurve *fcu, | ||||
| struct ChannelDriver *driver_orig, | struct ChannelDriver *driver_orig, | ||||
| const struct AnimationEvalContext *anim_eval_context); | const struct AnimationEvalContext *anim_eval_context); | ||||
| /** | /** | ||||
| * Checks if the curve has valid keys, drivers or modifiers that produce an actual curve. | * Checks if the curve has valid keys, drivers or modifiers that produce an actual curve. | ||||
| */ | */ | ||||
| bool BKE_fcurve_is_empty(struct FCurve *fcu); | bool BKE_fcurve_is_empty(const struct FCurve *fcu); | ||||
| /** | /** | ||||
| * Calculate the value of the given F-Curve at the given frame, | * Calculate the value of the given F-Curve at the given frame, | ||||
| * and store it's value in #FCurve.curval. | * and store it's value in #FCurve.curval. | ||||
| */ | */ | ||||
| float calculate_fcurve(struct PathResolvedRNA *anim_rna, | float calculate_fcurve(struct PathResolvedRNA *anim_rna, | ||||
| struct FCurve *fcu, | struct FCurve *fcu, | ||||
| const struct AnimationEvalContext *anim_eval_context); | const struct AnimationEvalContext *anim_eval_context); | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||