104 start = current_frame - avs->
path_bc;
105 end = current_frame + avs->
path_ac + 1;
113 SWAP(
int, start, end);
140 float no_custom_col[3] = {-1.0f, -1.0f, -1.0f};
143 int sfra, efra, stepsize;
146 int len = efra - sfra;
154 const int motion_path_settings[4] = {cfra, sfra, efra, mpath->
start_frame};
167 const int motion_path_settings[4] = {pt_size, cfra, mpath->
start_frame, stepsize};
177 if (show_frame_no || (show_keyframes_no && show_keyframes)) {
183 col[3] = col_kf[3] = 255;
186 for (i = 0; i <
len; i += stepsize, mpv += stepsize) {
187 int frame = sfra + i;
192 if ((show_keyframes && show_keyframes_no && is_keyframe) || (show_frame_no && (i == 0))) {
193 numstr_len =
BLI_snprintf(numstr,
sizeof(numstr),
" %d", frame);
195 dt, mpv->
co, numstr, numstr_len, 0, 0, txt_flag, (is_keyframe) ? col_kf :
col);
197 else if (show_frame_no) {
203 numstr_len =
BLI_snprintf(numstr,
sizeof(numstr),
" %d", frame);
#define LISTBASE_FOREACH(type, var, list)
MINLINE int max_ii(int a, int b)
MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
float DEG_get_ctime(const Depsgraph *graph)
#define DRW_PASS_CREATE(pass, state)
#define GPU_batch_create(prim, verts, elem)
struct GPUShader GPUShader
#define GPU_vertbuf_create_with_format(format)
struct GPUVertBuf GPUVertBuf
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
void * GPU_vertbuf_get_data(const GPUVertBuf *verts)
Group RGB to Bright Vector Camera CLAMP
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
const DRWContextState * DRW_context_state_get(void)
struct DRWTextStore * DRW_text_cache_ensure(void)
void DRW_shgroup_uniform_block(DRWShadingGroup *shgroup, const char *name, const GPUUniformBuf *ubo)
void DRW_shgroup_uniform_vec3_copy(DRWShadingGroup *shgroup, const char *name, const float *value)
void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
DRWShadingGroup * DRW_shgroup_create_sub(DRWShadingGroup *shgroup)
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value)
void DRW_shgroup_call_range(DRWShadingGroup *shgroup, struct Object *ob, GPUBatch *geom, uint v_sta, uint v_ct)
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])
@ DRW_TEXT_CACHE_GLOBALSPACE
bool OVERLAY_armature_is_pose_mode(Object *ob, const DRWContextState *draw_ctx)
static GPUVertBuf * mpath_vbo_get(bMotionPath *mpath)
void OVERLAY_motion_path_cache_populate(OVERLAY_Data *vedata, Object *ob)
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 GPUBatch * mpath_batch_line_get(bMotionPath *mpath)
static GPUBatch * mpath_batch_points_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)
GPUShader * OVERLAY_shader_motion_path_vert(void)
GPUShader * OVERLAY_shader_motion_path_line(void)
struct Depsgraph * depsgraph
struct GPUUniformBuf * block_ubo
OVERLAY_StorageList * stl
DRWPass * motion_paths_ps
DRWShadingGroup * motion_path_points_grp
DRWShadingGroup * motion_path_lines_grp
struct OVERLAY_PrivateData * pd
struct GPUVertBuf * points_vbo
struct GPUBatch * batch_points
struct GPUBatch * batch_line