Blender V5.0
anim_motion_paths.cc File Reference
#include "MEM_guardedalloc.h"
#include <cstdlib>
#include "BLI_listbase.h"
#include "BLI_listbase_wrapper.hh"
#include "BLI_math_matrix.h"
#include "BLI_math_matrix.hh"
#include "BLI_math_vector.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_scene_types.h"
#include "BKE_action.hh"
#include "BKE_anim_data.hh"
#include "BKE_main.hh"
#include "BKE_scene.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "DEG_depsgraph_query.hh"
#include "GPU_batch.hh"
#include "GPU_vertex_buffer.hh"
#include "ED_anim_api.hh"
#include "ED_keyframes_keylist.hh"
#include "ANIM_action.hh"
#include "ANIM_action_legacy.hh"
#include "ANIM_bone_collections.hh"
#include "CLG_log.h"

Go to the source code of this file.

Classes

struct  MPathTarget

Functions

static void motionpaths_calc_update_scene (Depsgraph *depsgraph)
Depsgraph * animviz_depsgraph_build (Main *bmain, Scene *scene, ViewLayer *view_layer, blender::Span< MPathTarget * > targets)
void animviz_build_motionpath_targets (Object *ob, blender::Vector< MPathTarget * > &r_targets)
void animviz_free_motionpath_targets (blender::Vector< MPathTarget * > &targets)
static void motionpaths_calc_bake_targets (blender::Span< MPathTarget * > targets, int cframe, Depsgraph *depsgraph, Object *camera)
static bAnimVizSettingsanimviz_target_settings_get (const MPathTarget *mpt)
static void motionpath_get_global_framerange (blender::Span< MPathTarget * > targets, int *r_sfra, int *r_efra)
static int motionpath_get_prev_keyframe (MPathTarget *mpt, AnimKeylist *keylist, int current_frame)
static int motionpath_get_prev_prev_keyframe (MPathTarget *mpt, AnimKeylist *keylist, int current_frame)
static int motionpath_get_next_keyframe (MPathTarget *mpt, AnimKeylist *keylist, int current_frame)
static int motionpath_get_next_next_keyframe (MPathTarget *mpt, AnimKeylist *keylist, int current_frame)
static bool motionpath_check_can_use_keyframe_range (MPathTarget *, AnimData *adt, blender::Span< FCurve * > fcurves)
static void motionpath_calculate_update_range (MPathTarget *mpt, AnimData *adt, blender::Vector< FCurve * > fcurves, int current_frame, int *r_sfra, int *r_efra)
static void motionpath_free_free_tree_data (blender::MutableSpan< MPathTarget * > targets)
void animviz_motionpath_compute_range (Object *ob, Scene *scene)
void animviz_calc_motionpaths (Depsgraph *depsgraph, Main *bmain, Scene *scene, blender::MutableSpan< MPathTarget * > targets, eAnimvizCalcRange range, bool restore)

Variables

static CLG_LogRef LOG = {"anim.motion_paths"}

Function Documentation

◆ animviz_build_motionpath_targets()

void animviz_build_motionpath_targets ( Object * ob,
blender::Vector< MPathTarget * > & r_targets )

◆ animviz_calc_motionpaths()

void animviz_calc_motionpaths ( Depsgraph * depsgraph,
Main * bmain,
Scene * scene,
blender::MutableSpan< MPathTarget * > targets,
eAnimvizCalcRange range,
bool restore )

◆ animviz_depsgraph_build()

◆ animviz_free_motionpath_targets()

void animviz_free_motionpath_targets ( blender::Vector< MPathTarget * > & targets)

Free the elements of the vector populated with animviz_build_motionpath_targets. After this function the Vector will have a length of 0.

Definition at line 124 of file anim_motion_paths.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), and MEM_freeN().

Referenced by ED_pose_recalculate_paths(), and blender::ed::object::motion_paths_recalc().

◆ animviz_motionpath_compute_range()

◆ animviz_target_settings_get()

bAnimVizSettings * animviz_target_settings_get ( const MPathTarget * mpt)
static

◆ motionpath_calculate_update_range()

◆ motionpath_check_can_use_keyframe_range()

bool motionpath_check_can_use_keyframe_range ( MPathTarget * ,
AnimData * adt,
blender::Span< FCurve * > fcurves )
static

Definition at line 289 of file anim_motion_paths.cc.

References blender::Span< T >::is_empty().

Referenced by motionpath_calculate_update_range().

◆ motionpath_free_free_tree_data()

void motionpath_free_free_tree_data ( blender::MutableSpan< MPathTarget * > targets)
static

Definition at line 353 of file anim_motion_paths.cc.

References ED_keylist_free().

Referenced by animviz_calc_motionpaths().

◆ motionpath_get_global_framerange()

void motionpath_get_global_framerange ( blender::Span< MPathTarget * > targets,
int * r_sfra,
int * r_efra )
static

Definition at line 229 of file anim_motion_paths.cc.

References max_ii(), and min_ii().

Referenced by animviz_calc_motionpaths().

◆ motionpath_get_next_keyframe()

int motionpath_get_next_keyframe ( MPathTarget * mpt,
AnimKeylist * keylist,
int current_frame )
static

◆ motionpath_get_next_next_keyframe()

int motionpath_get_next_next_keyframe ( MPathTarget * mpt,
AnimKeylist * keylist,
int current_frame )
static

Definition at line 281 of file anim_motion_paths.cc.

References motionpath_get_next_keyframe().

Referenced by motionpath_calculate_update_range().

◆ motionpath_get_prev_keyframe()

int motionpath_get_prev_keyframe ( MPathTarget * mpt,
AnimKeylist * keylist,
int current_frame )
static

◆ motionpath_get_prev_prev_keyframe()

int motionpath_get_prev_prev_keyframe ( MPathTarget * mpt,
AnimKeylist * keylist,
int current_frame )
static

Definition at line 258 of file anim_motion_paths.cc.

References motionpath_get_prev_keyframe().

Referenced by motionpath_calculate_update_range().

◆ motionpaths_calc_bake_targets()

◆ motionpaths_calc_update_scene()

void motionpaths_calc_update_scene ( Depsgraph * depsgraph)
static

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"anim.motion_paths"}
static

Definition at line 44 of file anim_motion_paths.cc.