diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-07 09:19:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-07 09:38:48 +0300 |
commit | ffc4c126f5416b04a01653e7a03451797b98aba4 (patch) | |
tree | ac63d70d33aae5ab1666c9c2f62058c9c1eebd5c /source/blender/blenkernel/BKE_fcurve_driver.h | |
parent | f159d49f56cedccd509ee93f5a5fb51f4f39eeb8 (diff) |
Cleanup: move public doc-strings into headers for 'blenkernel'
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
Diffstat (limited to 'source/blender/blenkernel/BKE_fcurve_driver.h')
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve_driver.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve_driver.h b/source/blender/blenkernel/BKE_fcurve_driver.h index 5b4da4a78a4..af4c970241f 100644 --- a/source/blender/blenkernel/BKE_fcurve_driver.h +++ b/source/blender/blenkernel/BKE_fcurve_driver.h @@ -66,34 +66,84 @@ struct PropertyRNA; /* ---------------------- */ +/** + * This frees the driver itself. + */ void fcurve_free_driver(struct FCurve *fcu); +/** + * This makes a copy of the given driver. + */ struct ChannelDriver *fcurve_copy_driver(const struct ChannelDriver *driver); +/** + * Copy driver variables from src_vars list to dst_vars list. + */ void driver_variables_copy(struct ListBase *dst_vars, const struct ListBase *src_vars); +/** + * Compute channel values for a rotational Transform Channel driver variable. + */ void BKE_driver_target_matrix_to_rot_channels( float mat[4][4], int auto_order, int rotation_mode, int channel, bool angles, float r_buf[4]); +/** + * Perform actual freeing driver variable and remove it from the given list. + */ void driver_free_variable(struct ListBase *variables, struct DriverVar *dvar); +/** + * Free the driver variable and do extra updates. + */ void driver_free_variable_ex(struct ChannelDriver *driver, struct DriverVar *dvar); +/** + * Change the type of driver variable. + */ void driver_change_variable_type(struct DriverVar *dvar, int type); +/** + * Validate driver name (after being renamed). + */ void driver_variable_name_validate(struct DriverVar *dvar); +/** + * Add a new driver variable. + */ struct DriverVar *driver_add_new_variable(struct ChannelDriver *driver); +/** + * Evaluate a Driver Variable to get a value that contributes to the final. + */ float driver_get_variable_value(struct ChannelDriver *driver, struct DriverVar *dvar); +/** + * Same as 'dtar_get_prop_val'. but get the RNA property. + */ bool driver_get_variable_property(struct ChannelDriver *driver, struct DriverTarget *dtar, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index); +/** + * Check if the expression in the driver conforms to the simple subset. + */ bool BKE_driver_has_simple_expression(struct ChannelDriver *driver); +/** + * Check if the expression in the driver may depend on the current frame. + */ bool BKE_driver_expression_depends_on_time(struct ChannelDriver *driver); +/** + * Reset cached compiled expression data. + */ void BKE_driver_invalidate_expression(struct ChannelDriver *driver, bool expr_changed, bool varname_changed); +/** + * Evaluate an Channel-Driver to get a 'time' value to use + * instead of `anim_eval_context->eval_time`. + * + * - `anim_eval_context->eval_time` is the frame at which F-Curve is being evaluated. + * - Has to return a float value. + * - \a driver_orig is where we cache Python expressions, in case of COW + */ float evaluate_driver(struct PathResolvedRNA *anim_rna, struct ChannelDriver *driver, struct ChannelDriver *driver_orig, |