88 int current_id_index = 0;
90 ids[current_id_index++] = &mpt->ob->id;
147 for (mpt = targets->
first; mpt; mpt = mpt->
next) {
153 if ((cframe < mpath->start_frame) || (cframe >=
mpath->
end_frame)) {
187 float mframe = (
float)(cframe);
201 mpath_eval = (pchan_eval) ? pchan_eval->
mpath :
NULL;
224 return &mpt->
ob->
avs;
232 *r_sfra =
min_ii(*r_sfra, mpt->mpath->start_frame);
233 *r_efra =
max_ii(*r_efra, mpt->mpath->end_frame);
243 float current_frame_float = current_frame;
250 return key_data->
cfra;
267 float current_frame_float = current_frame;
274 return key_data->
cfra;
289 if (adt ==
NULL || fcurve_list ==
NULL) {
340 if (fcu_sfra <= fcu_efra) {
341 *r_sfra =
min_ii(*r_sfra, fcu_sfra);
342 *r_efra =
max_ii(*r_efra, fcu_efra);
374 const int cfra =
CFRA;
375 int sfra = INT_MAX, efra = INT_MIN;
382 if (cfra < sfra || cfra > efra) {
411 if (is_active_depsgraph) {
446 int mpt_sfra, mpt_efra;
448 if (mpt_sfra <= mpt_efra) {
449 sfra =
min_ii(sfra, mpt_sfra);
450 efra =
max_ii(efra, mpt_efra);
463 "Calculating MotionPaths between frames %d - %d (%d frames)",
490 if (is_active_depsgraph) {
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
struct bActionGroup * BKE_action_group_find_name(struct bAction *act, const char name[])
struct AnimData * BKE_animdata_from_id(struct ID *id)
void BKE_scene_graph_update_tagged(struct Depsgraph *depsgraph, struct Main *bmain)
void BKE_scene_graph_update_for_newframe(struct Depsgraph *depsgraph)
void BLI_dlrbTree_init(DLRBT_Tree *tree)
DLRBT_Node * BLI_dlrbTree_search_exact(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
void BLI_dlrbTree_free(DLRBT_Tree *tree)
DLRBT_Node * BLI_dlrbTree_search_next(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
DLRBT_Node * BLI_dlrbTree_search_prev(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
void mul_m4_v3(const float M[4][4], float r[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define CLOG_INFO(clg_ref, level,...)
Depsgraph * DEG_graph_new(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, eEvaluationMode mode)
struct Depsgraph Depsgraph
bool DEG_is_active(const struct Depsgraph *depsgraph)
void DEG_make_active(struct Depsgraph *depsgraph)
void DEG_make_inactive(struct Depsgraph *depsgraph)
void DEG_graph_build_from_ids(struct Depsgraph *graph, struct ID **ids, const int num_ids)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ ANIMVIZ_CALC_RANGE_FULL
@ ANIMVIZ_CALC_RANGE_CURRENT_FRAME
@ ANIMVIZ_CALC_RANGE_CHANGED
#define GPU_BATCH_DISCARD_SAFE(batch)
#define GPU_VERTBUF_DISCARD_SAFE(verts)
Read Guarded memory(de)allocation.
static void motionpaths_calc_bake_targets(ListBase *targets, int cframe)
static void motionpath_get_global_framerange(ListBase *targets, int *r_sfra, int *r_efra)
void animviz_calc_motionpaths(Depsgraph *depsgraph, Main *bmain, Scene *scene, ListBase *targets, eAnimvizCalcRange range, bool restore)
void animviz_get_object_motionpaths(Object *ob, ListBase *targets)
static int motionpath_get_prev_prev_keyframe(MPathTarget *mpt, DLRBT_Tree *fcu_keys, int current_frame)
static int motionpath_get_prev_keyframe(MPathTarget *mpt, DLRBT_Tree *fcu_keys, int current_frame)
Depsgraph * animviz_depsgraph_build(Main *bmain, Scene *scene, ViewLayer *view_layer, ListBase *targets)
static bool motionpath_check_can_use_keyframe_range(MPathTarget *UNUSED(mpt), AnimData *adt, ListBase *fcurve_list)
static void motionpath_calculate_update_range(MPathTarget *mpt, AnimData *adt, ListBase *fcurve_list, int current_frame, int *r_sfra, int *r_efra)
static void motionpaths_calc_update_scene(struct Depsgraph *depsgraph)
struct MPathTarget MPathTarget
static int motionpath_get_next_next_keyframe(MPathTarget *mpt, DLRBT_Tree *fcu_keys, int current_frame)
static void motionpath_free_free_tree_data(ListBase *targets)
static int motionpath_get_next_keyframe(MPathTarget *mpt, DLRBT_Tree *fcu_keys, int current_frame)
static bAnimVizSettings * animviz_target_settings_get(MPathTarget *mpt)
const Depsgraph * depsgraph
void agroup_to_keylist(AnimData *adt, bActionGroup *agrp, DLRBT_Tree *keys, int saction_flag)
short compare_ak_cfraPtr(void *node, void *data)
void action_to_keylist(AnimData *adt, bAction *act, DLRBT_Tree *keys, int saction_flag)
void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, int saction_flag)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
struct MPathTarget * next
struct MPathTarget * prev
struct GPUVertBuf * points_vbo
struct GPUBatch * batch_points
struct GPUBatch * batch_line
struct bPoseChannel * next