Blender V2.61 - r43446
|
#include <math.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_constraint_types.h"
#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_fcurve.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_constraint.h"
#include "BKE_curve.h"
#include "BKE_global.h"
#include "BKE_object.h"
#include "BKE_utildefines.h"
#include "RNA_access.h"
Go to the source code of this file.
Classes | |
struct | DriverVarTypeInfo |
Defines | |
#define | SMALL -1.0e-10 |
#define | SELECT 1 |
#define | BEZT_BINARYSEARCH_THRESH 0.01f |
#define | BEGIN_DVAR_TYPEDEF(type) { |
#define | END_DVAR_TYPEDEF } |
Typedefs | |
typedef struct DriverVarTypeInfo | DriverVarTypeInfo |
Functions | |
void | free_fcurve (FCurve *fcu) |
void | free_fcurves (ListBase *list) |
FCurve * | copy_fcurve (FCurve *fcu) |
void | copy_fcurves (ListBase *dst, ListBase *src) |
FCurve * | id_data_find_fcurve (ID *id, void *data, StructRNA *type, const char *prop_name, int index, char *driven) |
FCurve * | list_find_fcurve (ListBase *list, const char rna_path[], const int array_index) |
FCurve * | iter_step_fcurve (FCurve *fcu_iter, const char rna_path[]) |
int | list_find_data_fcurves (ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName) |
FCurve * | rna_get_fcurve (PointerRNA *ptr, PropertyRNA *prop, int rnaindex, bAction **action, int *driven) |
int | binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short *replace) |
static void | get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple **last, const short do_sel_only) |
void | calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, const short do_sel_only) |
void | calc_fcurve_range (FCurve *fcu, float *start, float *end, const short do_sel_only, const short do_min_length) |
short | fcurve_are_keyframes_usable (FCurve *fcu) |
short | fcurve_is_keyframable (FCurve *fcu) |
void | bezt_add_to_cfra_elem (ListBase *lb, BezTriple *bezt) |
float | fcurve_samplingcb_evalcurve (FCurve *fcu, void *UNUSED(data), float evaltime) |
void | fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb) |
void | calchandles_fcurve (FCurve *fcu) |
void | testhandles_fcurve (FCurve *fcu, const short use_handle) |
void | sort_time_fcurve (FCurve *fcu) |
short | test_time_fcurve (FCurve *fcu) |
static ID * | dtar_id_ensure_proxy_from (ID *id) |
static float | dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar) |
static bPoseChannel * | dtar_get_pchan_ptr (ChannelDriver *driver, DriverTarget *dtar) |
static float | dvar_eval_singleProp (ChannelDriver *driver, DriverVar *dvar) |
static float | dvar_eval_rotDiff (ChannelDriver *driver, DriverVar *dvar) |
static float | dvar_eval_locDiff (ChannelDriver *driver, DriverVar *dvar) |
static float | dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar) |
static DriverVarTypeInfo * | get_dvar_typeinfo (int type) |
void | driver_free_variable (ChannelDriver *driver, DriverVar *dvar) |
void | driver_change_variable_type (DriverVar *dvar, int type) |
DriverVar * | driver_add_new_variable (ChannelDriver *driver) |
void | fcurve_free_driver (FCurve *fcu) |
ChannelDriver * | fcurve_copy_driver (ChannelDriver *driver) |
float | driver_get_variable_value (ChannelDriver *driver, DriverVar *dvar) |
static float | evaluate_driver (ChannelDriver *driver, const float evaltime) |
void | correct_bezpart (float *v1, float *v2, float *v3, float *v4) |
static int | findzero (float x, float q0, float q1, float q2, float q3, float *o) |
static void | berekeny (float f1, float f2, float f3, float f4, float *o, int b) |
static float | fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltime) |
static float | fcurve_eval_samples (FCurve *fcu, FPoint *fpts, float evaltime) |
float | evaluate_fcurve (FCurve *fcu, float evaltime) |
void | calculate_fcurve (FCurve *fcu, float ctime) |
Variables | |
static DriverVarTypeInfo | dvar_types [MAX_DVAR_TYPES] |
Definition in file fcurve.c.
#define BEZT_BINARYSEARCH_THRESH 0.01f |
Definition at line 355 of file fcurve.c.
Referenced by binarysearch_bezt_index().
#define SELECT 1 |
Definition at line 67 of file fcurve.c.
Referenced by acf_object_setting_flag(), act_markers_make_local_exec(), ActionFCurveToTransData(), actkeys_select_leftright(), AnimationImporter::add_bezt(), add_bezt_to_keyblocks_list(), add_marker_to_cfra_elem(), add_metaball_primitive(), addedgeface_mesh(), addface_from_edges(), AddNewBlenderMesh(), adduplicateflagNurb(), addvert_Nurb(), allow_render_object(), ANIM_deselect_anim_channels(), animchan_sync_fcurve(), animdata_filter_dopesheet(), animdata_filter_dopesheet_ob(), append_named_part_ex(), bezier_isfree(), bezt_add_to_cfra_elem(), bezt_calc_average(), bezt_to_cfraelem(), bezt_unit_mapping_apply(), bezts_to_new_actkeyblock(), BKE_tracking_deselect_track(), BKE_tracking_select_track(), blend_from_shape_exec(), BME_bevel_initialize(), BME_bmesh_to_editmesh(), BME_editmesh_to_bmesh(), BME_split_face(), border_select_exec(), borderselect_exec(), build_edgecollection(), calc_manipulator_stats(), calchandleNurb(), check_fgons_selection(), circle_select_exec(), clean_tracks_exec(), clear_invisible_track_selection(), clear_tilt_exec(), clear_trans_object_base_flags(), collect_quadedges(), columnselect_action_keys(), columnselect_graph_keys(), construct_param_handle(), convert_exec(), convert_poll(), convert_to_triface(), correct_uv_aspect(), count_fcurve_keys(), count_proportional_objects(), count_selected_edges(), createSlideVerts(), createTransCurveVerts(), createTransEdge(), createTransEditVerts(), createTransLatticeVerts(), createTransMBallVerts(), createTransObject(), createTransSeqData(), createTransTrackingData(), CU_select_all(), CU_select_swap(), cube_project_exec(), curvemap_buttons_delete(), cut_seq_hard(), cut_seq_list(), cut_seq_soft(), cylinder_project_exec(), del_seq_find_replace_recurs(), delete_exec(), delete_fcurve_keys(), delete_mesh(), delete_metaelems_exec(), deselect_nth_active(), deselectall_except(), detect_features_exec(), do_lasso_select_curve__doSelect(), do_lasso_select_lattice__doSelect(), do_lasso_select_meta(), do_lattice_box_select__doSelect(), do_meta_box_select(), do_nurbs_box_select__doSelect(), do_outliner_item_activate(), do_paintvert_box_select(), draw_dm_edges_sel__setDrawOptions(), draw_dm_edges_sel_interp__setDrawInterpOptions(), draw_dm_face_centers__mapFunc(), draw_dm_faces_sel__compareDrawOptions(), draw_dm_faces_sel__setDrawOptions(), draw_dm_verts__mapFunc(), draw_dupli_objects(), draw_editnurb(), draw_em_indices(), draw_em_measure_stats(), draw_empty_image(), draw_fcurve_handles(), draw_fcurve_vertices_handles(), draw_fcurve_vertices_keyframes(), draw_forcefield(), draw_keylist(), draw_marker(), draw_marker_areas(), draw_marker_slide_zones(), draw_markers_time(), draw_mesh_fancy(), draw_motion_path_instance(), draw_new_particle_system(), draw_object(), draw_pose_bones(), draw_seq_extensions(), draw_seq_handle(), draw_seq_strip(), draw_seq_strips(), draw_seq_text(), draw_shadedstrip(), draw_uvs_other(), drawcentercircle(), drawlamp(), drawmball(), drawSelectedVertices__mapFunc(), drawWireExtra(), dupli_extrude_cursor(), duplibase_for_convert(), duplicate_fcurve_keys(), duplicate_metaelems_exec(), ED_base_object_select(), ed_marker_add(), ed_marker_border_select_exec(), ed_marker_delete_exec(), ed_marker_duplicate_apply(), ed_marker_make_links_scene_exec(), ed_marker_move_apply(), ed_marker_move_init(), ed_marker_move_modal(), ed_marker_select(), ed_marker_select_all_exec(), ED_markers_get_first_selected(), ED_markers_get_minmax(), ED_markers_post_apply_transform(), ed_node_link_conditions(), ED_object_modifier_convert(), ed_screen_context(), ED_vgroup_give_parray(), ED_vgroup_mirror(), edge_rotate(), edge_rotate_selected(), edgering_sel(), edgetag_context_check(), editmesh_mark_seam(), editmesh_mark_sharp(), editmesh_set_connectivity_distance(), EM_backbuf_checkAndSelectVerts_obmode(), EM_clear_flag_all(), EM_convertsel(), EM_deselect_all(), EM_deselect_flush(), em_deselect_nth_edge(), em_deselect_nth_face(), em_deselect_nth_vert(), EM_get_actFace(), EM_hide_mesh(), EM_make_uv_vert_map(), EM_mesh_copy_edge(), EM_mesh_copy_face(), EM_mesh_copy_face_layer(), EM_nedges_selected(), EM_nfaces_selected(), EM_nvertices_selected(), EM_project_snap_verts(), EM_recalc_normal_direction(), EM_reveal_mesh(), EM_select_all(), EM_select_edge(), EM_select_face(), EM_select_flush(), EM_select_less(), EM_select_mirrored(), EM_select_more(), EM_select_swap(), EM_selectmode_flush(), EM_selectmode_set(), EM_set_flag_all(), EM_set_flag_all_selectmode(), em_snap_to_center(), em_snap_to_cursor(), EM_solidify(), EM_toggle_select_all(), EM_validate_selections(), endlocalview(), ensure_ed_vert_sel(), erase_edges(), erase_faces(), esubdivideflag(), extrude_mesh(), extrude_repeat_mesh_exec(), extrudeflag_edge(), extrudeflag_edges_indiv(), extrudeflag_face_indiv(), extrudeflag_verts_indiv(), extrudeflagNurb(), filelist_from_main(), fill_mesh(), fill_quad_double_adj_fan(), fill_quad_double_adj_inner(), fill_quad_double_adj_path(), fill_quad_double_op(), fill_quad_single(), fill_quad_singlevert(), fill_quad_triple(), fill_tri_double(), fill_tri_single(), find_neighboring_sequence(), find_next_prev_sequence(), findnearestedge__doClosest(), findnearestLattvert__doClosest(), findnearestvert__backbufIndextest(), findselectedNurbvert(), flip_normals(), flushTransSeq(), forEachCameraObjectInScene(), forEachLampObjectInScene(), GeometryFunctor::forEachMeshObjectInScene(), freeSeqData(), freeSlideVerts(), get_edge_center(), get_face_center(), get_new_constraint_target(), get_next_bake_face(), get_selected_and_linked_obs(), getTransformOrientation(), give_base_to_groups(), gp_stroke_to_bezier(), gp_stroke_to_path(), group_linkobs2scene_cb(), group_select_flag(), heat_bone_weighting(), hide_exec(), hide_metaelems_exec(), info_report_color(), initlocalview(), insert_vert_fcurve(), is_u_selected(), isNurbsel(), isNurbsel_count(), knife_cut_exec(), lattice_draw_verts(), latticecurve_circle_doSelect(), load_editMesh(), loop_multiselect(), loop_to_region(), make_editMball(), make_editMesh(), make_fgon(), make_prim(), make_segment_exec(), make_trans_verts(), mark_children(), material_slot_assign_exec(), material_slot_de_select(), mball_select_all_exec(), merge_2_nurb(), merge_firstlast(), merge_target(), mesh_add_edges(), mesh_add_verts(), mesh_duplicate_exec(), mesh_mirror_colors(), mesh_mirror_uvs(), mesh_noise_exec(), mesh_rip_invoke(), mesh_rotate_colors(), mesh_rotate_uvs(), mesh_separate_loose(), mesh_separate_material(), mesh_separate_selected(), mesh_set_smooth_faces(), mesh_to_curve(), mesh_vertices_randomize_exec(), mesh_vertices_sort_exec(), mirror_bezier_cframe(), mirror_bezier_marker(), mirror_bezier_value(), mirror_bezier_xaxis(), mirror_bezier_yaxis(), modifiers_isDeformedByArmature(), modifiers_isDeformedByLattice(), mouse_anim_channels(), mouse_graph_keys(), mouse_lattice(), mouse_mball(), mouse_mesh(), mouse_mesh_loop(), mouse_nla_channels(), mouse_nurb(), mouse_select(), mouse_select_eval_buffer(), mouse_weight_paint_vertex_select(), move_to_layer_exec(), nalloc_ak_bezt(), nalloc_ak_gpframe(), navmesh_face_add_exec(), navmesh_face_copy_exec(), node_add_node(), node_borderselect_exec(), node_delete_exec(), node_delete_reconnect_exec(), node_deselect_all(), node_draw_basis(), node_draw_hidden(), node_draw_link(), node_duplicate_exec(), node_flag_toggle_exec(), node_group_make_exec(), node_mouse_select(), node_mute_exec(), node_select_same_type(), node_select_same_type_np(), node_select_single(), node_socket_hilights(), node_socket_toggle_exec(), nupdate_ak_bezt(), nupdate_ak_gpframe(), nurb_has_selected_cps(), nurbscurve_circle_doSelect(), object_delete_exec(), object_deselect_cb(), object_hide_render_set_exec(), object_hide_view_clear_exec(), object_hide_view_set_exec(), OBJECT_OT_make_single_user(), object_select_all_exec(), object_select_cb(), object_select_linked_exec(), object_select_menu_exec(), object_select_same_group_exec(), outliner_build_tree(), outliner_draw_tree_element(), outside_lattice(), paintvert_deselect_all_visible(), paste_animedit_keys_fcurve(), pose_propagate_fcurve(), recurs_sel_seq(), region_to_loop(), removedoublesflag(), report_copy_exec(), report_delete_exec(), report_replay_exec(), report_select_all_toggle_exec(), reset_exec(), restrictbutton_gr_restrict_flag(), return_editcurve_indexar(), return_editlattice_indexar(), return_editmesh_indexar(), reveal_exec(), ringsel_finish(), rna_def_medge(), rna_def_mvert(), rna_def_object(), rna_def_sequence(), rna_def_trackingTrack(), scene_deselect_all(), scene_select_base(), screw_mesh_exec(), select_active_side(), select_adjacent_cp(), select_all_exec(), select_axis_exec(), select_bezier_add(), select_bezier_invert(), select_bezier_subtract(), select_by_number_vertices_exec(), select_editcurve_hook(), select_editlattice_hook(), select_editmesh_hook(), select_groped_exec(), select_grouped_children(), select_grouped_color(), select_grouped_data(), select_grouped_effect(), select_grouped_effect_link(), select_grouped_gameprops(), select_grouped_group(), select_grouped_index_object(), select_grouped_keyingset(), select_grouped_layer(), select_grouped_object_hooks(), select_grouped_siblings(), select_grouped_time_overlap(), select_grouped_type(), select_grouped_type_basic(), select_grouped_type_effect(), select_less_exec(), select_linked_exec(), select_linked_flat_faces(), select_linked_limited_invoke(), select_linked_pick_invoke(), select_linked_time(), select_more_exec(), select_more_less_seq__internal(), select_next_exec(), select_non_manifold(), select_previous_exec(), select_random_metaelems_exec(), select_report_pick_exec(), select_row_exec(), select_single_seq(), select_surrounding_handles(), select_timeline_marker_frame(), select_vertex_path_exec(), selectconnected_mesh_all(), selectrandom_curve(), selectrandom_mesh(), separate_armature_exec(), seq_effect_find_selected(), seq_remap_paths(), SeqToTransData(), SeqToTransData_Recursive(), SeqTransInfo(), sequencer_borderselect_exec(), sequencer_de_select_all_exec(), sequencer_delete_exec(), sequencer_lock_exec(), sequencer_meta_make_exec(), sequencer_meta_separate_exec(), sequencer_meta_toggle_exec(), sequencer_mute_exec(), sequencer_offset_clear_exec(), sequencer_rebuild_proxy_exec(), sequencer_reload_exec(), sequencer_select_active_side_exec(), sequencer_select_grouped_exec(), sequencer_select_handles_exec(), sequencer_select_inverse_exec(), sequencer_select_invoke(), sequencer_select_linked_pick_invoke(), sequencer_separate_images_exec(), sequencer_snap_exec(), sequencer_unlock_exec(), sequencer_unmute_exec(), sequencer_view_selected_exec(), set_bezier_align(), set_bezier_auto(), set_bezier_auto_clamped(), set_bezier_free(), set_bezier_vector(), set_bezt_bezier(), set_bezt_constant(), set_bezt_linear(), set_edge_directions_f2(), set_goal_weight_exec(), set_keytype_breakdown(), set_keytype_extreme(), set_keytype_jitter(), set_keytype_keyframe(), set_radius_exec(), set_scene_bg(), set_trans_object_base_flags(), sethandlesNurb(), shape_propagate(), similar_edge_select__internal(), similar_face_select__internal(), similar_vert_select_exec(), single_mat_users(), single_object_action_users(), skip_fcurve_selected_data(), smooth_exec(), smooth_radius_exec(), smooth_vertex(), snap_bezier_cframe(), snap_bezier_horizontal(), snap_bezier_nearest(), snap_bezier_nearestsec(), snap_bezier_nearmarker(), snap_bezier_value(), snapDerivedMesh(), snapObjects(), snode_make_group_editable(), solidify_exec(), special_transvert_update(), sphere_project_exec(), spin_mesh(), spin_nurb(), split_mesh(), stabilize_2d_select_exec(), stats_dupli_object(), stats_object_edit(), subdividenurb(), swap_selection_beztriple(), swap_selection_bpoint(), tekenhandlesN(), tekenvertsN(), testhandles_fcurve(), testhandlesNurb(), toggle_cyclic_exec(), touch_seq_files(), trackToTransData(), tree_element_active_sequence(), tree_element_active_sequence_dup(), ui_do_but_CURVE(), ui_draw_but_CURVE(), ui_numedit_but_CURVE(), unified_findnearest(), uv_from_view_exec(), uv_map_clip_correct(), uv_map_transform_center(), uvedit_edge_deselect(), uvedit_edge_select(), uvedit_edge_selected(), uvedit_face_selected(), uvedit_face_visible_nolocal(), uvedit_have_selection(), uvedit_set_tile(), uvedit_uv_deselect(), uvedit_uv_select(), uvedit_uv_selected(), v3d_editvertex_buts(), vertex_parent_set_exec(), vgroup_active_remove_verts(), vgroup_assign_verts(), vgroup_blend(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), vgroup_fix(), vgroup_select_verts(), view3d_context(), view3d_main_area_draw_objects(), weightFromDistance(), wpaint_fill(), and wpaint_stroke_update_step().
#define SMALL -1.0e-10 |
Definition at line 66 of file fcurve.c.
Referenced by findzero().
typedef struct DriverVarTypeInfo DriverVarTypeInfo |
static void berekeny | ( | float | f1, |
float | f2, | ||
float | f3, | ||
float | f4, | ||
float * | o, | ||
int | b | ||
) | [static] |
Definition at line 1823 of file fcurve.c.
Referenced by fcurve_eval_keyframes().
Definition at line 691 of file fcurve.c.
References BLI_addtail(), BLI_insertlinkbefore(), CfraElem::cfra, BezTriple::f2, ListBase::first, MEM_callocN(), CfraElem::next, CfraElem::sel, SELECT, and BezTriple::vec.
int binarysearch_bezt_index | ( | BezTriple | array[], |
float | frame, | ||
int | arraylen, | ||
short * | replace | ||
) |
Definition at line 360 of file fcurve.c.
References BEZT_BINARYSEARCH_THRESH, IS_EQT, NULL, and BezTriple::vec.
Referenced by delete_keyframe(), fcurve_frame_has_keyframe(), insert_bezt_fcurve(), and pose_propagate_fcurve().
void calc_fcurve_bounds | ( | FCurve * | fcu, |
float * | xmin, | ||
float * | xmax, | ||
float * | ymin, | ||
float * | ymax, | ||
const short | do_sel_only | ||
) |
Definition at line 479 of file fcurve.c.
References BEZSELECTED, FCurve::bezt, BLI_assert, FALSE, FCurve::fpt, G, G_DEBUG, get_fcurve_end_keyframes(), i, MAX2, MIN2, NULL, FCurve::totvert, TRUE, BezTriple::vec, and FPoint::vec.
Referenced by get_graph_keyframe_extents().
void calc_fcurve_range | ( | FCurve * | fcu, |
float * | start, | ||
float * | end, | ||
const short | do_sel_only, | ||
const short | do_min_length | ||
) |
Definition at line 561 of file fcurve.c.
References FCurve::bezt, BLI_assert, FALSE, FCurve::fpt, get_fcurve_end_keyframes(), max, MAX2, min, MIN2, NULL, FCurve::totvert, TRUE, FPoint::vec, and BezTriple::vec.
Referenced by calc_action_range(), and get_keyframe_extents().
void calchandles_fcurve | ( | FCurve * | fcu | ) |
Definition at line 778 of file fcurve.c.
References FCurve::bezt, calchandleNurb(), ELEM, FCurve::extend, FCURVE_EXTRAPOLATE_CONSTANT, BezTriple::h1, BezTriple::h2, HD_AUTO, HD_AUTO_ANIM, next, NULL, FCurve::totvert, and BezTriple::vec.
Referenced by AnimationImporter::add_bezt(), delete_fcurve_key(), insert_vert_fcurve(), mirror_action_keys(), mirror_graph_keys(), nlaedit_apply_scale_exec(), paste_animedit_keys_fcurve(), sample_fcurve(), sethandles_action_keys(), sethandles_graph_keys(), setipo_action_keys(), setipo_graph_keys(), smooth_fcurve(), snap_action_keys(), snap_graph_keys(), and testhandles_fcurve().
void calculate_fcurve | ( | FCurve * | fcu, |
float | ctime | ||
) |
Definition at line 2129 of file fcurve.c.
References FCurve::curval, FCurve::driver, DRIVER_FLAG_INVALID, evaluate_fcurve(), ChannelDriver::flag, FMI_TYPE_GENERATE_CURVE, list_has_suitable_fmodifier(), FCurve::modifiers, and FCurve::totvert.
Referenced by animsys_evaluate_action_group(), animsys_evaluate_drivers(), and animsys_evaluate_fcurves().
Definition at line 122 of file fcurve.c.
References FCurve::bezt, copy_fmodifiers(), FCurve::driver, fcurve_copy_driver(), FCurve::fpt, FCurve::grp, MEM_dupallocN(), FCurve::modifiers, FCurve::next, NULL, FCurve::prev, and FCurve::rna_path.
Referenced by ANIM_copy_driver(), copy_action(), copy_fcurves(), fcurve_path_rename(), icu_to_fcurves(), and seq_dupe_animdata().
Definition at line 154 of file fcurve.c.
References BLI_addtail(), copy_fcurve(), ELEM, ListBase::first, ListBase::last, FCurve::next, and NULL.
Referenced by BKE_copy_animdata(), copy_nlastrip(), editCurve_to_undoCurve(), object_copy_proxy_drivers(), and undoCurve_to_editCurve().
void correct_bezpart | ( | float * | v1, |
float * | v2, | ||
float * | v3, | ||
float * | v4 | ||
) |
Definition at line 1690 of file fcurve.c.
Referenced by curvemap_make_table(), draw_fcurve_curve_bezts(), and fcurve_eval_keyframes().
DriverVar* driver_add_new_variable | ( | ChannelDriver * | driver | ) | [read] |
Definition at line 1457 of file fcurve.c.
References BLI_addtail(), BLI_uniquename(), driver_change_variable_type(), DRIVER_FLAG_RENAMEVAR, DRIVER_TYPE_PYTHON, DVAR_TYPE_SINGLE_PROP, ChannelDriver::flag, MEM_callocN(), DriverVar::name, NULL, ChannelDriver::type, and ChannelDriver::variables.
Referenced by ANIM_add_driver(), driver_add_var_cb(), and idriver_to_cdriver().
void driver_change_variable_type | ( | DriverVar * | dvar, |
int | type | ||
) |
Definition at line 1427 of file fcurve.c.
References DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER, DTAR_FLAG_ID_OB_ONLY, ELEM, get_dvar_typeinfo(), ID_OB, NULL, DriverVarTypeInfo::num_targets, DriverVar::num_targets, DriverVarTypeInfo::target_flags, and DriverVar::type.
Referenced by ANIM_add_driver(), driver_add_new_variable(), and idriver_to_cdriver().
void driver_free_variable | ( | ChannelDriver * | driver, |
DriverVar * | dvar | ||
) |
Definition at line 1397 of file fcurve.c.
References BLI_freelinkN(), DRIVER_FLAG_RENAMEVAR, DRIVER_TARGETS_LOOPER, DRIVER_TARGETS_LOOPER_END, DRIVER_TYPE_PYTHON, ChannelDriver::flag, MEM_freeN(), NULL, ChannelDriver::type, and ChannelDriver::variables.
Referenced by driver_delete_var_cb(), and fcurve_free_driver().
float driver_get_variable_value | ( | ChannelDriver * | driver, |
DriverVar * | dvar | ||
) |
Definition at line 1550 of file fcurve.c.
References DriverVar::curval, ELEM, get_dvar_typeinfo(), DriverVarTypeInfo::get_value, NULL, and DriverVar::type.
Referenced by BPY_driver_exec(), and evaluate_driver().
static bPoseChannel* dtar_get_pchan_ptr | ( | ChannelDriver * | driver, |
DriverTarget * | dtar | ||
) | [static] |
Definition at line 1074 of file fcurve.c.
References dtar_id_ensure_proxy_from(), ELEM, get_pose_channel(), GS, DriverTarget::id, ID::name, NULL, DriverTarget::pchan_name, and Object::pose.
Referenced by dvar_eval_rotDiff().
static float dtar_get_prop_val | ( | ChannelDriver * | driver, |
DriverTarget * | dtar | ||
) | [static] |
Definition at line 995 of file fcurve.c.
References DRIVER_FLAG_INVALID, dtar_id_ensure_proxy_from(), ELEM, ChannelDriver::flag, G, G_DEBUG, DriverTarget::id, ID::name, NULL, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, RNA_id_pointer_create(), DriverTarget::rna_path, RNA_path_resolve_full(), RNA_property_array_check(), RNA_property_array_length(), RNA_property_boolean_get(), RNA_property_boolean_get_index(), RNA_property_enum_get(), RNA_property_float_get(), RNA_property_float_get_index(), RNA_property_int_get(), RNA_property_int_get_index(), and RNA_property_type().
Referenced by dvar_eval_singleProp().
Definition at line 987 of file fcurve.c.
References GS, ID_OB, and ID::name.
Referenced by dtar_get_pchan_ptr(), dtar_get_prop_val(), dvar_eval_locDiff(), and dvar_eval_transChan().
static float dvar_eval_locDiff | ( | ChannelDriver * | driver, |
DriverVar * | dvar | ||
) | [static] |
Definition at line 1145 of file fcurve.c.
References constraint_mat_convertspace(), CONSTRAINT_SPACE_LOCAL, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_WORLD, copy_m4_m4(), copy_v3_v3(), DRIVER_FLAG_INVALID, DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER, DTAR_FLAG_LOCAL_CONSTS, DTAR_FLAG_LOCALSPACE, dtar_id_ensure_proxy_from(), ChannelDriver::flag, get_pose_channel(), GS, Object::id, ID_OB, len_v3v3(), Object::loc, bPoseChannel::loc, mul_m4_v3(), ID::name, NULL, Object::obmat, Object::pose, bPoseChannel::pose_head, and bPoseChannel::pose_mat.
static float dvar_eval_rotDiff | ( | ChannelDriver * | driver, |
DriverVar * | dvar | ||
) | [static] |
Definition at line 1106 of file fcurve.c.
References ABS, angle(), DRIVER_FLAG_INVALID, dtar_get_pchan_ptr(), ELEM, ChannelDriver::flag, invert_qt(), M_PI, mat4_to_quat(), mul_qt_qtqt(), NULL, bPoseChannel::pose_mat, saacos(), and DriverVar::targets.
static float dvar_eval_singleProp | ( | ChannelDriver * | driver, |
DriverVar * | dvar | ||
) | [static] |
Definition at line 1099 of file fcurve.c.
References dtar_get_prop_val(), and DriverVar::targets.
static float dvar_eval_transChan | ( | ChannelDriver * | driver, |
DriverVar * | dvar | ||
) | [static] |
Definition at line 1237 of file fcurve.c.
References compatible_eul(), constraint_mat_convertspace(), CONSTRAINT_SPACE_LOCAL, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_WORLD, copy_m4_m4(), copy_v3_v3(), DRIVER_FLAG_INVALID, DTAR_FLAG_LOCAL_CONSTS, DTAR_FLAG_LOCALSPACE, dtar_id_ensure_proxy_from(), DTAR_TRANSCHAN_ROTX, DTAR_TRANSCHAN_SCALEX, bPoseChannel::eul, DriverTarget::flag, ChannelDriver::flag, get_pose_channel(), GS, Object::id, DriverTarget::id, ID_OB, mat4_to_eulO(), mat4_to_size(), MAX_DTAR_TRANSCHAN_TYPES, mult_m4_m4m4(), ID::name, NULL, object_to_mat4(), Object::obmat, DriverTarget::pchan_name, pchan_to_mat4(), Object::pose, bPoseChannel::pose_mat, Object::rot, ROT_MODE_EUL, Object::rotmode, bPoseChannel::rotmode, DriverVar::targets, and DriverTarget::transChan.
static float evaluate_driver | ( | ChannelDriver * | driver, |
const float | evaltime | ||
) | [static] |
Definition at line 1576 of file fcurve.c.
References BPY_driver_exec(), ChannelDriver::curval, DRIVER_FLAG_INVALID, driver_get_variable_value(), DRIVER_TYPE_AVERAGE, DRIVER_TYPE_MAX, DRIVER_TYPE_MIN, DRIVER_TYPE_PYTHON, DRIVER_TYPE_SUM, ChannelDriver::expression, ListBase::first, ChannelDriver::flag, ListBase::last, DriverVar::next, DriverVar::prev, ChannelDriver::type, and ChannelDriver::variables.
Referenced by evaluate_fcurve().
float evaluate_fcurve | ( | FCurve * | fcu, |
float | evaltime | ||
) |
Definition at line 2089 of file fcurve.c.
References FCurve::bezt, FCurve::driver, evaluate_driver(), evaluate_time_fmodifiers(), evaluate_value_fmodifiers(), fcurve_eval_keyframes(), fcurve_eval_samples(), FCURVE_INT_VALUES, FCurve::flag, floorf, FCurve::fpt, and FCurve::modifiers.
Referenced by calculate_fcurve(), draw_fcurve_curve(), AnimationImporter::evaluate_animation(), fcurve_samplingcb_evalcurve(), BL_ScalarInterpolator::GetValue(), new_key_needed(), nla_draw_strip_curves(), nlastrip_evaluate_actionclip(), pose_slide_apply_quat(), pose_slide_apply_val(), sample_fcurve(), seq_render_effect_strip_impl(), and sequence_effect_speed_rebuild_map().
short fcurve_are_keyframes_usable | ( | FCurve * | fcu | ) |
Definition at line 613 of file fcurve.c.
References FModifier::data, data, FCM_GENERATOR_ADDITIVE, ListBase::first, FMod_FunctionGenerator::flag, FMod_Generator::flag, FModifier::flag, FMODIFIER_FLAG_DISABLED, FMODIFIER_FLAG_MUTED, FMODIFIER_TYPE_CYCLES, FMODIFIER_TYPE_FN_GENERATOR, FMODIFIER_TYPE_GENERATOR, FMODIFIER_TYPE_NOISE, FMODIFIER_TYPE_STEPPED, FCurve::fpt, if(), ListBase::last, FCurve::modifiers, NULL, FModifier::prev, and FModifier::type.
Referenced by fcurve_is_keyframable(), graph_draw_curves(), and graphop_visible_keyframes_poll().
ChannelDriver* fcurve_copy_driver | ( | ChannelDriver * | driver | ) | [read] |
Definition at line 1515 of file fcurve.c.
References BLI_duplicatelist(), DRIVER_TARGETS_LOOPER, DRIVER_TARGETS_LOOPER_END, ChannelDriver::expr_comp, ListBase::first, ListBase::last, MEM_dupallocN(), DriverVar::next, NULL, and ChannelDriver::variables.
Referenced by ANIM_paste_driver(), and copy_fcurve().
Definition at line 1861 of file fcurve.c.
References berekeny(), BEZT_IPO_CONST, BEZT_IPO_LIN, correct_bezpart(), FCurve::extend, fabs(), FCURVE_DISCRETE_VALUES, FCURVE_EXTRAPOLATE_LINEAR, findzero(), FCurve::flag, BezTriple::ipo, SMALL_NUMBER, FCurve::totvert, and BezTriple::vec.
Referenced by evaluate_fcurve().
Definition at line 2049 of file fcurve.c.
References abs(), interpf(), FCurve::totvert, and FPoint::vec.
Referenced by evaluate_fcurve().
void fcurve_free_driver | ( | FCurve * | fcu | ) |
Definition at line 1487 of file fcurve.c.
References BPY_DECREF(), FCurve::driver, driver_free_variable(), ELEM, ChannelDriver::expr_comp, ListBase::first, MEM_freeN(), DriverVar::next, NULL, and ChannelDriver::variables.
Referenced by free_fcurve().
short fcurve_is_keyframable | ( | FCurve * | fcu | ) |
Definition at line 674 of file fcurve.c.
References AGRP_PROTECTED, fcurve_are_keyframes_usable(), FCURVE_PROTECTED, FCurve::flag, bActionGroup::flag, and FCurve::grp.
Referenced by graphkeys_click_insert_exec(), graphop_editable_keyframes_poll(), and insert_keyframe_direct().
float fcurve_samplingcb_evalcurve | ( | FCurve * | fcu, |
void * | UNUSEDdata, | ||
float | evaltime | ||
) |
Definition at line 724 of file fcurve.c.
References evaluate_fcurve().
void fcurve_store_samples | ( | FCurve * | fcu, |
void * | data, | ||
int | start, | ||
int | end, | ||
FcuSampleFunc | sample_cb | ||
) |
Definition at line 734 of file fcurve.c.
References FCurve::bezt, ELEM, FCurve::fpt, MEM_callocN(), MEM_freeN(), NULL, FCurve::totvert, and FPoint::vec.
Referenced by bake_graph_curves(), and fcurve_bake_modifiers().
static int findzero | ( | float | x, |
float | q0, | ||
float | q1, | ||
float | q2, | ||
float | q3, | ||
float * | o | ||
) | [static] |
Definition at line 1729 of file fcurve.c.
References acos(), cos(), simple_enum_gen::d, p, SMALL, sqrt(), and sqrt3d().
Referenced by fcurve_eval_keyframes().
void free_fcurve | ( | FCurve * | fcu | ) |
Definition at line 74 of file fcurve.c.
References FCurve::bezt, fcurve_free_driver(), FCurve::fpt, free_fmodifiers(), MEM_freeN(), FCurve::modifiers, NULL, and FCurve::rna_path.
Referenced by ANIM_fcurve_delete_from_animdata(), ANIM_remove_driver(), animchannels_delete_exec(), fcurve_path_rename(), fcurve_remove(), free_anim_drivers_copybuf(), free_fcurves(), seq_free_animdata(), and AnimationImporter::~AnimationImporter().
void free_fcurves | ( | ListBase * | list | ) |
Definition at line 98 of file fcurve.c.
References ListBase::first, free_fcurve(), ListBase::last, FCurve::next, and NULL.
Referenced by BKE_free_animdata(), cleardrivers_animdata_cb(), do_versions_ipos_to_animato(), free_action(), free_nlastrip(), free_undoCurve(), graph_free(), graphkeys_clear_ghostcurves_exec(), object_copy_proxy_drivers(), and undoCurve_to_editCurve().
static DriverVarTypeInfo* get_dvar_typeinfo | ( | int | type | ) | [static] |
Definition at line 1385 of file fcurve.c.
References MAX_DVAR_TYPES, and NULL.
Referenced by driver_change_variable_type(), and driver_get_variable_value().
static void get_fcurve_end_keyframes | ( | FCurve * | fcu, |
BezTriple ** | first, | ||
BezTriple ** | last, | ||
const short | do_sel_only | ||
) | [static] |
Definition at line 436 of file fcurve.c.
References ARRAY_LAST_ITEM, BEZSELECTED, FCurve::bezt, i, NULL, and FCurve::totvert.
Referenced by calc_fcurve_bounds(), and calc_fcurve_range().
FCurve* id_data_find_fcurve | ( | ID * | id, |
void * | data, | ||
StructRNA * | type, | ||
const char * | prop_name, | ||
int | index, | ||
char * | driven | ||
) | [read] |
Definition at line 175 of file fcurve.c.
References AnimData::action, BKE_animdata_from_id(), bAction::curves, AnimData::drivers, ELEM, FALSE, ListBase::first, list_find_fcurve(), MEM_freeN(), NULL, RNA_path_from_ID_to_property(), RNA_pointer_create(), RNA_struct_find_property(), and TRUE.
Referenced by seq_render_effect_strip_impl(), sequence_effect_speed_rebuild_map(), and sound_update_animation_flags_exec().
Definition at line 244 of file fcurve.c.
References ELEM, FCurve::next, NULL, and FCurve::rna_path.
Referenced by ANIM_remove_driver().
int list_find_data_fcurves | ( | ListBase * | dst, |
ListBase * | src, | ||
const char * | dataPrefix, | ||
const char * | dataName | ||
) |
Definition at line 273 of file fcurve.c.
References BLI_addtail(), BLI_getQuotedStr(), LinkData::data, ELEM4, ListBase::first, MEM_callocN(), MEM_freeN(), FCurve::next, NULL, and FCurve::rna_path.
Definition at line 221 of file fcurve.c.
References FCurve::array_index, ELEM, ListBase::first, FCurve::next, NULL, and FCurve::rna_path.
Referenced by BKE_nlastrip_validate_fcurves(), id_data_find_fcurve(), insert_key_button_exec(), make_new_animlistelem(), nla_draw_strip_curves(), pyrna_struct_driver_add(), rna_get_fcurve(), verify_driver_fcurve(), and verify_fcurve().
FCurve* rna_get_fcurve | ( | PointerRNA * | ptr, |
PropertyRNA * | prop, | ||
int | rnaindex, | ||
bAction ** | action, | ||
int * | driven | ||
) | [read] |
Definition at line 311 of file fcurve.c.
References AnimData::action, BKE_animdata_from_id(), bAction::curves, PointerRNA::data, AnimData::drivers, ListBase::first, PointerRNA::id, list_find_fcurve(), MEM_freeN(), NULL, RNA_path_from_ID_to_property(), and RNA_property_animateable().
Referenced by node_animation_properties(), and ui_but_get_fcurve().
void sort_time_fcurve | ( | FCurve * | fcu | ) |
Definition at line 887 of file fcurve.c.
References FCurve::bezt, SWAP, FCurve::totvert, and BezTriple::vec.
Referenced by ANIM_editkeyframes_refresh(), graphedit_activekey_update_cb(), and remake_graph_transdata().
short test_time_fcurve | ( | FCurve * | fcu | ) |
Definition at line 930 of file fcurve.c.
References FCurve::bezt, FCurve::fpt, NULL, FCurve::totvert, BezTriple::vec, and FPoint::vec.
void testhandles_fcurve | ( | FCurve * | fcu, |
const short | use_handle | ||
) |
Definition at line 831 of file fcurve.c.
References FCurve::bezt, calchandles_fcurve(), ELEM, BezTriple::f1, BezTriple::f2, BezTriple::f3, FALSE, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, HD_VECT, if(), NULL, and SELECT.
Referenced by ANIM_editkeyframes_refresh(), graphedit_activekey_update_cb(), posttrans_fcurve_clean(), and remake_graph_transdata().
DriverVarTypeInfo dvar_types[MAX_DVAR_TYPES] [static] |
{ dvar_eval_singleProp, 1, {"Property"}, {0} END_DVAR_TYPEDEF, dvar_eval_rotDiff, 2, {"Bone 1", "Bone 2"}, {DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY, DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY} END_DVAR_TYPEDEF, dvar_eval_locDiff, 2, {"Object/Bone 1", "Object/Bone 2"}, {DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY, DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY} END_DVAR_TYPEDEF, dvar_eval_transChan, 1, {"Object/Bone"}, {DTAR_FLAG_STRUCT_REF|DTAR_FLAG_ID_OB_ONLY} END_DVAR_TYPEDEF, }