89 start = current_frame - avs->
path_bc;
90 end = current_frame + avs->
path_ac + 1;
98 std::swap(start, end);
135 float no_custom_col[3] = {-1.0f, -1.0f, -1.0f};
137 const float *color_pre = use_custom_color ? mpath->
color : no_custom_col;
138 const float *color_post = use_custom_color ? mpath->
color_post : no_custom_col;
140 int sfra, efra, stepsize;
143 int len = efra - sfra;
157 float camera_matrix[4][4];
160 if (motion_path_camera) {
161 copy_m4_m4(camera_matrix, motion_path_camera->object_to_world().ptr());
169 const int motion_path_settings[4] = {cfra, sfra, efra, mpath->
start_frame};
184 const int motion_path_settings[4] = {pt_size, cfra, mpath->
start_frame, stepsize};
196 if (show_frame_no || (show_keyframes_no && show_keyframes)) {
202 col[3] = col_kf[3] = 255;
204 Object *cam_eval =
nullptr;
205 if (motion_path_camera) {
210 for (i = 0; i <
len; i += stepsize, mpv += stepsize) {
211 int frame = sfra + i;
222 if ((show_keyframes && show_keyframes_no && is_keyframe) || (show_frame_no && (i == 0))) {
225 dt, vert_coordinate, numstr, numstr_len, 0, 0, txt_flag, (is_keyframe) ? col_kf :
col);
227 else if (show_frame_no) {
#define LISTBASE_FOREACH(type, var, list)
MINLINE int max_ii(int a, int b)
void unit_m4(float m[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
MINLINE bool equals_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define SNPRINTF_RLEN(dst, format,...)
float DEG_get_ctime(const Depsgraph *graph)
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
@ MOTIONPATH_BAKE_CAMERA_SPACE
enum eMotionPaths_BakeFlag eMotionPath_BakeFlag
#define BASE_SELECTED(v3d, base)
#define DRW_PASS_CREATE(pass, state)
#define DRW_shgroup_uniform_block(shgroup, name, ubo)
#define GPU_batch_create(primitive_type, vertex_buf, index_buf)
#define GPU_vertbuf_create_with_format(format)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
struct GPUShader GPUShader
DRWTextStore * DRW_text_cache_ensure()
const DRWContextState * DRW_context_state_get()
DRWShadingGroup * DRW_shgroup_create(GPUShader *shader, DRWPass *pass)
void DRW_shgroup_uniform_vec3_copy(DRWShadingGroup *shgroup, const char *name, const float *value)
DRWShadingGroup * DRW_shgroup_create_sub(DRWShadingGroup *shgroup)
void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value)
void DRW_shgroup_call_range(DRWShadingGroup *shgroup, const Object *ob, blender::gpu::Batch *geom, uint v_sta, uint v_num)
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value)
void DRW_shgroup_uniform_mat4_copy(DRWShadingGroup *shgroup, const char *name, const float(*value)[4])
void DRW_shgroup_uniform_ivec4_copy(DRWShadingGroup *shgroup, const char *name, const int *value)
void DRW_draw_pass(DRWPass *pass)
void DRW_text_cache_add(DRWTextStore *dt, const float co[3], const char *str, const int str_len, short xoffs, short yoffs, short flag, const uchar col[4], const bool shadow, const bool align_center)
@ DRW_TEXT_CACHE_GLOBALSPACE
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
bool OVERLAY_armature_is_pose_mode(Object *ob, const DRWContextState *draw_ctx)
void OVERLAY_motion_path_cache_populate(OVERLAY_Data *vedata, Object *ob)
static blender::gpu::Batch * mpath_batch_points_get(bMotionPath *mpath)
static Object * get_camera_for_motion_path(const DRWContextState *draw_context, const eMotionPath_BakeFlag bake_flag)
void OVERLAY_motion_path_draw(OVERLAY_Data *vedata)
void OVERLAY_motion_path_cache_init(OVERLAY_Data *vedata)
static void motion_path_cache(OVERLAY_Data *vedata, Object *ob, bPoseChannel *pchan, bAnimVizSettings *avs, bMotionPath *mpath)
static blender::gpu::VertBuf * mpath_vbo_get(bMotionPath *mpath)
static void motion_path_get_frame_range_to_draw(bAnimVizSettings *avs, bMotionPath *mpath, int current_frame, int *r_start, int *r_end, int *r_step)
static blender::gpu::Batch * mpath_batch_line_get(bMotionPath *mpath)
GPUShader * OVERLAY_shader_motion_path_vert()
GPUShader * OVERLAY_shader_motion_path_line()
GPUUniformBuf * block_ubo
OVERLAY_StorageList * stl
DRWPass * motion_paths_ps
DRWShadingGroup * motion_path_points_grp
DRWShadingGroup * motion_path_lines_grp
GPUBatchHandle * batch_line
GPUVertBufHandle * points_vbo
GPUBatchHandle * batch_points