Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include <stdlib.h>
#include "BLI_dlrbTree.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_scene_types.h"
#include "BKE_action.h"
#include "BKE_anim_data.h"
#include "BKE_main.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "GPU_batch.h"
#include "GPU_vertex_buffer.h"
#include "ED_anim_api.h"
#include "ED_keyframes_keylist.h"
#include "CLG_log.h"
Go to the source code of this file.
Classes | |
struct | MPathTarget |
Typedefs | |
typedef struct MPathTarget | MPathTarget |
Variables | |
static CLG_LogRef | LOG = {"ed.anim.motion_paths"} |
typedef struct MPathTarget MPathTarget |
void animviz_calc_motionpaths | ( | Depsgraph * | depsgraph, |
Main * | bmain, | ||
Scene * | scene, | ||
ListBase * | targets, | ||
eAnimvizCalcRange | range, | ||
bool | restore | ||
) |
Definition at line 380 of file anim_motion_paths.c.
References AnimData::action, action_to_keylist(), agroup_to_keylist(), ANIMVIZ_CALC_RANGE_CHANGED, ANIMVIZ_CALC_RANGE_CURRENT_FRAME, ANIMVIZ_CALC_RANGE_FULL, ANIMVIZ_RECALC_PATHS, animviz_target_settings_get(), bMotionPath::batch_line, bMotionPath::batch_points, BKE_action_group_find_name(), BKE_animdata_from_id(), BKE_scene_graph_update_tagged(), RenderData::cfra, bActionGroup::channels, CLOG_INFO, bAction::curves, DEG_get_evaluated_object(), DEG_is_active(), DEG_make_active(), DEG_make_inactive(), depsgraph, ED_keylist_create(), ED_keylist_free(), ED_keylist_prepare_for_direct_access(), ELEM, ListBase::first, GPU_BATCH_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, LISTBASE_FOREACH, LOG, max_ii(), min_ii(), motionpath_calculate_update_range(), motionpath_free_free_tree_data(), motionpath_get_global_framerange(), MOTIONPATH_VIEW_KFACT, motionpaths_calc_bake_targets(), motionpaths_calc_update_scene(), NULL, bAnimVizSettings::path_viewflag, bMotionPath::points_vbo, Scene::r, bAnimVizSettings::recalc, and scene.
Referenced by ED_objects_recalculate_paths(), and ED_pose_recalculate_paths().
Depsgraph* animviz_depsgraph_build | ( | Main * | bmain, |
Scene * | scene, | ||
ViewLayer * | view_layer, | ||
ListBase * | targets | ||
) |
Definition at line 63 of file anim_motion_paths.c.
References BLI_listbase_count(), DAG_EVAL_VIEWPORT, DEG_graph_build_from_ids(), DEG_graph_new(), depsgraph, ListBase::first, MEM_freeN, MEM_malloc_arrayN, motionpaths_calc_update_scene(), NULL, and scene.
Referenced by ED_objects_recalculate_paths(), and ED_pose_recalculate_paths().
Get list of motion paths to be baked for the given object.
Definition at line 88 of file anim_motion_paths.c.
References ANIMVIZ_RECALC_PATHS, bPose::avs, Object::avs, BLI_addtail(), bPoseChannel::bone, bPose::chanbase, Object::data, ListBase::first, Bone::layer, bArmature::layer, MEM_callocN, MPathTarget::mpath, bPoseChannel::mpath, Object::mpath, bPoseChannel::next, MPathTarget::ob, MPathTarget::pchan, Object::pose, and bAnimVizSettings::recalc.
Referenced by ED_objects_recalculate_paths(), and ED_pose_recalculate_paths().
Update motion path computation range (in ob.avs
or armature.avs
) from user choice in ob.avs.path_range
or arm.avs.path_range
, depending on active user mode.
ob | Object to compute range for (must be provided) |
scene | Used when scene range is chosen. |
Definition at line 343 of file anim_motion_paths.c.
References AnimData::action, Object::adt, ATTR_FALLTHROUGH, bPose::avs, Object::avs, BLI_assert_msg, BLI_listbase_is_empty(), bAction::curves, ED_keylist_all_keys_frame_range(), ED_keylist_create(), ED_keylist_free(), ED_keylist_selected_keys_frame_range(), fcurve_to_keylist(), LISTBASE_FOREACH, Range2f::max, Range2f::min, Object::mode, MOTIONPATH_RANGE_KEYS_ALL, MOTIONPATH_RANGE_KEYS_SELECTED, MOTIONPATH_RANGE_SCENE, OB_MODE_POSE, bAnimVizSettings::path_ef, bAnimVizSettings::path_range, bAnimVizSettings::path_sf, PEFRA, Object::pose, and PSFRA.
Referenced by object_calculate_paths_exec(), object_update_paths_exec(), pose_calculate_paths_exec(), and pose_update_paths_exec().
|
static |
Definition at line 203 of file anim_motion_paths.c.
References bPose::avs, Object::avs, NULL, MPathTarget::ob, MPathTarget::pchan, and Object::pose.
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 284 of file anim_motion_paths.c.
References ED_keylist_create(), ED_keylist_free(), ED_keylist_prepare_for_direct_access(), bMotionPath::end_frame, FCURVE_SMOOTH_NONE, fcurve_to_keylist(), ListBase::first, max_ii(), min_ii(), motionpath_check_can_use_keyframe_range(), motionpath_get_next_next_keyframe(), motionpath_get_prev_prev_keyframe(), MPathTarget::mpath, NULL, and bMotionPath::start_frame.
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 272 of file anim_motion_paths.c.
References NULL.
Referenced by motionpath_calculate_update_range().
Definition at line 336 of file anim_motion_paths.c.
References ED_keylist_free(), and LISTBASE_FOREACH.
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 211 of file anim_motion_paths.c.
References LISTBASE_FOREACH, max_ii(), and min_ii().
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 247 of file anim_motion_paths.c.
References ActKeyColumn::cfra, ED_keylist_find_next(), bMotionPath::end_frame, MPathTarget::mpath, and NULL.
Referenced by motionpath_get_next_next_keyframe().
|
static |
Definition at line 264 of file anim_motion_paths.c.
References motionpath_get_next_keyframe().
Referenced by motionpath_calculate_update_range().
|
static |
Definition at line 222 of file anim_motion_paths.c.
References ActKeyColumn::cfra, ED_keylist_find_prev(), MPathTarget::mpath, NULL, and bMotionPath::start_frame.
Referenced by motionpath_get_prev_prev_keyframe().
|
static |
Definition at line 239 of file anim_motion_paths.c.
References motionpath_get_prev_keyframe().
Referenced by motionpath_calculate_update_range().
Definition at line 126 of file anim_motion_paths.c.
References bMotionPath::batch_line, bMotionPath::batch_points, BKE_pose_channel_find_name(), bMotionPathVert::co, copy_v3_v3(), ED_keylist_find_exact(), bMotionPath::end_frame, ListBase::first, bMotionPathVert::flag, bMotionPath::flag, float(), GPU_BATCH_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, MPathTarget::keylist, bMotionPath::length, MOTIONPATH_FLAG_BHEAD, MOTIONPATH_VERT_KEY, MPathTarget::mpath, bPoseChannel::mpath, Object::mpath, mul_m4_v3(), bPoseChannel::name, MPathTarget::next, NULL, MPathTarget::ob_eval, Object::obmat, MPathTarget::pchan, bMotionPath::points, bMotionPath::points_vbo, Object::pose, bPoseChannel::pose_head, bPoseChannel::pose_tail, and bMotionPath::start_frame.
Referenced by animviz_calc_motionpaths().
Definition at line 58 of file anim_motion_paths.c.
References BKE_scene_graph_update_for_newframe(), and depsgraph.
Referenced by animviz_calc_motionpaths(), and animviz_depsgraph_build().
|
static |
Definition at line 36 of file anim_motion_paths.c.
Referenced by animviz_calc_motionpaths().