Blender  V3.3
action_draw.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
8 /* System includes ----------------------------------------------------- */
9 
10 #include <float.h>
11 #include <math.h>
12 #include <stdlib.h>
13 #include <string.h>
14 
15 #include "BLI_blenlib.h"
16 #include "BLI_math.h"
17 #include "BLI_utildefines.h"
18 
19 /* Types --------------------------------------------------------------- */
20 
21 #include "DNA_anim_types.h"
22 #include "DNA_cachefile_types.h"
23 #include "DNA_gpencil_types.h"
24 #include "DNA_object_types.h"
25 #include "DNA_scene_types.h"
26 #include "DNA_screen_types.h"
27 
28 #include "BKE_action.h"
29 #include "BKE_context.h"
30 #include "BKE_pointcache.h"
31 
32 /* Everything from source (BIF, BDR, BSE) ------------------------------ */
33 
34 #include "GPU_immediate.h"
35 #include "GPU_matrix.h"
36 #include "GPU_state.h"
37 
38 #include "UI_interface.h"
39 #include "UI_resources.h"
40 #include "UI_view2d.h"
41 
42 #include "ED_anim_api.h"
43 #include "ED_keyframes_draw.h"
44 
45 #include "action_intern.h"
46 
47 /* ************************************************************************* */
48 /* Channel List */
49 
51 {
52  ListBase anim_data = {NULL, NULL};
53  bAnimListElem *ale;
54  int filter;
55 
56  View2D *v2d = &region->v2d;
57  size_t items;
58 
59  /* build list of channels to draw */
61  items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
62 
63  int height = ACHANNEL_TOT_HEIGHT(ac, items);
64  v2d->tot.ymin = -height;
65 
66  /* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */
68 
69  /* Loop through channels, and set up drawing depending on their type. */
70  { /* first pass: just the standard GL-drawing for backdrop + text */
71  size_t channel_index = 0;
72  float ymax = ACHANNEL_FIRST_TOP(ac);
73 
74  for (ale = anim_data.first; ale; ale = ale->next, ymax -= ACHANNEL_STEP(ac), channel_index++) {
75  float ymin = ymax - ACHANNEL_HEIGHT(ac);
76 
77  /* check if visible */
78  if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
79  IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
80  /* draw all channels using standard channel-drawing API */
81  ANIM_channel_draw(ac, ale, ymin, ymax, channel_index);
82  }
83  }
84  }
85  { /* second pass: widgets */
86  uiBlock *block = UI_block_begin(C, region, __func__, UI_EMBOSS);
87  size_t channel_index = 0;
88  float ymax = ACHANNEL_FIRST_TOP(ac);
89 
90  for (ale = anim_data.first; ale; ale = ale->next, ymax -= ACHANNEL_STEP(ac), channel_index++) {
91  float ymin = ymax - ACHANNEL_HEIGHT(ac);
92 
93  /* check if visible */
94  if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
95  IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
96  /* draw all channels using standard channel-drawing API */
97  rctf channel_rect;
98  BLI_rctf_init(&channel_rect, 0, v2d->cur.xmax, ymin, ymax);
99  ANIM_channel_draw_widgets(C, ac, ale, block, &channel_rect, channel_index);
100  }
101  }
102 
103  UI_block_end(C, block);
104  UI_block_draw(C, block);
105  }
106 
107  /* free tempolary channels */
108  ANIM_animdata_freelist(&anim_data);
109 }
110 
111 /* ************************************************************************* */
112 /* Keyframes */
113 
114 /* extra padding for lengths (to go under scrollers) */
115 #define EXTRA_SCROLL_PAD 100.0f
116 
117 /* Draw manually set intended playback frame ranges for actions. */
118 static void draw_channel_action_ranges(bAnimContext *ac, ListBase *anim_data, View2D *v2d)
119 {
120  /* Variables for coalescing the Y region of one action. */
121  bAction *cur_action = NULL;
122  AnimData *cur_adt = NULL;
123  float cur_ymax;
124 
125  /* Walk through channels, grouping contiguous spans referencing the same action. */
126  float ymax = ACHANNEL_FIRST_TOP(ac) + ACHANNEL_SKIP / 2;
127  float ystep = ACHANNEL_STEP(ac);
128  float ymin = ymax - ystep;
129 
130  for (bAnimListElem *ale = anim_data->first; ale; ale = ale->next, ymax = ymin, ymin -= ystep) {
131  bAction *action = NULL;
132  AnimData *adt = NULL;
133 
134  /* check if visible */
135  if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
136  IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
137  /* check if anything to show for this channel */
138  if (ale->datatype != ALE_NONE) {
139  action = ANIM_channel_action_get(ale);
140 
141  if (action) {
142  adt = ale->adt;
143  }
144  }
145  }
146 
147  /* Extend the current region, or flush and restart. */
148  if (action != cur_action || adt != cur_adt) {
149  if (cur_action) {
150  ANIM_draw_action_framerange(cur_adt, cur_action, v2d, ymax, cur_ymax);
151  }
152 
153  cur_action = action;
154  cur_adt = adt;
155  cur_ymax = ymax;
156  }
157  }
158 
159  /* Flush the last region. */
160  if (cur_action) {
161  ANIM_draw_action_framerange(cur_adt, cur_action, v2d, ymax, cur_ymax);
162  }
163 }
164 
166 {
167  ListBase anim_data = {NULL, NULL};
168  bAnimListElem *ale;
169 
170  View2D *v2d = &region->v2d;
171  bDopeSheet *ads = &saction->ads;
172  AnimData *adt = NULL;
173 
174  uchar col1[4], col2[4];
175  uchar col1a[4], col2a[4];
176  uchar col1b[4], col2b[4];
177  uchar col_summary[4];
178 
179  const bool show_group_colors = U.animation_flag & USER_ANIM_SHOW_CHANNEL_GROUP_COLORS;
180 
181  /* get theme colors */
184  UI_GetThemeColor4ubv(TH_ANIM_ACTIVE, col_summary);
185 
188 
191 
192  /* build list of channels to draw */
194  size_t items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
195 
196  int height = ACHANNEL_TOT_HEIGHT(ac, items);
197  v2d->tot.ymin = -height;
198 
199  /* Draw the manual frame ranges for actions in the background of the dopesheet.
200  * The action editor has already drawn the range for its action so it's not needed. */
201  if (ac->datatype == ANIMCONT_DOPESHEET) {
202  draw_channel_action_ranges(ac, &anim_data, v2d);
203  }
204 
205  /* Draw the background strips. */
208 
210 
212 
213  /* first backdrop strips */
214  float ymax = ACHANNEL_FIRST_TOP(ac);
215 
216  for (ale = anim_data.first; ale; ale = ale->next, ymax -= ACHANNEL_STEP(ac)) {
217  float ymin = ymax - ACHANNEL_HEIGHT(ac);
218 
219  /* check if visible */
220  if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
221  IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
223  int sel = 0;
224 
225  /* determine if any need to draw channel */
226  if (ale->datatype != ALE_NONE) {
227  /* determine if channel is selected */
228  if (acf->has_setting(ac, ale, ACHANNEL_SETTING_SELECT)) {
230  }
231 
233  switch (ale->type) {
234  case ANIMTYPE_SUMMARY: {
235  /* reddish color from NLA */
237  break;
238  }
239  case ANIMTYPE_SCENE:
240  case ANIMTYPE_OBJECT: {
241  immUniformColor3ubvAlpha(col1b, sel ? col1[3] : col1b[3]);
242  break;
243  }
244  case ANIMTYPE_FILLACTD:
245  case ANIMTYPE_DSSKEY:
246  case ANIMTYPE_DSWOR: {
247  immUniformColor3ubvAlpha(col2b, sel ? col1[3] : col2b[3]);
248  break;
249  }
250  case ANIMTYPE_GROUP: {
251  bActionGroup *agrp = ale->data;
252  if (show_group_colors && agrp->customCol) {
253  if (sel) {
254  immUniformColor3ubvAlpha((uchar *)agrp->cs.select, col1a[3]);
255  }
256  else {
257  immUniformColor3ubvAlpha((uchar *)agrp->cs.solid, col2a[3]);
258  }
259  }
260  else {
261  immUniformColor4ubv(sel ? col1a : col2a);
262  }
263  break;
264  }
265  case ANIMTYPE_FCURVE: {
266  FCurve *fcu = ale->data;
267  if (show_group_colors && fcu->grp && fcu->grp->customCol) {
268  immUniformColor3ubvAlpha((uchar *)fcu->grp->cs.active, sel ? col1[3] : col2[3]);
269  }
270  else {
271  immUniformColor4ubv(sel ? col1 : col2);
272  }
273  break;
274  }
275  default: {
276  immUniformColor4ubv(sel ? col1 : col2);
277  }
278  }
279 
280  /* draw region twice: firstly backdrop, then the current range */
281  immRectf(pos, v2d->cur.xmin, ymin, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymax);
282  }
283  else if (ac->datatype == ANIMCONT_GPENCIL) {
284  uchar *color;
285  uchar gpl_col[4];
286  if (ale->type == ANIMTYPE_SUMMARY) {
287  color = col_summary;
288  }
289  else if ((show_group_colors) && (ale->type == ANIMTYPE_GPLAYER)) {
290  bGPDlayer *gpl = (bGPDlayer *)ale->data;
291  rgb_float_to_uchar(gpl_col, gpl->color);
292  gpl_col[3] = col1[3];
293 
294  color = sel ? col1 : gpl_col;
295  }
296  else {
297  color = sel ? col1 : col2;
298  }
299 
300  /* Color overlay on frames between the start/end frames. */
302  immRectf(pos, ac->scene->r.sfra, ymin, ac->scene->r.efra, ymax);
303 
304  /* Color overlay outside the start/end frame range get a more transparent overlay. */
305  immUniformColor3ubvAlpha(color, MIN2(255, color[3] / 2));
306  immRectf(pos, v2d->cur.xmin, ymin, ac->scene->r.sfra, ymax);
307  immRectf(pos, ac->scene->r.efra, ymin, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymax);
308  }
309  else if (ac->datatype == ANIMCONT_MASK) {
310  /* TODO: this is a copy of gpencil. */
311  uchar *color;
312  if (ale->type == ANIMTYPE_SUMMARY) {
313  color = col_summary;
314  }
315  else {
316  color = sel ? col1 : col2;
317  }
318 
319  /* Color overlay on frames between the start/end frames. */
321  immRectf(pos, ac->scene->r.sfra, ymin, ac->scene->r.efra, ymax);
322 
323  /* Color overlay outside the start/end frame range get a more transparent overlay. */
324  immUniformColor3ubvAlpha(color, MIN2(255, color[3] / 2));
325  immRectf(pos, v2d->cur.xmin, ymin, ac->scene->r.sfra, ymax);
326  immRectf(pos, ac->scene->r.efra, ymin, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymax);
327  }
328  }
329  }
330  }
332 
333  /* black line marking 'current frame' for Time-Slide transform mode */
334  if (saction->flag & SACTION_MOVING) {
335  immUniformColor3f(0.0f, 0.0f, 0.0f);
336 
338  immVertex2f(pos, saction->timeslide, v2d->cur.ymin - EXTRA_SCROLL_PAD);
339  immVertex2f(pos, saction->timeslide, v2d->cur.ymax);
340  immEnd();
341  }
343 
344  /* Draw keyframes
345  * 1) Only channels that are visible in the Action Editor get drawn/evaluated.
346  * This is to try to optimize this for heavier data sets
347  * 2) Keyframes which are out of view horizontally are disregarded
348  */
349  int action_flag = saction->flag;
350 
351  if (saction->mode == SACTCONT_TIMELINE) {
353  }
354 
355  ymax = ACHANNEL_FIRST_TOP(ac);
356 
357  struct AnimKeylistDrawList *draw_list = ED_keylist_draw_list_create();
358 
359  for (ale = anim_data.first; ale; ale = ale->next, ymax -= ACHANNEL_STEP(ac)) {
360  float ymin = ymax - ACHANNEL_HEIGHT(ac);
361  float ycenter = (ymin + ymax) / 2.0f;
362 
363  /* check if visible */
364  if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
365  IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
366  /* check if anything to show for this channel */
367  if (ale->datatype != ALE_NONE) {
368  adt = ANIM_nla_mapping_get(ac, ale);
369 
370  /* draw 'keyframes' for each specific datatype */
371  switch (ale->datatype) {
372  case ALE_ALL:
373  draw_summary_channel(draw_list, ale->data, ycenter, ac->yscale_fac, action_flag);
374  break;
375  case ALE_SCE:
377  draw_list, ads, ale->key_data, ycenter, ac->yscale_fac, action_flag);
378  break;
379  case ALE_OB:
381  draw_list, ads, ale->key_data, ycenter, ac->yscale_fac, action_flag);
382  break;
383  case ALE_ACT:
385  draw_list, adt, ale->key_data, ycenter, ac->yscale_fac, action_flag);
386  break;
387  case ALE_GROUP:
388  draw_agroup_channel(draw_list, adt, ale->data, ycenter, ac->yscale_fac, action_flag);
389  break;
390  case ALE_FCURVE:
392  draw_list, adt, ale->key_data, ycenter, ac->yscale_fac, action_flag);
393  break;
394  case ALE_GPFRAME:
395  draw_gpl_channel(draw_list, ads, ale->data, ycenter, ac->yscale_fac, action_flag);
396  break;
397  case ALE_MASKLAY:
398  draw_masklay_channel(draw_list, ads, ale->data, ycenter, ac->yscale_fac, action_flag);
399  break;
400  }
401  }
402  }
403  }
404 
405  ED_keylist_draw_list_flush(draw_list, v2d);
406  ED_keylist_draw_list_free(draw_list);
407 
408  /* free temporary channels used for drawing */
409  ANIM_animdata_freelist(&anim_data);
410 }
411 
412 /* ************************************************************************* */
413 /* Timeline - Caches */
414 
416 {
417  switch (pid->type) {
419  if ((saction->cache_display & TIME_CACHE_SOFTBODY) == 0) {
420  return true;
421  }
422  break;
425  if ((saction->cache_display & TIME_CACHE_PARTICLES) == 0) {
426  return true;
427  }
428  break;
429  case PTCACHE_TYPE_CLOTH:
430  if ((saction->cache_display & TIME_CACHE_CLOTH) == 0) {
431  return true;
432  }
433  break;
436  if ((saction->cache_display & TIME_CACHE_SMOKE) == 0) {
437  return true;
438  }
439  break;
441  if ((saction->cache_display & TIME_CACHE_DYNAMICPAINT) == 0) {
442  return true;
443  }
444  break;
446  if ((saction->cache_display & TIME_CACHE_RIGIDBODY) == 0) {
447  return true;
448  }
449  break;
450  }
451  return false;
452 }
453 
454 static void timeline_cache_color_get(PTCacheID *pid, float color[4])
455 {
456  switch (pid->type) {
458  color[0] = 1.0;
459  color[1] = 0.4;
460  color[2] = 0.02;
461  color[3] = 0.1;
462  break;
465  color[0] = 1.0;
466  color[1] = 0.1;
467  color[2] = 0.02;
468  color[3] = 0.1;
469  break;
470  case PTCACHE_TYPE_CLOTH:
471  color[0] = 0.1;
472  color[1] = 0.1;
473  color[2] = 0.75;
474  color[3] = 0.1;
475  break;
478  color[0] = 0.2;
479  color[1] = 0.2;
480  color[2] = 0.2;
481  color[3] = 0.1;
482  break;
484  color[0] = 1.0;
485  color[1] = 0.1;
486  color[2] = 0.75;
487  color[3] = 0.1;
488  break;
490  color[0] = 1.0;
491  color[1] = 0.6;
492  color[2] = 0.0;
493  color[3] = 0.1;
494  break;
495  default:
496  color[0] = 1.0;
497  color[1] = 0.0;
498  color[2] = 1.0;
499  color[3] = 0.1;
500  BLI_assert(0);
501  break;
502  }
503 }
504 
506 {
507  if (cache->flag & PTCACHE_BAKED) {
508  color[0] -= 0.4f;
509  color[1] -= 0.4f;
510  color[2] -= 0.4f;
511  }
512  else if (cache->flag & PTCACHE_OUTDATED) {
513  color[0] += 0.4f;
514  color[1] += 0.4f;
515  color[2] += 0.4f;
516  }
517 }
518 
520  int search_start_frame,
521  int *r_segment_start,
522  int *r_segment_end)
523 {
524  int offset = cache->startframe;
525  int current = search_start_frame;
526 
527  /* Find segment start frame. */
528  while (true) {
529  if (current > cache->endframe) {
530  return false;
531  }
532  if (cache->cached_frames[current - offset]) {
533  *r_segment_start = current;
534  break;
535  }
536  current++;
537  }
538 
539  /* Find segment end frame. */
540  while (true) {
541  if (current > cache->endframe) {
542  *r_segment_end = current - 1;
543  return true;
544  }
545  if (!cache->cached_frames[current - offset]) {
546  *r_segment_end = current - 1;
547  return true;
548  }
549  current++;
550  }
551 }
552 
554 {
555  uint count = 0;
556 
557  int current = cache->startframe;
558  int segment_start;
559  int segment_end;
560  while (timeline_cache_find_next_cached_segment(cache, current, &segment_start, &segment_end)) {
561  count++;
562  current = segment_end + 1;
563  }
564 
565  return count;
566 }
567 
569 {
570  uint segments_count = timeline_cache_segments_count(cache);
571  if (segments_count == 0) {
572  return;
573  }
574 
575  immBeginAtMost(GPU_PRIM_TRIS, segments_count * 6);
576 
577  int current = cache->startframe;
578  int segment_start;
579  int segment_end;
580  while (timeline_cache_find_next_cached_segment(cache, current, &segment_start, &segment_end)) {
581  immRectf_fast(pos_id, segment_start - 0.5f, 0, segment_end + 0.5f, 1.0f);
582  current = segment_end + 1;
583  }
584 
585  immEnd();
586 }
587 
588 static void timeline_cache_draw_single(PTCacheID *pid, float y_offset, float height, uint pos_id)
589 {
590  GPU_matrix_push();
591  GPU_matrix_translate_2f(0.0, (float)V2D_SCROLL_HANDLE_HEIGHT + y_offset);
593 
594  float color[4];
596 
598  immRectf(pos_id, (float)pid->cache->startframe, 0.0, (float)pid->cache->endframe, 1.0);
599 
600  color[3] = 0.4f;
603 
605 
606  GPU_matrix_pop();
607 }
608 
610 {
611  if ((saction->cache_display & TIME_CACHE_DISPLAY) == 0 || ob == NULL) {
612  return;
613  }
614 
615  ListBase pidlist;
616  BKE_ptcache_ids_from_object(&pidlist, ob, scene, 0);
617 
618  uint pos_id = GPU_vertformat_attr_add(
621 
623 
624  /* Iterate over pointcaches on the active object, and draw each one's range. */
625  float y_offset = 0.0f;
626  const float cache_draw_height = 4.0f * UI_DPI_FAC * U.pixelsize;
627  LISTBASE_FOREACH (PTCacheID *, pid, &pidlist) {
628  if (timeline_cache_is_hidden_by_setting(saction, pid)) {
629  continue;
630  }
631 
632  if (pid->cache->cached_frames == NULL) {
633  continue;
634  }
635 
636  timeline_cache_draw_single(pid, y_offset, cache_draw_height, pos_id);
637 
638  y_offset += cache_draw_height;
639  }
640 
643 
644  BLI_freelistN(&pidlist);
645 }
646 
647 /* ************************************************************************* */
Blender kernel action and pose functionality.
#define PTCACHE_TYPE_SMOKE_HIGHRES
void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis)
Definition: pointcache.c:1250
#define PTCACHE_TYPE_CLOTH
#define PTCACHE_TYPE_DYNAMICPAINT
#define PTCACHE_TYPE_PARTICLES
#define PTCACHE_TYPE_SOFTBODY
#define PTCACHE_TYPE_SMOKE_DOMAIN
#define PTCACHE_TYPE_SIM_PARTICLES
#define PTCACHE_TYPE_RIGIDBODY
#define BLI_assert(a)
Definition: BLI_assert.h:46
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition: listbase.c:466
void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
Definition: math_color.c:391
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
Definition: rct.c:407
unsigned char uchar
Definition: BLI_sys_types.h:70
unsigned int uint
Definition: BLI_sys_types.h:67
#define IN_RANGE(a, b, c)
#define ELEM(...)
#define MIN2(a, b)
@ TIME_CACHE_PARTICLES
@ TIME_CACHE_RIGIDBODY
@ TIME_CACHE_DYNAMICPAINT
@ TIME_CACHE_SOFTBODY
@ TIME_CACHE_DISPLAY
@ TIME_CACHE_CLOTH
@ TIME_CACHE_SMOKE
@ SACTCONT_TIMELINE
@ SACTION_SHOW_INTERPOLATION
@ SACTION_SHOW_EXTREMES
@ SACTION_MOVING
Object is a sort of wrapper for general info.
@ PTCACHE_BAKED
@ PTCACHE_OUTDATED
@ USER_ANIM_SHOW_CHANNEL_GROUP_COLORS
#define ACHANNEL_HEIGHT(ac)
Definition: ED_anim_api.h:440
@ ANIMTYPE_SUMMARY
Definition: ED_anim_api.h:194
@ ANIMTYPE_GROUP
Definition: ED_anim_api.h:198
@ ANIMTYPE_SCENE
Definition: ED_anim_api.h:196
@ ANIMTYPE_GPLAYER
Definition: ED_anim_api.h:233
@ ANIMTYPE_FCURVE
Definition: ED_anim_api.h:199
@ ANIMTYPE_FILLACTD
Definition: ED_anim_api.h:204
@ ANIMTYPE_OBJECT
Definition: ED_anim_api.h:197
@ ANIMTYPE_DSWOR
Definition: ED_anim_api.h:213
@ ANIMTYPE_DSSKEY
Definition: ED_anim_api.h:212
#define ACHANNEL_FIRST_TOP(ac)
Definition: ED_anim_api.h:438
@ ALE_SCE
Definition: ED_anim_api.h:256
@ ALE_NONE
Definition: ED_anim_api.h:249
@ ALE_GPFRAME
Definition: ED_anim_api.h:251
@ ALE_FCURVE
Definition: ED_anim_api.h:250
@ ALE_ALL
Definition: ED_anim_api.h:255
@ ALE_ACT
Definition: ED_anim_api.h:258
@ ALE_OB
Definition: ED_anim_api.h:257
@ ALE_GROUP
Definition: ED_anim_api.h:259
@ ALE_MASKLAY
Definition: ED_anim_api.h:252
#define ACHANNEL_SKIP
Definition: ED_anim_api.h:441
@ ANIMCONT_MASK
Definition: ED_anim_api.h:112
@ ANIMCONT_SHAPEKEY
Definition: ED_anim_api.h:105
@ ANIMCONT_DOPESHEET
Definition: ED_anim_api.h:107
@ ANIMCONT_ACTION
Definition: ED_anim_api.h:104
@ ANIMCONT_GPENCIL
Definition: ED_anim_api.h:106
@ ACHANNEL_SETTING_SELECT
Definition: ED_anim_api.h:561
#define ACHANNEL_STEP(ac)
Definition: ED_anim_api.h:442
#define ACHANNEL_TOT_HEIGHT(ac, item_amount)
Definition: ED_anim_api.h:444
@ ANIMFILTER_DATA_VISIBLE
Definition: ED_anim_api.h:292
@ ANIMFILTER_LIST_VISIBLE
Definition: ED_anim_api.h:295
@ ANIMFILTER_LIST_CHANNELS
Definition: ED_anim_api.h:300
void immUniformColor4ubv(const unsigned char rgba[4])
void immUnbindProgram(void)
void immVertex2f(uint attr_id, float x, float y)
void immUniformThemeColor(int color_id)
void immBindBuiltinProgram(eGPUBuiltinShader shader_id)
void immBeginAtMost(GPUPrimType, uint max_vertex_len)
void immUniformColor3ubvAlpha(const unsigned char rgb[3], unsigned char a)
void immUniformColor4fv(const float rgba[4])
GPUVertFormat * immVertexFormat(void)
void immUniformColor3f(float r, float g, float b)
void immBegin(GPUPrimType, uint vertex_len)
void immEnd(void)
void immRectf_fast(uint pos, float x1, float y1, float x2, float y2)
void immRectf(uint pos, float x1, float y1, float x2, float y2)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
void GPU_matrix_pop(void)
Definition: gpu_matrix.cc:126
void GPU_matrix_scale_2f(float x, float y)
Definition: gpu_matrix.cc:216
void GPU_matrix_push(void)
Definition: gpu_matrix.cc:119
void GPU_matrix_translate_2f(float x, float y)
Definition: gpu_matrix.cc:174
@ GPU_PRIM_LINES
Definition: GPU_primitive.h:20
@ GPU_PRIM_TRIS
Definition: GPU_primitive.h:21
@ GPU_SHADER_2D_UNIFORM_COLOR
Definition: GPU_shader.h:201
@ GPU_BLEND_NONE
Definition: GPU_state.h:60
@ GPU_BLEND_ALPHA
Definition: GPU_state.h:62
void GPU_blend(eGPUBlend blend)
Definition: gpu_state.cc:39
@ GPU_FETCH_FLOAT
uint GPU_vertformat_attr_add(GPUVertFormat *, const char *name, GPUVertCompType, uint comp_len, GPUVertFetchMode)
@ GPU_COMP_F32
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
#define C
Definition: RandGen.cpp:25
@ UI_EMBOSS
Definition: UI_interface.h:108
void UI_block_end(const struct bContext *C, uiBlock *block)
void UI_block_draw(const struct bContext *C, struct uiBlock *block)
#define UI_DPI_FAC
Definition: UI_interface.h:305
uiBlock * UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, eUIEmbossType emboss)
@ TH_GROUP
Definition: UI_resources.h:74
@ TH_DOPESHEET_CHANNELSUBOB
Definition: UI_resources.h:213
@ TH_ANIM_ACTIVE
Definition: UI_resources.h:266
@ TH_SHADE2
Definition: UI_resources.h:65
@ TH_HILITE
Definition: UI_resources.h:66
@ TH_GROUP_ACTIVE
Definition: UI_resources.h:75
@ TH_DOPESHEET_CHANNELOB
Definition: UI_resources.h:212
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
Definition: resources.c:1352
#define V2D_LOCK_COPY
Definition: UI_view2d.h:82
#define V2D_SCROLL_HANDLE_HEIGHT
Definition: UI_view2d.h:68
void UI_view2d_sync(struct bScreen *screen, struct ScrArea *area, struct View2D *v2dcur, int flag)
Definition: view2d.cc:851
void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region)
Definition: action_draw.c:50
void timeline_draw_cache(SpaceAction *saction, Object *ob, Scene *scene)
Definition: action_draw.c:609
void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *region)
Definition: action_draw.c:165
static uint timeline_cache_segments_count(PointCache *cache)
Definition: action_draw.c:553
static void timeline_cache_draw_cached_segments(PointCache *cache, uint pos_id)
Definition: action_draw.c:568
static void timeline_cache_draw_single(PTCacheID *pid, float y_offset, float height, uint pos_id)
Definition: action_draw.c:588
static bool timeline_cache_is_hidden_by_setting(SpaceAction *saction, PTCacheID *pid)
Definition: action_draw.c:415
static void draw_channel_action_ranges(bAnimContext *ac, ListBase *anim_data, View2D *v2d)
Definition: action_draw.c:118
static void timeline_cache_modify_color_based_on_state(PointCache *cache, float color[4])
Definition: action_draw.c:505
static void timeline_cache_color_get(PTCacheID *pid, float color[4])
Definition: action_draw.c:454
static bool timeline_cache_find_next_cached_segment(PointCache *cache, int search_start_frame, int *r_segment_start, int *r_segment_end)
Definition: action_draw.c:519
#define EXTRA_SCROLL_PAD
Definition: action_draw.c:115
void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListElem *ale, uiBlock *block, rctf *rect, size_t channel_index)
void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index)
short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
bAction * ANIM_channel_action_get(const bAnimListElem *ale)
const bAnimChannelType * ANIM_channel_get_typeinfo(bAnimListElem *ale)
void ANIM_animdata_freelist(ListBase *anim_data)
Definition: anim_deps.c:397
AnimData * ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
Definition: anim_draw.c:216
void ANIM_draw_action_framerange(AnimData *adt, bAction *action, View2D *v2d, float ymin, float ymax)
Definition: anim_draw.c:149
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
Definition: anim_filter.c:3447
unsigned int U
Definition: btGjkEpa3.h:78
Scene scene
uint pos
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
int count
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void draw_gpl_channel(AnimKeylistDrawList *draw_list, bDopeSheet *ads, bGPDlayer *gpl, float ypos, float yscale_fac, int saction_flag)
void draw_object_channel(AnimKeylistDrawList *draw_list, bDopeSheet *ads, Object *ob, float ypos, float yscale_fac, int saction_flag)
void draw_fcurve_channel(AnimKeylistDrawList *draw_list, AnimData *adt, FCurve *fcu, float ypos, float yscale_fac, int saction_flag)
void ED_keylist_draw_list_flush(AnimKeylistDrawList *draw_list, View2D *v2d)
AnimKeylistDrawList * ED_keylist_draw_list_create(void)
void ED_keylist_draw_list_free(AnimKeylistDrawList *draw_list)
void draw_action_channel(AnimKeylistDrawList *draw_list, AnimData *adt, bAction *act, float ypos, float yscale_fac, int saction_flag)
void draw_agroup_channel(AnimKeylistDrawList *draw_list, AnimData *adt, bActionGroup *agrp, float ypos, float yscale_fac, int saction_flag)
void draw_scene_channel(AnimKeylistDrawList *draw_list, bDopeSheet *ads, Scene *sce, float ypos, float yscale_fac, int saction_flag)
void draw_masklay_channel(AnimKeylistDrawList *draw_list, bDopeSheet *ads, MaskLayer *masklay, float ypos, float yscale_fac, int saction_flag)
void draw_summary_channel(struct AnimKeylistDrawList *draw_list, bAnimContext *ac, float ypos, float yscale_fac, int saction_flag)
format
Definition: logImageCore.h:38
bActionGroup * grp
void * first
Definition: DNA_listBase.h:31
unsigned int type
struct PointCache * cache
struct RenderData r
bDopeSheet ads
unsigned char select[4]
unsigned char solid[4]
unsigned char active[4]
ThemeWireColor cs
bool(* has_setting)(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
Definition: ED_anim_api.h:604
struct Scene * scene
Definition: ED_anim_api.h:84
short datatype
Definition: ED_anim_api.h:62
void * data
Definition: ED_anim_api.h:60
struct ScrArea * area
Definition: ED_anim_api.h:72
float yscale_fac
Definition: ED_anim_api.h:98
struct bAnimListElem * next
Definition: ED_anim_api.h:127
void * key_data
Definition: ED_anim_api.h:146
float color[4]
float xmax
Definition: DNA_vec_types.h:69
float xmin
Definition: DNA_vec_types.h:69
float ymax
Definition: DNA_vec_types.h:70
float ymin
Definition: DNA_vec_types.h:70