Blender  V2.93
space_clip.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2011 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include <stdio.h>
25 #include <string.h>
26 
27 #include "DNA_mask_types.h"
28 #include "DNA_movieclip_types.h"
29 #include "DNA_scene_types.h"
30 #include "DNA_view3d_types.h" /* for pivot point */
31 
32 #include "MEM_guardedalloc.h"
33 
34 #include "BLI_blenlib.h"
35 #include "BLI_math.h"
36 #include "BLI_utildefines.h"
37 
38 #include "BKE_context.h"
39 #include "BKE_lib_id.h"
40 #include "BKE_movieclip.h"
41 #include "BKE_screen.h"
42 #include "BKE_tracking.h"
43 
44 #include "IMB_imbuf_types.h"
45 
46 #include "ED_anim_api.h" /* for timeline cursor drawing */
47 #include "ED_clip.h"
48 #include "ED_mask.h"
49 #include "ED_screen.h"
50 #include "ED_space_api.h"
51 #include "ED_time_scrub_ui.h"
52 #include "ED_uvedit.h" /* just for ED_image_draw_cursor */
53 
54 #include "IMB_imbuf.h"
55 
56 #include "GPU_matrix.h"
57 
58 #include "WM_api.h"
59 #include "WM_types.h"
60 
61 #include "UI_interface.h"
62 #include "UI_resources.h"
63 #include "UI_view2d.h"
64 
65 #include "RNA_access.h"
66 
67 #include "clip_intern.h" /* own include */
68 
69 static void init_preview_region(const Scene *scene,
70  const ScrArea *area,
71  const SpaceClip *sc,
72  ARegion *region)
73 {
74  region->regiontype = RGN_TYPE_PREVIEW;
75  region->alignment = RGN_ALIGN_TOP;
76  region->flag |= RGN_FLAG_HIDDEN;
77 
78  if (sc->view == SC_VIEW_DOPESHEET) {
79  region->v2d.tot.xmin = -10.0f;
80  region->v2d.tot.ymin = (float)(-area->winy) / 3.0f;
81  region->v2d.tot.xmax = (float)(area->winx);
82  region->v2d.tot.ymax = 0.0f;
83 
84  region->v2d.cur = region->v2d.tot;
85 
86  region->v2d.min[0] = 0.0f;
87  region->v2d.min[1] = 0.0f;
88 
89  region->v2d.max[0] = MAXFRAMEF;
90  region->v2d.max[1] = FLT_MAX;
91 
92  region->v2d.minzoom = 0.01f;
93  region->v2d.maxzoom = 50;
95  region->v2d.scroll |= V2D_SCROLL_RIGHT;
96  region->v2d.keepzoom = V2D_LOCKZOOM_Y;
97  region->v2d.keepofs = V2D_KEEPOFS_Y;
98  region->v2d.align = V2D_ALIGN_NO_POS_Y;
100  }
101  else {
102  region->v2d.tot.xmin = 0.0f;
103  region->v2d.tot.ymin = -10.0f;
104  region->v2d.tot.xmax = (float)scene->r.efra;
105  region->v2d.tot.ymax = 10.0f;
106 
107  region->v2d.cur = region->v2d.tot;
108 
109  region->v2d.min[0] = FLT_MIN;
110  region->v2d.min[1] = FLT_MIN;
111 
112  region->v2d.max[0] = MAXFRAMEF;
113  region->v2d.max[1] = FLT_MAX;
114 
117 
118  region->v2d.minzoom = 0.0f;
119  region->v2d.maxzoom = 0.0f;
120  region->v2d.keepzoom = 0;
121  region->v2d.keepofs = 0;
122  region->v2d.align = 0;
123  region->v2d.flag = 0;
124 
125  region->v2d.keeptot = 0;
126  }
127 }
128 
129 static void reinit_preview_region(const bContext *C, ARegion *region)
130 {
134 
135  if (sc->view == SC_VIEW_DOPESHEET) {
136  if ((region->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) == 0) {
137  init_preview_region(scene, area, sc, region);
138  }
139  }
140  else {
141  if (region->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) {
142  init_preview_region(scene, area, sc, region);
143  }
144  }
145 }
146 
148 {
149  ARegion *region, *arnew;
150 
152  if (region) {
153  return region;
154  }
155 
156  /* add subdiv level; after header */
158 
159  /* is error! */
160  if (region == NULL) {
161  return NULL;
162  }
163 
164  arnew = MEM_callocN(sizeof(ARegion), "clip preview region");
165 
166  BLI_insertlinkbefore(&area->regionbase, region, arnew);
168 
169  return arnew;
170 }
171 
173 {
174  ARegion *region, *arnew;
175 
177  if (region) {
178  return region;
179  }
180 
181  /* add subdiv level; after header */
183 
184  /* is error! */
185  if (region == NULL) {
186  return NULL;
187  }
188 
189  arnew = MEM_callocN(sizeof(ARegion), "clip channels region");
190 
191  BLI_insertlinkbefore(&area->regionbase, region, arnew);
192  arnew->regiontype = RGN_TYPE_CHANNELS;
193  arnew->alignment = RGN_ALIGN_LEFT;
194 
195  arnew->v2d.scroll = V2D_SCROLL_BOTTOM;
197 
198  return arnew;
199 }
200 
202 {
203  SpaceClip *sc = (SpaceClip *)area->spacedata.first;
204  ARegion *region;
205 
206  if (sc->mode != SC_MODE_TRACKING) {
207  return;
208  }
209 
210  /* only while properties are visible */
211  for (region = area->regionbase.first; region; region = region->next) {
212  if (region->regiontype == RGN_TYPE_UI && region->flag & RGN_FLAG_HIDDEN) {
213  return;
214  }
215  }
216 
217  sc->scopes.ok = false;
218 }
219 
221 {
222  SpaceClip *sc = (SpaceClip *)area->spacedata.first;
223 
226  }
227 }
228 
230 {
231  SpaceClip *space_clip = (SpaceClip *)area->spacedata.first;
232  BKE_movieclip_user_set_frame(&space_clip->user, scene->r.cfra);
233 }
234 
235 /* ******************** default callbacks for clip space ***************** */
236 
237 static SpaceLink *clip_create(const ScrArea *area, const Scene *scene)
238 {
239  ARegion *region;
240  SpaceClip *sc;
241 
242  sc = MEM_callocN(sizeof(SpaceClip), "initclip");
243  sc->spacetype = SPACE_CLIP;
246  sc->zoom = 1.0f;
247  sc->path_length = 20;
248  sc->scopes.track_preview_height = 120;
250 
251  /* header */
252  region = MEM_callocN(sizeof(ARegion), "header for clip");
253 
254  BLI_addtail(&sc->regionbase, region);
255  region->regiontype = RGN_TYPE_HEADER;
257 
258  /* tools view */
259  region = MEM_callocN(sizeof(ARegion), "tools for clip");
260 
261  BLI_addtail(&sc->regionbase, region);
262  region->regiontype = RGN_TYPE_TOOLS;
263  region->alignment = RGN_ALIGN_LEFT;
264 
265  /* properties view */
266  region = MEM_callocN(sizeof(ARegion), "properties for clip");
267 
268  BLI_addtail(&sc->regionbase, region);
269  region->regiontype = RGN_TYPE_UI;
270  region->alignment = RGN_ALIGN_RIGHT;
271 
272  /* channels view */
273  region = MEM_callocN(sizeof(ARegion), "channels for clip");
274 
275  BLI_addtail(&sc->regionbase, region);
276  region->regiontype = RGN_TYPE_CHANNELS;
277  region->alignment = RGN_ALIGN_LEFT;
278 
279  region->v2d.scroll = V2D_SCROLL_BOTTOM;
281 
282  /* preview view */
283  region = MEM_callocN(sizeof(ARegion), "preview for clip");
284 
285  BLI_addtail(&sc->regionbase, region);
286  init_preview_region(scene, area, sc, region);
287 
288  /* main region */
289  region = MEM_callocN(sizeof(ARegion), "main region for clip");
290 
291  BLI_addtail(&sc->regionbase, region);
292  region->regiontype = RGN_TYPE_WINDOW;
293 
294  return (SpaceLink *)sc;
295 }
296 
297 /* not spacelink itself */
298 static void clip_free(SpaceLink *sl)
299 {
300  SpaceClip *sc = (SpaceClip *)sl;
301 
302  sc->clip = NULL;
303 
304  if (sc->scopes.track_preview) {
306  }
307 
308  if (sc->scopes.track_search) {
310  }
311 }
312 
313 /* spacetype; init callback */
314 static void clip_init(struct wmWindowManager *UNUSED(wm), ScrArea *area)
315 {
316  ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
317 
318  /* add drop boxes */
319  WM_event_add_dropbox_handler(&area->handlers, lb);
320 }
321 
323 {
324  SpaceClip *scn = MEM_dupallocN(sl);
325 
326  /* clear or remove stuff from old */
327  scn->scopes.track_search = NULL;
328  scn->scopes.track_preview = NULL;
329  scn->scopes.ok = false;
330 
331  return (SpaceLink *)scn;
332 }
333 
335 {
336  ScrArea *area = params->area;
337  wmNotifier *wmn = params->notifier;
338  const Scene *scene = params->scene;
339 
340  /* context changes */
341  switch (wmn->category) {
342  case NC_SCENE:
343  switch (wmn->data) {
344  case ND_FRAME:
347 
348  case ND_FRAME_RANGE:
350  break;
351  }
352  break;
353  case NC_MOVIECLIP:
354  switch (wmn->data) {
355  case ND_DISPLAY:
356  case ND_SELECT:
359  break;
360  }
361  switch (wmn->action) {
362  case NA_REMOVED:
363  case NA_EDITED:
364  case NA_EVALUATED:
365  /* fall-through */
366 
367  case NA_SELECTED:
370  break;
371  }
372  break;
373  case NC_MASK:
374  switch (wmn->data) {
375  case ND_SELECT:
376  case ND_DATA:
377  case ND_DRAW:
379  break;
380  }
381  switch (wmn->action) {
382  case NA_SELECTED:
384  break;
385  case NA_EDITED:
387  break;
388  }
389  break;
390  case NC_GEOM:
391  switch (wmn->data) {
392  case ND_SELECT:
395  break;
396  }
397  break;
398  case NC_SCREEN:
399  switch (wmn->data) {
400  case ND_ANIMPLAY:
402  break;
403  case ND_LAYOUTSET:
405  break;
406  }
407  break;
408  case NC_SPACE:
409  if (wmn->data == ND_SPACE_CLIP) {
412  }
413  break;
414  case NC_GPENCIL:
415  if (wmn->action == NA_EDITED) {
418  }
419  else if (wmn->data & ND_GPENCIL_EDITMODE) {
421  }
422  break;
423  case NC_WM:
424  switch (wmn->data) {
425  case ND_FILEREAD:
426  case ND_UNDO:
428  break;
429  }
430  break;
431  }
432 }
433 
434 static void clip_operatortypes(void)
435 {
436  /* ** clip_ops.c ** */
450 #ifdef WITH_INPUT_NDOF
451  WM_operatortype_append(CLIP_OT_view_ndof);
452 #endif
457 
458  /* ** tracking_ops.c ** */
459 
460  /* navigation */
462 
463  /* set optical center to frame center */
465 
466  /* selection */
473 
474  /* markers */
480 
481  /* track */
484 
485  /* solving */
488 
493 
495 
496  /* orientation */
503 
504  /* detect */
506 
507  /* stabilization */
514 
515  /* clean-up */
520 
522 
523  /* object tracking */
526 
527  /* clipboard */
530 
531  /* Plane tracker */
534 
537 
538  /* ** clip_graph_ops.c ** */
539 
540  /* graph editing */
541 
542  /* selection */
546 
551 
553 
554  /* ** clip_dopesheet_ops.c ** */
555 
558 }
559 
560 static void clip_keymap(struct wmKeyConfig *keyconf)
561 {
562  /* ******** Global hotkeys available for all regions ******** */
563  WM_keymap_ensure(keyconf, "Clip", SPACE_CLIP, 0);
564 
565  /* ******** Hotkeys available for main region only ******** */
566  WM_keymap_ensure(keyconf, "Clip Editor", SPACE_CLIP, 0);
567  // keymap->poll = ED_space_clip_tracking_poll;
568 
569  /* ******** Hotkeys available for preview region only ******** */
570  WM_keymap_ensure(keyconf, "Clip Graph Editor", SPACE_CLIP, 0);
571 
572  /* ******** Hotkeys available for channels region only ******** */
573  WM_keymap_ensure(keyconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
574 }
575 
576 /* DO NOT make this static, this hides the symbol and breaks API generation script. */
577 extern const char *clip_context_dir[]; /* quiet warning. */
578 const char *clip_context_dir[] = {"edit_movieclip", "edit_mask", NULL};
579 
580 static int /*eContextResult*/ clip_context(const bContext *C,
581  const char *member,
583 {
585 
586  if (CTX_data_dir(member)) {
588 
589  return CTX_RESULT_OK;
590  }
591  if (CTX_data_equals(member, "edit_movieclip")) {
592  if (sc->clip) {
594  }
595  return CTX_RESULT_OK;
596  }
597  if (CTX_data_equals(member, "edit_mask")) {
598  if (sc->mask_info.mask) {
600  }
601  return CTX_RESULT_OK;
602  }
603 
605 }
606 
607 /* dropboxes */
609  wmDrag *drag,
610  const wmEvent *UNUSED(event),
611  const char **UNUSED(r_tooltip))
612 {
613  if (drag->type == WM_DRAG_PATH) {
614  /* rule might not work? */
615  if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) {
616  return true;
617  }
618  }
619 
620  return false;
621 }
622 
623 static void clip_drop_copy(wmDrag *drag, wmDropBox *drop)
624 {
625  PointerRNA itemptr;
626  char dir[FILE_MAX], file[FILE_MAX];
627 
628  BLI_split_dirfile(drag->path, dir, file, sizeof(dir), sizeof(file));
629 
630  RNA_string_set(drop->ptr, "directory", dir);
631 
632  RNA_collection_clear(drop->ptr, "files");
633  RNA_collection_add(drop->ptr, "files", &itemptr);
634  RNA_string_set(&itemptr, "name", file);
635 }
636 
637 /* area+region dropbox definition */
638 static void clip_dropboxes(void)
639 {
640  ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
641 
642  WM_dropbox_add(lb, "CLIP_OT_open", clip_drop_poll, clip_drop_copy, NULL);
643 }
644 
645 static void clip_refresh(const bContext *C, ScrArea *area)
646 {
648  wmWindow *window = CTX_wm_window(C);
650  SpaceClip *sc = (SpaceClip *)area->spacedata.first;
653  ARegion *region_preview = ED_clip_has_preview_region(C, area);
654  ARegion *region_properties = ED_clip_has_properties_region(area);
655  ARegion *region_channels = ED_clip_has_channels_region(area);
656  bool main_visible = false, preview_visible = false, tools_visible = false;
657  bool properties_visible = false, channels_visible = false;
658  bool view_changed = false;
659 
660  switch (sc->view) {
661  case SC_VIEW_CLIP:
662  main_visible = true;
663  preview_visible = false;
664  tools_visible = true;
665  properties_visible = true;
666  channels_visible = false;
667  break;
668  case SC_VIEW_GRAPH:
669  main_visible = false;
670  preview_visible = true;
671  tools_visible = false;
672  properties_visible = false;
673  channels_visible = false;
674 
675  reinit_preview_region(C, region_preview);
676  break;
677  case SC_VIEW_DOPESHEET:
678  main_visible = false;
679  preview_visible = true;
680  tools_visible = false;
681  properties_visible = false;
682  channels_visible = true;
683 
684  reinit_preview_region(C, region_preview);
685  break;
686  }
687 
688  if (main_visible) {
689  if (region_main && (region_main->flag & RGN_FLAG_HIDDEN)) {
690  region_main->flag &= ~RGN_FLAG_HIDDEN;
691  region_main->v2d.flag &= ~V2D_IS_INIT;
692  view_changed = true;
693  }
694 
695  if (region_main && region_main->alignment != RGN_ALIGN_NONE) {
696  region_main->alignment = RGN_ALIGN_NONE;
697  view_changed = true;
698  }
699  }
700  else {
701  if (region_main && !(region_main->flag & RGN_FLAG_HIDDEN)) {
702  region_main->flag |= RGN_FLAG_HIDDEN;
703  region_main->v2d.flag &= ~V2D_IS_INIT;
704  WM_event_remove_handlers((bContext *)C, &region_main->handlers);
705  view_changed = true;
706  }
707  if (region_main && region_main->alignment != RGN_ALIGN_NONE) {
708  region_main->alignment = RGN_ALIGN_NONE;
709  view_changed = true;
710  }
711  }
712 
713  if (properties_visible) {
714  if (region_properties && (region_properties->flag & RGN_FLAG_HIDDEN)) {
715  region_properties->flag &= ~RGN_FLAG_HIDDEN;
716  region_properties->v2d.flag &= ~V2D_IS_INIT;
717  view_changed = true;
718  }
719  if (region_properties && region_properties->alignment != RGN_ALIGN_RIGHT) {
720  region_properties->alignment = RGN_ALIGN_RIGHT;
721  view_changed = true;
722  }
723  }
724  else {
725  if (region_properties && !(region_properties->flag & RGN_FLAG_HIDDEN)) {
726  region_properties->flag |= RGN_FLAG_HIDDEN;
727  region_properties->v2d.flag &= ~V2D_IS_INIT;
728  WM_event_remove_handlers((bContext *)C, &region_properties->handlers);
729  view_changed = true;
730  }
731  if (region_properties && region_properties->alignment != RGN_ALIGN_NONE) {
732  region_properties->alignment = RGN_ALIGN_NONE;
733  view_changed = true;
734  }
735  }
736 
737  if (tools_visible) {
738  if (region_tools && (region_tools->flag & RGN_FLAG_HIDDEN)) {
739  region_tools->flag &= ~RGN_FLAG_HIDDEN;
740  region_tools->v2d.flag &= ~V2D_IS_INIT;
741  view_changed = true;
742  }
743  if (region_tools && region_tools->alignment != RGN_ALIGN_LEFT) {
744  region_tools->alignment = RGN_ALIGN_LEFT;
745  view_changed = true;
746  }
747  }
748  else {
749  if (region_tools && !(region_tools->flag & RGN_FLAG_HIDDEN)) {
750  region_tools->flag |= RGN_FLAG_HIDDEN;
751  region_tools->v2d.flag &= ~V2D_IS_INIT;
752  WM_event_remove_handlers((bContext *)C, &region_tools->handlers);
753  view_changed = true;
754  }
755  if (region_tools && region_tools->alignment != RGN_ALIGN_NONE) {
756  region_tools->alignment = RGN_ALIGN_NONE;
757  view_changed = true;
758  }
759  }
760 
761  if (preview_visible) {
762  if (region_preview && (region_preview->flag & RGN_FLAG_HIDDEN)) {
763  region_preview->flag &= ~RGN_FLAG_HIDDEN;
764  region_preview->v2d.flag &= ~V2D_IS_INIT;
765  region_preview->v2d.cur = region_preview->v2d.tot;
766  view_changed = true;
767  }
768  if (region_preview && region_preview->alignment != RGN_ALIGN_NONE) {
769  region_preview->alignment = RGN_ALIGN_NONE;
770  view_changed = true;
771  }
772  }
773  else {
774  if (region_preview && !(region_preview->flag & RGN_FLAG_HIDDEN)) {
775  region_preview->flag |= RGN_FLAG_HIDDEN;
776  region_preview->v2d.flag &= ~V2D_IS_INIT;
777  WM_event_remove_handlers((bContext *)C, &region_preview->handlers);
778  view_changed = true;
779  }
780  if (region_preview && region_preview->alignment != RGN_ALIGN_NONE) {
781  region_preview->alignment = RGN_ALIGN_NONE;
782  view_changed = true;
783  }
784  }
785 
786  if (channels_visible) {
787  if (region_channels && (region_channels->flag & RGN_FLAG_HIDDEN)) {
788  region_channels->flag &= ~RGN_FLAG_HIDDEN;
789  region_channels->v2d.flag &= ~V2D_IS_INIT;
790  view_changed = true;
791  }
792  if (region_channels && region_channels->alignment != RGN_ALIGN_LEFT) {
793  region_channels->alignment = RGN_ALIGN_LEFT;
794  view_changed = true;
795  }
796  }
797  else {
798  if (region_channels && !(region_channels->flag & RGN_FLAG_HIDDEN)) {
799  region_channels->flag |= RGN_FLAG_HIDDEN;
800  region_channels->v2d.flag &= ~V2D_IS_INIT;
801  WM_event_remove_handlers((bContext *)C, &region_channels->handlers);
802  view_changed = true;
803  }
804  if (region_channels && region_channels->alignment != RGN_ALIGN_NONE) {
805  region_channels->alignment = RGN_ALIGN_NONE;
806  view_changed = true;
807  }
808  }
809 
810  if (view_changed) {
811  ED_area_init(wm, window, area);
813  }
814 
816 }
817 
819 {
820  VIEW2D_GGT_navigate_impl(gzgt, "CLIP_GGT_navigate");
821 }
822 
823 static void clip_gizmos(void)
824 {
827 
829 }
830 
831 /********************* main region ********************/
832 
833 /* sets up the fields of the View2D from zoom and offset */
834 static void movieclip_main_area_set_view2d(const bContext *C, ARegion *region)
835 {
837  float x1, y1, w, h, aspx, aspy;
838  int width, height, winx, winy;
839 
841  ED_space_clip_get_aspect(sc, &aspx, &aspy);
842 
843  w = width * aspx;
844  h = height * aspy;
845 
846  winx = BLI_rcti_size_x(&region->winrct) + 1;
847  winy = BLI_rcti_size_y(&region->winrct) + 1;
848 
849  region->v2d.tot.xmin = 0;
850  region->v2d.tot.ymin = 0;
851  region->v2d.tot.xmax = w;
852  region->v2d.tot.ymax = h;
853 
854  region->v2d.mask.xmin = region->v2d.mask.ymin = 0;
855  region->v2d.mask.xmax = winx;
856  region->v2d.mask.ymax = winy;
857 
858  /* which part of the image space do we see? */
859  x1 = region->winrct.xmin + (winx - sc->zoom * w) / 2.0f;
860  y1 = region->winrct.ymin + (winy - sc->zoom * h) / 2.0f;
861 
862  x1 -= sc->zoom * sc->xof;
863  y1 -= sc->zoom * sc->yof;
864 
865  /* relative display right */
866  region->v2d.cur.xmin = (region->winrct.xmin - (float)x1) / sc->zoom;
867  region->v2d.cur.xmax = region->v2d.cur.xmin + ((float)winx / sc->zoom);
868 
869  /* relative display left */
870  region->v2d.cur.ymin = (region->winrct.ymin - (float)y1) / sc->zoom;
871  region->v2d.cur.ymax = region->v2d.cur.ymin + ((float)winy / sc->zoom);
872 
873  /* normalize 0.0..1.0 */
874  region->v2d.cur.xmin /= w;
875  region->v2d.cur.xmax /= w;
876  region->v2d.cur.ymin /= h;
877  region->v2d.cur.ymax /= h;
878 }
879 
880 /* add handlers, stuff you only do once or on area/region changes */
882 {
883  wmKeyMap *keymap;
884 
885  /* NOTE: don't use `UI_view2d_region_reinit(&region->v2d, ...)`
886  * since the space clip manages own v2d in #movieclip_main_area_set_view2d */
887 
888  /* mask polls mode */
889  keymap = WM_keymap_ensure(wm->defaultconf, "Mask Editing", 0, 0);
891 
892  /* own keymap */
893  keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
895 
896  keymap = WM_keymap_ensure(wm->defaultconf, "Clip Editor", SPACE_CLIP, 0);
898 }
899 
900 static void clip_main_region_draw(const bContext *C, ARegion *region)
901 {
902  /* draw entirely, view changes should be handled here */
904  MovieClip *clip = ED_space_clip_get_clip(sc);
905  float aspx, aspy, zoomx, zoomy, x, y;
906  int width, height;
907  bool show_cursor = false;
908 
909  /* if tracking is in progress, we should synchronize framenr from clipuser
910  * so latest tracked frame would be shown */
911  if (clip && clip->tracking_context) {
913  }
914 
915  if (sc->flag & SC_LOCK_SELECTION) {
916  ImBuf *tmpibuf = NULL;
917 
920  }
921 
922  if (ED_clip_view_selection(C, region, 0)) {
923  sc->xof += sc->xlockof;
924  sc->yof += sc->ylockof;
925  }
926 
927  if (tmpibuf) {
928  IMB_freeImBuf(tmpibuf);
929  }
930  }
931 
932  /* clear and setup matrix */
934 
935  /* data... */
937 
938  /* callback */
940 
941  clip_draw_main(C, sc, region);
942 
943  /* TODO(sergey): would be nice to find a way to de-duplicate all this space conversions */
944  UI_view2d_view_to_region_fl(&region->v2d, 0.0f, 0.0f, &x, &y);
946  ED_space_clip_get_zoom(sc, region, &zoomx, &zoomy);
947  ED_space_clip_get_aspect(sc, &aspx, &aspy);
948 
949  if (sc->mode == SC_MODE_MASKEDIT) {
951  if (mask && clip) {
953  int mask_width, mask_height;
954  ED_mask_get_size(area, &mask_width, &mask_height);
956  mask,
957  region,
958  sc->mask_info.draw_flag,
959  sc->mask_info.draw_type,
961  mask_width,
962  mask_height,
963  aspx,
964  aspy,
965  true,
966  true,
967  sc->stabmat,
968  C);
969  }
970  }
971 
972  show_cursor |= sc->mode == SC_MODE_MASKEDIT;
973  show_cursor |= sc->around == V3D_AROUND_CURSOR;
974 
975  if (show_cursor) {
976  GPU_matrix_push();
978  GPU_matrix_scale_2f(zoomx, zoomy);
979  GPU_matrix_mul(sc->stabmat);
981  ED_image_draw_cursor(region, sc->cursor);
982  GPU_matrix_pop();
983  }
984 
985  clip_draw_cache_and_notes(C, sc, region);
986 
987  if (sc->flag & SC_SHOW_ANNOTATION) {
988  /* Grease Pencil */
990  }
991 
992  /* callback */
993  /* TODO(sergey): For being consistent with space image the projection needs to be configured
994  * the way how the commented out code does it. This works correct for tracking data, but it
995  * causes wrong aspect correction for mask editor (see T84990). */
996  // GPU_matrix_push_projection();
997  // wmOrtho2(region->v2d.cur.xmin, region->v2d.cur.xmax, region->v2d.cur.ymin,
998  // region->v2d.cur.ymax);
1000  // GPU_matrix_pop_projection();
1001 
1002  /* reset view matrix */
1004 
1005  if (sc->flag & SC_SHOW_ANNOTATION) {
1006  /* draw Grease Pencil - screen space only */
1007  clip_draw_grease_pencil((bContext *)C, false);
1008  }
1009 
1011 }
1012 
1014 {
1015  ARegion *region = params->region;
1016  wmNotifier *wmn = params->notifier;
1017 
1018  /* context changes */
1019  switch (wmn->category) {
1020  case NC_GPENCIL:
1021  if (wmn->action == NA_EDITED) {
1022  ED_region_tag_redraw(region);
1023  }
1024  else if (wmn->data & ND_GPENCIL_EDITMODE) {
1025  ED_region_tag_redraw(region);
1026  }
1027  break;
1028  }
1029 }
1030 
1031 /****************** preview region ******************/
1032 
1034 {
1035  wmKeyMap *keymap;
1036 
1037  UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_CUSTOM, region->winx, region->winy);
1038 
1039  /* own keymap */
1040 
1041  keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
1043 
1044  keymap = WM_keymap_ensure(wm->defaultconf, "Clip Time Scrub", SPACE_CLIP, RGN_TYPE_PREVIEW);
1046 
1047  keymap = WM_keymap_ensure(wm->defaultconf, "Clip Graph Editor", SPACE_CLIP, 0);
1049 
1050  keymap = WM_keymap_ensure(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
1052 }
1053 
1054 static void graph_region_draw(const bContext *C, ARegion *region)
1055 {
1056  View2D *v2d = &region->v2d;
1057  SpaceClip *sc = CTX_wm_space_clip(C);
1059  short cfra_flag = 0;
1060 
1061  if (sc->flag & SC_LOCK_TIMECURSOR) {
1063  }
1064 
1065  /* clear and setup matrix */
1067 
1068  UI_view2d_view_ortho(v2d);
1069 
1070  /* data... */
1071  clip_draw_graph(sc, region, scene);
1072 
1073  /* current frame indicator line */
1074  if (sc->flag & SC_SHOW_SECONDS) {
1075  cfra_flag |= DRAWCFRA_UNIT_SECONDS;
1076  }
1077  ANIM_draw_cfra(C, v2d, cfra_flag);
1078 
1079  /* reset view matrix */
1081 
1082  /* time-scrubbing */
1083  ED_time_scrub_draw(region, scene, sc->flag & SC_SHOW_SECONDS, true);
1084 
1085  /* scrollers */
1087 
1088  /* scale indicators */
1089  {
1090  rcti rect;
1091  BLI_rcti_init(
1092  &rect, 0, 15 * UI_DPI_FAC, 15 * UI_DPI_FAC, region->winy - UI_TIME_SCRUB_MARGIN_Y);
1093  UI_view2d_draw_scale_y__values(region, v2d, &rect, TH_TEXT);
1094  }
1095 }
1096 
1097 static void dopesheet_region_draw(const bContext *C, ARegion *region)
1098 {
1100  SpaceClip *sc = CTX_wm_space_clip(C);
1101  MovieClip *clip = ED_space_clip_get_clip(sc);
1102  View2D *v2d = &region->v2d;
1103  short cfra_flag = 0;
1104 
1105  if (clip) {
1107  }
1108 
1109  /* clear and setup matrix */
1111 
1112  UI_view2d_view_ortho(v2d);
1113 
1114  /* time grid */
1116 
1117  /* data... */
1118  clip_draw_dopesheet_main(sc, region, scene);
1119 
1120  /* current frame indicator line */
1121  if (sc->flag & SC_SHOW_SECONDS) {
1122  cfra_flag |= DRAWCFRA_UNIT_SECONDS;
1123  }
1124  ANIM_draw_cfra(C, v2d, cfra_flag);
1125 
1126  /* reset view matrix */
1128 
1129  /* time-scrubbing */
1130  ED_time_scrub_draw(region, scene, sc->flag & SC_SHOW_SECONDS, true);
1131 
1132  /* scrollers */
1134 }
1135 
1136 static void clip_preview_region_draw(const bContext *C, ARegion *region)
1137 {
1138  SpaceClip *sc = CTX_wm_space_clip(C);
1139 
1140  if (sc->view == SC_VIEW_GRAPH) {
1141  graph_region_draw(C, region);
1142  }
1143  else if (sc->view == SC_VIEW_DOPESHEET) {
1144  dopesheet_region_draw(C, region);
1145  }
1146 }
1147 
1149 {
1150 }
1151 
1152 /****************** channels region ******************/
1153 
1155 {
1156  wmKeyMap *keymap;
1157 
1158  /* ensure the 2d view sync works - main region has bottom scroller */
1159  region->v2d.scroll = V2D_SCROLL_BOTTOM;
1160 
1161  UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_LIST, region->winx, region->winy);
1162 
1163  keymap = WM_keymap_ensure(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
1165 }
1166 
1167 static void clip_channels_region_draw(const bContext *C, ARegion *region)
1168 {
1169  SpaceClip *sc = CTX_wm_space_clip(C);
1170  MovieClip *clip = ED_space_clip_get_clip(sc);
1171  View2D *v2d = &region->v2d;
1172 
1173  if (clip) {
1175  }
1176 
1177  /* clear and setup matrix */
1179 
1180  UI_view2d_view_ortho(v2d);
1181 
1182  /* data... */
1184 
1185  /* reset view matrix */
1187 }
1188 
1190 {
1191 }
1192 
1193 /****************** header region ******************/
1194 
1195 /* add handlers, stuff you only do once or on area/region changes */
1197 {
1198  ED_region_header_init(region);
1199 }
1200 
1201 static void clip_header_region_draw(const bContext *C, ARegion *region)
1202 {
1203  ED_region_header(C, region);
1204 }
1205 
1207 {
1208  ARegion *region = params->region;
1209  wmNotifier *wmn = params->notifier;
1210 
1211  /* context changes */
1212  switch (wmn->category) {
1213  case NC_SCENE:
1214  switch (wmn->data) {
1215  /* for proportional editmode only */
1216  case ND_TOOLSETTINGS:
1217  /* TODO - should do this when in mask mode only but no data available */
1218  // if (sc->mode == SC_MODE_MASKEDIT)
1219  {
1220  ED_region_tag_redraw(region);
1221  break;
1222  }
1223  }
1224  break;
1225  }
1226 }
1227 
1228 /****************** tools region ******************/
1229 
1230 /* add handlers, stuff you only do once or on area/region changes */
1232 {
1233  wmKeyMap *keymap;
1234 
1235  ED_region_panels_init(wm, region);
1236 
1237  keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
1238  WM_event_add_keymap_handler(&region->handlers, keymap);
1239 }
1240 
1241 static void clip_tools_region_draw(const bContext *C, ARegion *region)
1242 {
1243  ED_region_panels(C, region);
1244 }
1245 
1246 /****************** tool properties region ******************/
1247 
1249 {
1250  ARegion *region = params->region;
1251  wmNotifier *wmn = params->notifier;
1252 
1253  /* context changes */
1254  switch (wmn->category) {
1255  case NC_WM:
1256  if (wmn->data == ND_HISTORY) {
1257  ED_region_tag_redraw(region);
1258  }
1259  break;
1260  case NC_SCENE:
1261  if (wmn->data == ND_MODE) {
1262  ED_region_tag_redraw(region);
1263  }
1264  break;
1265  case NC_SPACE:
1266  if (wmn->data == ND_SPACE_CLIP) {
1267  ED_region_tag_redraw(region);
1268  }
1269  break;
1270  case NC_GPENCIL:
1271  if (wmn->action == NA_EDITED) {
1272  ED_region_tag_redraw(region);
1273  }
1274  break;
1275  }
1276 }
1277 
1278 /****************** properties region ******************/
1279 
1280 /* add handlers, stuff you only do once or on area/region changes */
1282 {
1283  wmKeyMap *keymap;
1284 
1285  ED_region_panels_init(wm, region);
1286 
1287  keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
1288  WM_event_add_keymap_handler(&region->handlers, keymap);
1289 }
1290 
1291 static void clip_properties_region_draw(const bContext *C, ARegion *region)
1292 {
1293  SpaceClip *sc = CTX_wm_space_clip(C);
1294 
1295  BKE_movieclip_update_scopes(sc->clip, &sc->user, &sc->scopes);
1296 
1297  ED_region_panels(C, region);
1298 }
1299 
1301 {
1302  ARegion *region = params->region;
1303  wmNotifier *wmn = params->notifier;
1304 
1305  /* context changes */
1306  switch (wmn->category) {
1307  case NC_GPENCIL:
1308  if (ELEM(wmn->data, ND_DATA, ND_GPENCIL_EDITMODE)) {
1309  ED_region_tag_redraw(region);
1310  }
1311  break;
1312  case NC_BRUSH:
1313  if (wmn->action == NA_EDITED) {
1314  ED_region_tag_redraw(region);
1315  }
1316  break;
1317  }
1318 }
1319 
1320 /********************* registration ********************/
1321 
1322 static void clip_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
1323 {
1324  SpaceClip *sclip = (SpaceClip *)slink;
1325 
1326  if (!ELEM(GS(old_id->name), ID_MC, ID_MSK)) {
1327  return;
1328  }
1329 
1330  if ((ID *)sclip->clip == old_id) {
1331  sclip->clip = (MovieClip *)new_id;
1332  id_us_ensure_real(new_id);
1333  }
1334 
1335  if ((ID *)sclip->mask_info.mask == old_id) {
1336  sclip->mask_info.mask = (Mask *)new_id;
1337  id_us_ensure_real(new_id);
1338  }
1339 }
1340 
1341 /* only called once, from space/spacetypes.c */
1343 {
1344  SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype clip");
1345  ARegionType *art;
1346 
1347  st->spaceid = SPACE_CLIP;
1348  strncpy(st->name, "Clip", BKE_ST_MAXNAME);
1349 
1350  st->create = clip_create;
1351  st->free = clip_free;
1352  st->init = clip_init;
1353  st->duplicate = clip_duplicate;
1355  st->keymap = clip_keymap;
1356  st->listener = clip_listener;
1357  st->context = clip_context;
1358  st->gizmos = clip_gizmos;
1359  st->dropboxes = clip_dropboxes;
1360  st->refresh = clip_refresh;
1361  st->id_remap = clip_id_remap;
1362 
1363  /* regions: main window */
1364  art = MEM_callocN(sizeof(ARegionType), "spacetype clip region");
1365  art->regionid = RGN_TYPE_WINDOW;
1366  art->init = clip_main_region_init;
1367  art->draw = clip_main_region_draw;
1370 
1371  BLI_addhead(&st->regiontypes, art);
1372 
1373  /* preview */
1374  art = MEM_callocN(sizeof(ARegionType), "spacetype clip region preview");
1375  art->regionid = RGN_TYPE_PREVIEW;
1376  art->prefsizey = 240;
1381 
1382  BLI_addhead(&st->regiontypes, art);
1383 
1384  /* regions: properties */
1385  art = MEM_callocN(sizeof(ARegionType), "spacetype clip region properties");
1386  art->regionid = RGN_TYPE_UI;
1392  BLI_addhead(&st->regiontypes, art);
1394 
1395  /* regions: tools */
1396  art = MEM_callocN(sizeof(ARegionType), "spacetype clip region tools");
1397  art->regionid = RGN_TYPE_TOOLS;
1403 
1404  BLI_addhead(&st->regiontypes, art);
1405 
1406  /* regions: header */
1407  art = MEM_callocN(sizeof(ARegionType), "spacetype clip region");
1408  art->regionid = RGN_TYPE_HEADER;
1409  art->prefsizey = HEADERY;
1411 
1415 
1416  BLI_addhead(&st->regiontypes, art);
1417 
1419 
1420  /* channels */
1421  art = MEM_callocN(sizeof(ARegionType), "spacetype clip channels region");
1422  art->regionid = RGN_TYPE_CHANNELS;
1428 
1429  BLI_addhead(&st->regiontypes, art);
1430 
1431  /* regions: hud */
1432  art = ED_area_type_hud(st->spaceid);
1433  BLI_addhead(&st->regiontypes, art);
1434 }
typedef float(TangentPoint)[2]
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:714
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1034
struct SpaceClip * CTX_wm_space_clip(const bContext *C)
Definition: context.c:899
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
Definition: context.c:672
bool CTX_data_equals(const char *member, const char *str)
Definition: context.c:623
void CTX_data_id_pointer_set(bContextDataResult *result, struct ID *id)
Definition: context.c:633
bool CTX_data_dir(const char *member)
Definition: context.c:628
struct wmWindowManager * CTX_wm_manager(const bContext *C)
Definition: context.c:689
struct Mask * CTX_data_edit_mask(const bContext *C)
Definition: context.c:1316
struct Depsgraph * CTX_data_expect_evaluated_depsgraph(const bContext *C)
Definition: context.c:1415
@ CTX_RESULT_MEMBER_NOT_FOUND
Definition: BKE_context.h:86
@ CTX_RESULT_OK
Definition: BKE_context.h:83
struct wmWindow * CTX_wm_window(const bContext *C)
Definition: context.c:699
void id_us_ensure_real(struct ID *id)
Definition: lib_id.c:238
void BKE_movieclip_user_set_frame(struct MovieClipUser *user, int framenr)
Definition: movieclip.c:1633
void BKE_movieclip_update_scopes(struct MovieClip *clip, struct MovieClipUser *user, struct MovieClipScopes *scopes)
Definition: movieclip.c:1712
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
#define BKE_ST_MAXNAME
Definition: BKE_screen.h:68
void BKE_spacetype_register(struct SpaceType *st)
Definition: screen.c:420
void BKE_tracking_dopesheet_update(struct MovieTracking *tracking)
Definition: tracking.c:3329
void BKE_autotrack_context_sync_user(struct AutoTrackContext *context, struct MovieClipUser *user)
#define ATTR_FALLTHROUGH
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:87
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
Definition: listbase.c:395
#define FILE_MAX
void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t dirlen, const size_t filelen)
Definition: path_util.c:1654
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
Definition: BLI_rect.h:157
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
Definition: rct.c:446
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
Definition: BLI_rect.h:153
#define UNUSED(x)
#define ELEM(...)
@ ID_MC
Definition: DNA_ID_enums.h:85
@ ID_MSK
Definition: DNA_ID_enums.h:86
#define MAXFRAMEF
#define HEADERY
@ RGN_ALIGN_BOTTOM
@ RGN_ALIGN_LEFT
@ RGN_ALIGN_TOP
@ RGN_ALIGN_RIGHT
@ RGN_ALIGN_NONE
@ RGN_FLAG_HIDDEN
@ RGN_TYPE_CHANNELS
@ RGN_TYPE_UI
@ RGN_TYPE_WINDOW
@ RGN_TYPE_PREVIEW
@ RGN_TYPE_HEADER
@ RGN_TYPE_TOOLS
@ SPACE_CLIP
@ SC_VIEW_GRAPH
@ SC_VIEW_CLIP
@ SC_VIEW_DOPESHEET
@ SC_MODE_TRACKING
@ SC_MODE_MASKEDIT
@ SC_SHOW_SECONDS
@ SC_SHOW_GRAPH_FRAMES
@ SC_LOCK_SELECTION
@ SC_SHOW_ANNOTATION
@ SC_SHOW_GRAPH_TRACKS_MOTION
@ SC_LOCK_TIMECURSOR
@ SC_SHOW_MARKER_PATTERN
@ SC_SHOW_TRACK_PATH
@ SC_GPENCIL_SRC_TRACK
@ TRACKING_2D_STABILIZATION
@ USER_HEADER_BOTTOM
@ V2D_IS_INIT
@ V2D_VIEWSYNC_AREA_VERTICAL
@ V2D_SCROLL_VERTICAL_HANDLES
@ V2D_SCROLL_RIGHT
@ V2D_SCROLL_BOTTOM
@ V2D_SCROLL_HORIZONTAL_HANDLES
@ V2D_ALIGN_NO_POS_Y
@ V2D_LOCKZOOM_Y
@ V2D_KEEPOFS_Y
@ V3D_AROUND_CURSOR
@ V3D_AROUND_CENTER_MEDIAN
@ DRAWCFRA_UNIT_SECONDS
Definition: ED_anim_api.h:658
bool ED_clip_view_selection(const struct bContext *C, struct ARegion *region, bool fit)
void ED_space_clip_get_aspect(struct SpaceClip *sc, float *aspx, float *aspy)
Definition: clip_editor.c:171
void ED_space_clip_get_zoom(struct SpaceClip *sc, struct ARegion *region, float *zoomx, float *zoomy)
Definition: clip_editor.c:159
void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height)
Definition: clip_editor.c:141
struct ImBuf * ED_space_clip_get_stable_buffer(struct SpaceClip *sc, float loc[2], float *scale, float *angle)
Definition: clip_editor.c:254
struct MovieClip * ED_space_clip_get_clip(struct SpaceClip *sc)
Definition: clip_editor.c:572
void ED_mask_draw_region(struct Depsgraph *depsgraph, struct Mask *mask, struct ARegion *region, const char draw_flag, const char draw_type, const eMaskOverlayMode overlay_mode, const int width_i, const int height_i, const float aspx, const float aspy, const bool do_scale_applied, const bool do_draw_cb, float stabmat[4][4], const struct bContext *C)
void ED_mask_get_size(struct ScrArea *area, int *width, int *height)
Definition: mask_query.c:691
void ED_area_tag_redraw(ScrArea *area)
Definition: area.c:745
void ED_region_header(const struct bContext *C, struct ARegion *region)
void ED_region_panels(const struct bContext *C, struct ARegion *region)
struct ARegionType * ED_area_type_hud(int space_type)
void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *region)
Definition: area.c:3090
void ED_region_tag_redraw(struct ARegion *region)
Definition: area.c:667
void ED_region_header_init(struct ARegion *region)
Definition: area.c:3358
void ED_area_init(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *area)
Definition: area.c:1906
@ ED_KEYMAP_UI
Definition: ED_screen.h:440
@ ED_KEYMAP_HEADER
Definition: ED_screen.h:446
@ ED_KEYMAP_GPENCIL
Definition: ED_screen.h:448
@ ED_KEYMAP_GIZMO
Definition: ED_screen.h:441
@ ED_KEYMAP_VIEW2D
Definition: ED_screen.h:443
@ ED_KEYMAP_FRAMES
Definition: ED_screen.h:445
#define REGION_DRAW_POST_VIEW
Definition: ED_space_api.h:66
void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int)
#define REGION_DRAW_PRE_VIEW
Definition: ED_space_api.h:68
void ED_image_draw_cursor(struct ARegion *region, const float cursor[2])
Definition: uvedit_draw.c:41
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
void GPU_matrix_pop(void)
Definition: gpu_matrix.cc:142
void GPU_matrix_scale_2f(float x, float y)
Definition: gpu_matrix.cc:232
#define GPU_matrix_mul(x)
Definition: GPU_matrix.h:223
void GPU_matrix_push(void)
Definition: gpu_matrix.cc:135
void GPU_matrix_translate_2f(float x, float y)
Definition: gpu_matrix.cc:190
void IMB_freeImBuf(struct ImBuf *ibuf)
Definition: allocimbuf.c:211
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
#define C
Definition: RandGen.cpp:39
#define UI_SIDEBAR_PANEL_WIDTH
Definition: UI_interface.h:245
#define UI_DPI_FAC
Definition: UI_interface.h:309
#define UI_COMPACT_PANEL_WIDTH
Definition: UI_interface.h:244
@ TH_BACK
Definition: UI_resources.h:55
@ TH_TEXT
Definition: UI_resources.h:58
void UI_ThemeClearColor(int colorid)
Definition: resources.c:1478
void VIEW2D_GGT_navigate_impl(struct wmGizmoGroupType *gzgt, const char *idname)
void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy)
Definition: view2d.c:240
void UI_view2d_view_to_region_fl(const struct View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
void UI_view2d_view_restore(const struct bContext *C)
#define UI_TIME_SCRUB_MARGIN_Y
Definition: UI_view2d.h:283
void UI_view2d_view_ortho(const struct View2D *v2d)
void UI_view2d_scrollers_draw(struct View2D *v2d, const struct rcti *mask_custom)
@ V2D_COMMONVIEW_LIST
Definition: UI_view2d.h:53
@ V2D_COMMONVIEW_CUSTOM
Definition: UI_view2d.h:49
void UI_view2d_draw_scale_y__values(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, int colorid)
void UI_view2d_draw_lines_x__discrete_frames_or_seconds(const struct View2D *v2d, const struct Scene *scene, bool display_seconds)
@ WM_GIZMOMAP_DRAWSTEP_2D
#define ND_FILEREAD
Definition: WM_types.h:311
#define NC_GEOM
Definition: WM_types.h:294
#define ND_DRAW
Definition: WM_types.h:362
#define NC_BRUSH
Definition: WM_types.h:286
#define NC_WM
Definition: WM_types.h:276
#define ND_DATA
Definition: WM_types.h:408
#define WM_DRAG_PATH
Definition: WM_types.h:876
#define ND_GPENCIL_EDITMODE
Definition: WM_types.h:403
#define NA_EVALUATED
Definition: WM_types.h:463
#define ND_DISPLAY
Definition: WM_types.h:391
#define NC_SCREEN
Definition: WM_types.h:278
#define NC_MOVIECLIP
Definition: WM_types.h:298
#define ND_MODE
Definition: WM_types.h:345
#define ND_ANIMPLAY
Definition: WM_types.h:323
#define NC_SCENE
Definition: WM_types.h:279
#define ND_TOOLSETTINGS
Definition: WM_types.h:349
#define NA_EDITED
Definition: WM_types.h:462
#define ND_FRAME_RANGE
Definition: WM_types.h:351
#define ND_SPACE_CLIP
Definition: WM_types.h:433
#define ND_UNDO
Definition: WM_types.h:316
#define ND_FRAME
Definition: WM_types.h:334
#define NA_REMOVED
Definition: WM_types.h:465
#define ND_SELECT
Definition: WM_types.h:407
#define NC_GPENCIL
Definition: WM_types.h:300
#define NC_MASK
Definition: WM_types.h:299
#define ND_HISTORY
Definition: WM_types.h:314
#define ND_LAYOUTSET
Definition: WM_types.h:326
#define NC_SPACE
Definition: WM_types.h:293
#define NA_SELECTED
Definition: WM_types.h:467
void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag)
Definition: anim_draw.c:66
unsigned int U
Definition: btGjkEpa3.h:78
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
void ED_clip_buttons_register(ARegionType *art)
Definition: clip_buttons.c:86
void clip_draw_dopesheet_channels(const bContext *C, ARegion *region)
void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene)
void CLIP_OT_dopesheet_view_all(wmOperatorType *ot)
void CLIP_OT_dopesheet_select_channel(wmOperatorType *ot)
void clip_draw_cache_and_notes(const bContext *C, SpaceClip *sc, ARegion *region)
Definition: clip_draw.c:1974
void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *region)
Definition: clip_draw.c:1904
void clip_draw_grease_pencil(bContext *C, int onlyv2d)
Definition: clip_draw.c:1985
void clip_draw_graph(SpaceClip *sc, ARegion *region, Scene *scene)
void CLIP_OT_graph_delete_knot(wmOperatorType *ot)
void CLIP_OT_graph_center_current_frame(wmOperatorType *ot)
void CLIP_OT_graph_delete_curve(wmOperatorType *ot)
void CLIP_OT_graph_select_all_markers(wmOperatorType *ot)
void ED_clip_graph_center_current_frame(Scene *scene, ARegion *region)
void CLIP_OT_graph_select(wmOperatorType *ot)
void CLIP_OT_graph_select_box(wmOperatorType *ot)
void CLIP_OT_graph_view_all(wmOperatorType *ot)
void CLIP_OT_graph_disable_markers(wmOperatorType *ot)
void CLIP_OT_tracking_object_remove(struct wmOperatorType *ot)
void CLIP_OT_frame_jump(struct wmOperatorType *ot)
void CLIP_OT_hide_tracks(struct wmOperatorType *ot)
void CLIP_OT_select_circle(struct wmOperatorType *ot)
void CLIP_OT_set_axis(struct wmOperatorType *ot)
void CLIP_OT_view_zoom_out(struct wmOperatorType *ot)
Definition: clip_ops.c:837
void CLIP_OT_view_center_cursor(struct wmOperatorType *ot)
Definition: clip_ops.c:1009
void CLIP_OT_stabilize_2d_add(struct wmOperatorType *ot)
void CLIP_OT_track_copy_color(struct wmOperatorType *ot)
void CLIP_OT_set_scale(struct wmOperatorType *ot)
void CLIP_OT_set_solution_scale(struct wmOperatorType *ot)
void CLIP_OT_view_all(struct wmOperatorType *ot)
Definition: clip_ops.c:971
void CLIP_OT_view_zoom_in(struct wmOperatorType *ot)
Definition: clip_ops.c:780
void CLIP_OT_clean_tracks(struct wmOperatorType *ot)
void CLIP_OT_view_zoom(wmOperatorType *ot)
Definition: clip_ops.c:714
void CLIP_OT_clear_solution(struct wmOperatorType *ot)
void CLIP_OT_reload(struct wmOperatorType *ot)
Definition: clip_ops.c:357
void CLIP_OT_solve_camera(struct wmOperatorType *ot)
void CLIP_OT_lock_selection_toggle(struct wmOperatorType *ot)
Definition: clip_ops.c:1856
void CLIP_OT_add_marker_at_click(struct wmOperatorType *ot)
Definition: tracking_ops.c:199
void CLIP_OT_delete_track(struct wmOperatorType *ot)
Definition: tracking_ops.c:252
void CLIP_OT_select_lasso(struct wmOperatorType *ot)
void CLIP_OT_view_zoom_ratio(struct wmOperatorType *ot)
Definition: clip_ops.c:889
void CLIP_OT_set_scene_frames(wmOperatorType *ot)
Definition: clip_ops.c:1758
void CLIP_OT_change_frame(wmOperatorType *ot)
Definition: clip_ops.c:1156
void CLIP_OT_select_grouped(struct wmOperatorType *ot)
void CLIP_OT_average_tracks(struct wmOperatorType *ot)
void CLIP_OT_mode_set(struct wmOperatorType *ot)
Definition: clip_ops.c:1612
void CLIP_OT_select(struct wmOperatorType *ot)
struct ARegion * ED_clip_has_properties_region(struct ScrArea *area)
Definition: clip_toolbar.c:44
void CLIP_OT_stabilize_2d_rotation_select(struct wmOperatorType *ot)
void CLIP_OT_open(struct wmOperatorType *ot)
Definition: clip_ops.c:310
void CLIP_OT_refine_markers(struct wmOperatorType *ot)
void CLIP_OT_set_solver_keyframe(struct wmOperatorType *ot)
void CLIP_OT_tracking_object_new(struct wmOperatorType *ot)
void CLIP_OT_disable_markers(struct wmOperatorType *ot)
void CLIP_OT_clear_track_path(struct wmOperatorType *ot)
void CLIP_OT_track_markers(struct wmOperatorType *ot)
void CLIP_OT_delete_marker(struct wmOperatorType *ot)
Definition: tracking_ops.c:321
void CLIP_OT_detect_features(struct wmOperatorType *ot)
void CLIP_OT_cursor_set(struct wmOperatorType *ot)
Definition: clip_ops.c:1806
void CLIP_OT_apply_solution_scale(struct wmOperatorType *ot)
void CLIP_OT_rebuild_proxy(struct wmOperatorType *ot)
Definition: clip_ops.c:1575
void CLIP_OT_set_origin(struct wmOperatorType *ot)
void CLIP_OT_slide_marker(struct wmOperatorType *ot)
Definition: tracking_ops.c:975
void CLIP_OT_select_box(struct wmOperatorType *ot)
void CLIP_OT_view_selected(struct wmOperatorType *ot)
Definition: clip_ops.c:1041
void CLIP_OT_stabilize_2d_rotation_remove(struct wmOperatorType *ot)
void CLIP_OT_create_plane_track(struct wmOperatorType *ot)
void CLIP_OT_slide_plane_marker(struct wmOperatorType *ot)
void CLIP_OT_stabilize_2d_select(struct wmOperatorType *ot)
void CLIP_OT_add_marker(struct wmOperatorType *ot)
Definition: tracking_ops.c:122
void CLIP_OT_hide_tracks_clear(struct wmOperatorType *ot)
void CLIP_OT_prefetch(struct wmOperatorType *ot)
Definition: clip_ops.c:1718
void CLIP_OT_paste_tracks(struct wmOperatorType *ot)
void CLIP_OT_stabilize_2d_rotation_add(struct wmOperatorType *ot)
void CLIP_OT_lock_tracks(struct wmOperatorType *ot)
void CLIP_OT_select_all(struct wmOperatorType *ot)
void CLIP_OT_copy_tracks(struct wmOperatorType *ot)
void CLIP_OT_set_plane(struct wmOperatorType *ot)
void CLIP_OT_view_pan(struct wmOperatorType *ot)
Definition: clip_ops.c:511
void CLIP_OT_set_center_principal(struct wmOperatorType *ot)
void CLIP_OT_stabilize_2d_remove(struct wmOperatorType *ot)
void CLIP_OT_keyframe_delete(struct wmOperatorType *ot)
void CLIP_OT_join_tracks(struct wmOperatorType *ot)
void CLIP_OT_keyframe_insert(struct wmOperatorType *ot)
FILE * file
Scene scene
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
#define GS(x)
Definition: iris.c:241
void *(* MEM_dupallocN)(const void *vmemh)
Definition: mallocn.c:42
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
Definition: rna_access.c:6550
void RNA_collection_clear(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6622
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
Definition: rna_access.c:6610
static ARegion * ED_clip_has_preview_region(const bContext *C, ScrArea *area)
Definition: space_clip.c:147
static void clip_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
Definition: space_clip.c:1196
static void clip_scopes_tag_refresh(ScrArea *area)
Definition: space_clip.c:201
static void clip_refresh(const bContext *C, ScrArea *area)
Definition: space_clip.c:645
static SpaceLink * clip_create(const ScrArea *area, const Scene *scene)
Definition: space_clip.c:237
static void clip_listener(const wmSpaceTypeListenerParams *params)
Definition: space_clip.c:334
static void clip_channels_region_listener(const wmRegionListenerParams *UNUSED(params))
Definition: space_clip.c:1189
static void clip_header_region_listener(const wmRegionListenerParams *params)
Definition: space_clip.c:1206
static void clip_header_region_draw(const bContext *C, ARegion *region)
Definition: space_clip.c:1201
static bool clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(r_tooltip))
Definition: space_clip.c:608
static void movieclip_main_area_set_view2d(const bContext *C, ARegion *region)
Definition: space_clip.c:834
static void clip_free(SpaceLink *sl)
Definition: space_clip.c:298
static void clip_area_sync_frame_from_scene(ScrArea *area, const Scene *scene)
Definition: space_clip.c:229
static void clip_properties_region_draw(const bContext *C, ARegion *region)
Definition: space_clip.c:1291
void ED_spacetype_clip(void)
Definition: space_clip.c:1342
static void clip_preview_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_clip.c:1033
static SpaceLink * clip_duplicate(SpaceLink *sl)
Definition: space_clip.c:322
static void dopesheet_region_draw(const bContext *C, ARegion *region)
Definition: space_clip.c:1097
static void graph_region_draw(const bContext *C, ARegion *region)
Definition: space_clip.c:1054
static void reinit_preview_region(const bContext *C, ARegion *region)
Definition: space_clip.c:129
static ARegion * ED_clip_has_channels_region(ScrArea *area)
Definition: space_clip.c:172
static void clip_properties_region_listener(const wmRegionListenerParams *params)
Definition: space_clip.c:1300
static void init_preview_region(const Scene *scene, const ScrArea *area, const SpaceClip *sc, ARegion *region)
Definition: space_clip.c:69
static void clip_operatortypes(void)
Definition: space_clip.c:434
static void clip_tools_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_clip.c:1231
static void clip_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
Definition: space_clip.c:1322
static void clip_main_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_clip.c:881
static void clip_main_region_draw(const bContext *C, ARegion *region)
Definition: space_clip.c:900
static void clip_tools_region_draw(const bContext *C, ARegion *region)
Definition: space_clip.c:1241
static void clip_init(struct wmWindowManager *UNUSED(wm), ScrArea *area)
Definition: space_clip.c:314
static void clip_channels_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_clip.c:1154
static void clip_channels_region_draw(const bContext *C, ARegion *region)
Definition: space_clip.c:1167
static void clip_dropboxes(void)
Definition: space_clip.c:638
static void clip_preview_region_listener(const wmRegionListenerParams *UNUSED(params))
Definition: space_clip.c:1148
static int clip_context(const bContext *C, const char *member, bContextDataResult *result)
Definition: space_clip.c:580
static void CLIP_GGT_navigate(wmGizmoGroupType *gzgt)
Definition: space_clip.c:818
static void clip_main_region_listener(const wmRegionListenerParams *params)
Definition: space_clip.c:1013
static void clip_props_region_listener(const wmRegionListenerParams *params)
Definition: space_clip.c:1248
static void clip_properties_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_clip.c:1281
static void clip_drop_copy(wmDrag *drag, wmDropBox *drop)
Definition: space_clip.c:623
const char * clip_context_dir[]
Definition: space_clip.c:578
static void clip_keymap(struct wmKeyConfig *keyconf)
Definition: space_clip.c:560
static void clip_scopes_check_gpencil_change(ScrArea *area)
Definition: space_clip.c:220
static void clip_preview_region_draw(const bContext *C, ARegion *region)
Definition: space_clip.c:1136
static void clip_gizmos(void)
Definition: space_clip.c:823
void(* draw)(const struct bContext *C, struct ARegion *region)
Definition: BKE_screen.h:169
void(* listener)(const wmRegionListenerParams *params)
Definition: BKE_screen.h:183
int keymapflag
Definition: BKE_screen.h:226
void(* init)(struct wmWindowManager *wm, struct ARegion *region)
Definition: BKE_screen.h:165
ListBase handlers
short alignment
short regiontype
struct wmGizmoMap * gizmo_map
Definition: DNA_ID.h:273
char name[66]
Definition: DNA_ID.h:283
struct Mask * mask
struct ImBuf * track_preview
struct ImBuf * track_search
void * tracking_context
struct MovieTracking tracking
MovieTrackingStabilization stabilization
struct RenderData r
ListBase regionbase
struct MovieClipUser user
float cursor[2]
float stabmat[4][4]
struct MovieClipScopes scopes
struct MovieClip * clip
MaskSpaceInfo mask_info
struct SpaceLink *(* duplicate)(struct SpaceLink *sl)
Definition: BKE_screen.h:104
ListBase regiontypes
Definition: BKE_screen.h:130
void(* keymap)(struct wmKeyConfig *keyconf)
Definition: BKE_screen.h:109
void(* operatortypes)(void)
Definition: BKE_screen.h:107
void(* gizmos)(void)
Definition: BKE_screen.h:114
void(* free)(struct SpaceLink *sl)
Definition: BKE_screen.h:88
struct SpaceLink *(* create)(const struct ScrArea *area, const struct Scene *scene)
Definition: BKE_screen.h:86
void(* refresh)(const struct bContext *C, struct ScrArea *area)
Definition: BKE_screen.h:101
void(* listener)(const wmSpaceTypeListenerParams *params)
Definition: BKE_screen.h:95
void(* init)(struct wmWindowManager *wm, struct ScrArea *area)
Definition: BKE_screen.h:91
int spaceid
Definition: BKE_screen.h:81
bContextDataCallback context
Definition: BKE_screen.h:117
void(* id_remap)(struct ScrArea *area, struct SpaceLink *sl, struct ID *old_id, struct ID *new_id)
Definition: BKE_screen.h:120
char name[BKE_ST_MAXNAME]
Definition: BKE_screen.h:80
void(* dropboxes)(void)
Definition: BKE_screen.h:111
short flag
float minzoom
short align
short keeptot
float max[2]
short keepzoom
short keepofs
float min[2]
short scroll
float maxzoom
float xmax
Definition: DNA_vec_types.h:85
float xmin
Definition: DNA_vec_types.h:85
float ymax
Definition: DNA_vec_types.h:86
float ymin
Definition: DNA_vec_types.h:86
int ymin
Definition: DNA_vec_types.h:80
int ymax
Definition: DNA_vec_types.h:80
int xmin
Definition: DNA_vec_types.h:79
int xmax
Definition: DNA_vec_types.h:79
char path[1024]
Definition: WM_types.h:909
int icon
Definition: WM_types.h:905
int type
Definition: WM_types.h:907
struct PointerRNA * ptr
Definition: WM_types.h:953
unsigned int data
Definition: WM_types.h:260
unsigned int action
Definition: WM_types.h:260
unsigned int category
Definition: WM_types.h:260
struct wmKeyConfig * defaultconf
void ED_time_scrub_draw(const ARegion *region, const Scene *scene, bool display_seconds, bool discrete_frames)
bool ED_time_scrub_event_in_region(const ARegion *region, const wmEvent *event)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(bContext *, wmDrag *, const wmEvent *, const char **), void(*copy)(wmDrag *, wmDropBox *), void(*cancel)(struct Main *, wmDrag *, wmDropBox *))
Definition: wm_dragdrop.c:96
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
Definition: wm_dragdrop.c:77
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
wmEventHandler_Keymap * WM_event_add_keymap_handler_poll(ListBase *handlers, wmKeyMap *keymap, EventHandlerPoll poll)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
void WM_event_remove_handlers(bContext *C, ListBase *handlers)
wmGizmoGroupTypeRef * WM_gizmogrouptype_append_and_link(wmGizmoMapType *gzmap_type, void(*wtfunc)(struct wmGizmoGroupType *))
wmGizmoMapType * WM_gizmomaptype_ensure(const struct wmGizmoMapType_Params *gzmap_params)
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
Definition: wm_gizmo_map.c:498
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition: wm_keymap.c:852
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))