|
Blender V4.3
|
#include "DNA_curve_types.h"Go to the source code of this file.
Classes | |
| struct | DriverTargetContext |
Macros | |
| #define | DRIVER_TARGETS_LOOPER_BEGIN(dvar) |
| #define | DRIVER_TARGETS_USED_LOOPER_BEGIN(dvar) |
| #define | DRIVER_TARGETS_LOOPER_END |
Typedefs | |
| typedef struct DriverTargetContext | DriverTargetContext |
| typedef enum eDriverVariablePropertyResult | eDriverVariablePropertyResult |
Enumerations | |
| enum | eDriverVariablePropertyResult { DRIVER_VAR_PROPERTY_SUCCESS , DRIVER_VAR_PROPERTY_FALLBACK , DRIVER_VAR_PROPERTY_INVALID , DRIVER_VAR_PROPERTY_INVALID_INDEX } |
| #define DRIVER_TARGETS_LOOPER_BEGIN | ( | dvar | ) |
Definition at line 36 of file BKE_fcurve_driver.h.
Referenced by BKE_fcurve_blend_read_data(), do_version_bbone_easing_fcurve_fix(), do_version_bbone_len_scale_fcurve_fix(), do_version_bbone_scale_fcurve_fix(), driver_free_variable(), and driver_variables_copy().
| #define DRIVER_TARGETS_LOOPER_END |
Definition at line 50 of file BKE_fcurve_driver.h.
Referenced by BKE_animdata_merge_copy(), BKE_fcurve_blend_read_data(), BKE_fcurve_blend_write_data(), BKE_fcurve_foreach_id(), blender::deg::DepsgraphNodeBuilder::build_driver_variables(), blender::deg::DepsgraphRelationBuilder::build_driver_variables(), do_version_bbone_easing_fcurve_fix(), do_version_bbone_len_scale_fcurve_fix(), do_version_bbone_scale_fcurve_fix(), driver_change_variable_type(), driver_check_valid_targets(), driver_free_variable(), driver_variables_copy(), drivers_path_rename_fix(), dvar_eval_locDiff(), blender::ed::outliner::TreeElementDriverBase::expand(), fcurve_has_errors(), and joined_armature_fix_animdata_cb().
| #define DRIVER_TARGETS_USED_LOOPER_BEGIN | ( | dvar | ) |
Definition at line 43 of file BKE_fcurve_driver.h.
Referenced by BKE_animdata_merge_copy(), BKE_fcurve_blend_write_data(), BKE_fcurve_foreach_id(), blender::deg::DepsgraphNodeBuilder::build_driver_variables(), blender::deg::DepsgraphRelationBuilder::build_driver_variables(), driver_change_variable_type(), driver_check_valid_targets(), drivers_path_rename_fix(), dvar_eval_locDiff(), blender::ed::outliner::TreeElementDriverBase::expand(), fcurve_has_errors(), and joined_armature_fix_animdata_cb().
| typedef struct DriverTargetContext DriverTargetContext |
Get property from which the specific property can be found from.
This depends on the type of dvar:
r_prop is a pointer to an ID, which is used to resolve the target rna_path.r_prop is a pointer to an object from which transformation is read.r_prop points to a resolved data corresponding to the dtar->context_property accessed from the given evaluated context. This could either be an ID property for Active Scene, or a data property for Active View Layer.If the target property can not be resolved false is returned.
Definition at line 138 of file BKE_fcurve_driver.h.
| bool BKE_driver_expression_depends_on_time | ( | struct ChannelDriver * | driver | ) |
Check if the expression in the driver may depend on the current frame.
Definition at line 1248 of file fcurve_driver.cc.
References BKE_driver_has_simple_expression(), driver_check_simple_expr_depends_on_time(), DRIVER_TYPE_PYTHON, ChannelDriver::expr_simple, ChannelDriver::expression, python_driver_exression_depends_on_time(), and ChannelDriver::type.
| bool BKE_driver_has_simple_expression | ( | struct ChannelDriver * | driver | ) |
Check if the expression in the driver conforms to the simple subset.
Definition at line 1222 of file fcurve_driver.cc.
References BLI_expr_pylike_is_valid(), driver_compile_simple_expr(), and ChannelDriver::expr_simple.
Referenced by BKE_driver_expression_depends_on_time(), and graph_draw_driver_settings_panel().
| void BKE_driver_invalidate_expression | ( | struct ChannelDriver * | driver, |
| bool | expr_changed, | ||
| bool | varname_changed ) |
Reset cached compiled expression data.
Definition at line 1263 of file fcurve_driver.cc.
References BLI_expr_pylike_free(), DRIVER_FLAG_RECOMPILE, DRIVER_FLAG_RENAMEVAR, ChannelDriver::expr_simple, and ChannelDriver::flag.
Referenced by ANIM_driver_vars_paste(), driver_add_new_variable(), driver_free_variable_ex(), ui_but_anim_expression_create(), and ui_but_anim_expression_set().
| 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] ) |
Compute channel values for a rotational Transform Channel driver variable.
Definition at line 753 of file fcurve_driver.cc.
References BLI_assert, DTAR_ROTMODE_AUTO, DTAR_ROTMODE_EULER_MAX, DTAR_ROTMODE_EULER_MIN, DTAR_ROTMODE_QUATERNION, DTAR_ROTMODE_SWING_TWIST_X, DTAR_ROTMODE_SWING_TWIST_Z, mat4_to_eulO(), mat4_to_quat(), quat_split_swing_and_twist(), quaternion_to_angles(), and zero_v4().
Referenced by dvar_eval_transChan(), and transform_evaluate().
| struct DriverVar * driver_add_new_variable | ( | struct ChannelDriver * | driver | ) |
Add a new driver variable.
Definition at line 1012 of file fcurve_driver.cc.
References BKE_driver_invalidate_expression(), BLI_addtail(), BLI_uniquename(), BLT_I18NCONTEXT_ID_ACTION, CTX_DATA_, driver_change_variable_type(), DVAR_TYPE_SINGLE_PROP, MEM_callocN, DriverVar::name, offsetof, STRNCPY_UTF8, and ChannelDriver::variables.
Referenced by add_driver_with_target(), ANIM_add_driver(), ANIM_copy_as_driver(), driver_add_var_cb(), and idriver_to_cdriver().
Change the type of driver variable.
Definition at line 908 of file fcurve_driver.cc.
References DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER_BEGIN, DTAR_FLAG_ID_OB_ONLY, ELEM, get_dvar_typeinfo(), ID_OB, DriverVar::num_targets, DriverVarTypeInfo::num_targets, DriverVarTypeInfo::target_flags, and DriverVar::type.
Referenced by add_driver_with_target(), ANIM_add_driver(), driver_add_new_variable(), and idriver_to_cdriver().
Perform actual freeing driver variable and remove it from the given list.
Definition at line 858 of file fcurve_driver.cc.
References BLI_freelinkN(), DRIVER_TARGETS_LOOPER_BEGIN, DRIVER_TARGETS_LOOPER_END, and MEM_freeN().
Referenced by ANIM_driver_vars_copybuf_free(), and driver_free_variable_ex().
| void driver_free_variable_ex | ( | struct ChannelDriver * | driver, |
| struct DriverVar * | dvar ) |
Free the driver variable and do extra updates.
Definition at line 882 of file fcurve_driver.cc.
References BKE_driver_invalidate_expression(), driver_free_variable(), and ChannelDriver::variables.
Referenced by ANIM_driver_vars_paste(), driver_delete_var_cb(), and fcurve_free_driver().
| bool driver_get_target_property | ( | const DriverTargetContext * | driver_target_context, |
| struct DriverVar * | dvar, | ||
| struct DriverTarget * | dtar, | ||
| struct PointerRNA * | r_prop ) |
Definition at line 131 of file fcurve_driver.cc.
References driver_get_target_context_property(), DVAR_TYPE_CONTEXT_PROP, DriverTarget::id, RNA_id_pointer_create(), and DriverVar::type.
Referenced by blender::deg::DepsgraphNodeBuilder::build_driver_variables(), blender::deg::DepsgraphRelationBuilder::build_driver_variables(), driver_get_variable_property(), and dtar_get_prop_val().
| eDriverVariablePropertyResult driver_get_variable_property | ( | const struct AnimationEvalContext * | anim_eval_context, |
| struct ChannelDriver * | driver, | ||
| struct DriverVar * | dvar, | ||
| struct DriverTarget * | dtar, | ||
| bool | allow_no_index, | ||
| struct PointerRNA * | r_ptr, | ||
| struct PropertyRNA ** | r_prop, | ||
| int * | r_index ) |
Same as 'dtar_get_prop_val'. but get the RNA property.
Referenced by pyrna_driver_get_variable_value().
| float driver_get_variable_value | ( | const struct AnimationEvalContext * | anim_eval_context, |
| struct ChannelDriver * | driver, | ||
| struct DriverVar * | dvar ) |
Evaluate a Driver Variable to get a value that contributes to the final.
Referenced by BPY_driver_exec().
| void driver_variable_name_validate | ( | struct DriverVar * | dvar | ) |
Validate driver variable name (after being renamed).
Definition at line 937 of file fcurve_driver.cc.
References BPY_string_is_keyword(), DVAR_ALL_INVALID_FLAGS, DVAR_FLAG_INVALID_EMPTY, DVAR_FLAG_INVALID_HAS_DOT, DVAR_FLAG_INVALID_HAS_SPACE, DVAR_FLAG_INVALID_HAS_SPECIAL, DVAR_FLAG_INVALID_NAME, DVAR_FLAG_INVALID_PY_KEYWORD, DVAR_FLAG_INVALID_START_CHAR, DVAR_FLAG_INVALID_START_NUM, DriverVar::flag, IN_RANGE_INCL, and DriverVar::name.
| void driver_variable_unique_name | ( | struct DriverVar * | dvar | ) |
Ensure the driver variable's name is unique.
Assumes the driver variable has already been assigned to the driver, so that the prev/next pointers can be used to find the other variables.
Definition at line 1006 of file fcurve_driver.cc.
References BLI_listbase_from_link(), BLI_uniquename(), DriverVar::name, and offsetof.
Copy driver variables from src_vars list to dst_vars list.
Referenced by ANIM_copy_as_driver(), ANIM_driver_vars_copy(), and ANIM_driver_vars_paste().
| float evaluate_driver | ( | struct PathResolvedRNA * | anim_rna, |
| struct ChannelDriver * | driver, | ||
| struct ChannelDriver * | driver_orig, | ||
| const struct AnimationEvalContext * | anim_eval_context ) |
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.Referenced by blender::animrig::evaluate_driver_from_rna_pointer(), and evaluate_fcurve_driver().
| struct ChannelDriver * fcurve_copy_driver | ( | const struct ChannelDriver * | driver | ) |
This makes a copy of the given driver.
Referenced by ANIM_paste_driver(), and BKE_fcurve_copy().
| void fcurve_free_driver | ( | struct FCurve * | fcu | ) |
This frees the driver itself.
Definition at line 1044 of file fcurve_driver.cc.
References BLI_expr_pylike_free(), BPY_DECREF(), FCurve::driver, driver_free_variable_ex(), ELEM, ChannelDriver::expr_comp, ChannelDriver::expr_simple, ListBase::first, MEM_freeN(), DriverVar::next, and ChannelDriver::variables.
Referenced by BKE_fcurve_free().