|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include <cstdlib>#include "BLI_dlrbTree.h"#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_matrix.hh"#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_legacy.hh"#include "ANIM_bone_collections.hh"#include "CLG_log.h"Go to the source code of this file.
Classes | |
| struct | MPathTarget |
Variables | |
| static CLG_LogRef | LOG = {"ed.anim.motion_paths"} |
| void animviz_calc_motionpaths | ( | Depsgraph * | depsgraph, |
| Main * | bmain, | ||
| Scene * | scene, | ||
| ListBase * | targets, | ||
| eAnimvizCalcRange | range, | ||
| bool | restore ) |
Definition at line 399 of file anim_motion_paths.cc.
References AnimData::action, action_group_to_keylist(), action_to_keylist(), ANIMVIZ_CALC_RANGE_CHANGED, ANIMVIZ_CALC_RANGE_CURRENT_FRAME, ANIMVIZ_CALC_RANGE_FULL, animviz_target_settings_get(), bMotionPath::batch_line, bMotionPath::batch_points, BKE_action_group_find_name(), BKE_animdata_from_id(), BKE_scene_graph_update_tagged(), 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(), bAnimVizSettings::path_viewflag, bMotionPath::points_vbo, and bAnimVizSettings::recalc.
Referenced by ED_pose_recalculate_paths(), and blender::ed::object::motion_paths_recalc().
| Depsgraph * animviz_depsgraph_build | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| ListBase * | targets ) |
Definition at line 69 of file anim_motion_paths.cc.
References BLI_listbase_count(), DAG_EVAL_VIEWPORT, DEG_graph_build_from_ids(), DEG_graph_new(), depsgraph, ListBase::first, and motionpaths_calc_update_scene().
Referenced by ED_pose_recalculate_paths(), and blender::ed::object::motion_paths_recalc().
Get list of motion paths to be baked for the given object.
Definition at line 95 of file anim_motion_paths.cc.
References ANIM_bonecoll_is_visible_pchan(), ANIMVIZ_RECALC_PATHS, bPose::avs, Object::avs, BLI_addtail(), bPose::chanbase, Object::data, LISTBASE_FOREACH, MEM_callocN, MPathTarget::mpath, Object::mpath, MPathTarget::ob, MPathTarget::pchan, Object::pose, and bAnimVizSettings::recalc.
Referenced by ED_pose_recalculate_paths(), and blender::ed::object::motion_paths_recalc().
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 353 of file anim_motion_paths.cc.
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(), blender::animrig::legacy::fcurves_for_assigned_action(), Range2f::max, Range2f::min, Object::mode, MOTIONPATH_RANGE_KEYS_ALL, MOTIONPATH_RANGE_KEYS_SELECTED, MOTIONPATH_RANGE_MANUAL, MOTIONPATH_RANGE_SCENE, OB_MODE_POSE, bAnimVizSettings::path_ef, bAnimVizSettings::path_range, bAnimVizSettings::path_sf, PEFRA, Object::pose, and PSFRA.
Referenced by blender::ed::object::object_calculate_paths_exec(), blender::ed::object::object_update_paths_exec(), pose_calculate_paths_exec(), and pose_update_paths_exec().
|
static |
Definition at line 217 of file anim_motion_paths.cc.
References bPose::avs, Object::avs, MPathTarget::ob, MPathTarget::pchan, and Object::pose.
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 294 of file anim_motion_paths.cc.
References ED_keylist_create(), ED_keylist_free(), ED_keylist_prepare_for_direct_access(), bMotionPath::end_frame, FCURVE_SMOOTH_NONE, fcurve_to_keylist(), ListBase::first, FLT_MAX, max_ii(), min_ii(), motionpath_check_can_use_keyframe_range(), motionpath_get_next_next_keyframe(), motionpath_get_prev_prev_keyframe(), MPathTarget::mpath, and bMotionPath::start_frame.
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 282 of file anim_motion_paths.cc.
Referenced by motionpath_calculate_update_range().
|
static |
Definition at line 346 of file anim_motion_paths.cc.
References ED_keylist_free(), and LISTBASE_FOREACH.
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 225 of file anim_motion_paths.cc.
References LISTBASE_FOREACH, max_ii(), and min_ii().
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 259 of file anim_motion_paths.cc.
References ActKeyColumn::cfra, ED_keylist_find_next(), bMotionPath::end_frame, and MPathTarget::mpath.
Referenced by motionpath_get_next_next_keyframe().
|
static |
Definition at line 274 of file anim_motion_paths.cc.
References motionpath_get_next_keyframe().
Referenced by motionpath_calculate_update_range().
|
static |
Definition at line 236 of file anim_motion_paths.cc.
References ActKeyColumn::cfra, ED_keylist_find_prev(), MPathTarget::mpath, and bMotionPath::start_frame.
Referenced by motionpath_get_prev_prev_keyframe().
|
static |
Definition at line 251 of file anim_motion_paths.cc.
References motionpath_get_prev_keyframe().
Referenced by motionpath_calculate_update_range().
|
static |
Definition at line 131 of file anim_motion_paths.cc.
References bMotionPath::batch_line, bMotionPath::batch_points, BKE_pose_channel_find_name(), bMotionPathVert::co, copy_v3_v3(), DEG_get_evaluated_object(), depsgraph, ED_keylist_find_exact(), bMotionPath::end_frame, bMotionPath::flag, bMotionPathVert::flag, float, GPU_BATCH_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, bMotionPath::length, LISTBASE_FOREACH, MOTIONPATH_FLAG_BAKE_CAMERA, MOTIONPATH_FLAG_BHEAD, MOTIONPATH_VERT_KEY, bPoseChannel::mpath, Object::mpath, mul_m4_v3(), bMotionPath::points, bMotionPath::points_vbo, Object::pose, bPoseChannel::pose_head, bPoseChannel::pose_tail, bMotionPath::start_frame, and blender::math::transform_point().
Referenced by animviz_calc_motionpaths().
|
static |
Definition at line 64 of file anim_motion_paths.cc.
References BKE_scene_graph_update_for_newframe(), and depsgraph.
Referenced by animviz_calc_motionpaths(), and animviz_depsgraph_build().
|
static |
Definition at line 42 of file anim_motion_paths.cc.
Referenced by animviz_calc_motionpaths().