2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
27 /** \file DNA_space_types.h
33 #ifndef __DNA_SPACE_TYPES_H__
34 #define __DNA_SPACE_TYPES_H__
37 #include "DNA_listBase.h"
38 #include "DNA_color_types.h" /* for Histogram */
39 #include "DNA_vec_types.h"
40 #include "DNA_outliner_types.h" /* for TreeStoreElem */
41 #include "DNA_image_types.h" /* ImageUser */
42 #include "DNA_movieclip_types.h" /* MovieClipUser */
43 #include "DNA_sequence_types.h" /* SequencerScopes */
44 /* Hum ... Not really nice... but needed for spacebuts. */
45 #include "DNA_view2d_types.h"
63 struct FileSelectParams;
70 struct MovieClipScopes;
74 /* SpaceLink (Base) ==================================== */
77 * The base structure all the other spaces
78 * are derived (implicitly) from. Would be
79 * good to make this explicit.
81 typedef struct SpaceLink {
82 struct SpaceLink *next, *prev;
83 ListBase regionbase; /* storage of regions for inactive spaces */
85 float blockscale DNA_DEPRECATED; /* XXX make deprecated */
86 short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
90 /* Space Info ========================================== */
93 typedef struct SpaceInfo {
94 SpaceLink *next, *prev;
95 ListBase regionbase; /* storage of regions for inactive spaces */
97 float blockscale DNA_DEPRECATED;
98 short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
104 /* SpaceInfo.rpt_mask */
105 typedef enum eSpaceInfo_RptMask {
106 INFO_RPT_DEBUG = (1 << 0),
107 INFO_RPT_INFO = (1 << 1),
108 INFO_RPT_OP = (1 << 2),
109 INFO_RPT_WARN = (1 << 3),
110 INFO_RPT_ERR = (1 << 4),
111 } eSpaceInfo_RptMask;
114 /* Properties Editor ==================================== */
116 /* Properties Editor */
117 typedef struct SpaceButs {
118 SpaceLink *next, *prev;
119 ListBase regionbase; /* storage of regions for inactive spaces */
121 float blockscale DNA_DEPRECATED;
123 short blockhandler[8] DNA_DEPRECATED;
125 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
127 short mainb, mainbo, mainbuser; /* context tabs */
128 short re_align, align; /* align for panels */
129 short preview; /* preview is signal to refresh */
130 short texture_context; /* texture context selector (material, world, brush)*/
133 void *path; /* runtime */
134 int pathflag, dataicon; /* runtime */
140 /* button defines (deprecated) */
141 /* warning: the values of these defines are used in sbuts->tabs[8] */
142 /* sbuts->mainb new */
143 #define CONTEXT_SCENE 0
144 #define CONTEXT_OBJECT 1
145 #define CONTEXT_TYPES 2
146 #define CONTEXT_SHADING 3
147 #define CONTEXT_EDITING 4
148 #define CONTEXT_SCRIPT 5
149 #define CONTEXT_LOGIC 6
151 /* sbuts->mainb old (deprecated) */
158 #define BUTS_RENDER 6
161 #define BUTS_FPAINT 9
162 #define BUTS_RADIO 10
163 #define BUTS_SCRIPT 11
164 #define BUTS_SOUND 12
165 #define BUTS_CONSTRAINT 13
166 #define BUTS_EFFECTS 14
168 /* buts->mainb new */
169 typedef enum eSpaceButtons_Context {
175 BCONTEXT_MATERIAL = 5,
176 BCONTEXT_TEXTURE = 6,
177 BCONTEXT_PARTICLE = 7,
178 BCONTEXT_PHYSICS = 8,
180 BCONTEXT_MODIFIER = 10,
181 BCONTEXT_CONSTRAINT = 11,
182 BCONTEXT_BONE_CONSTRAINT = 12,
184 /* always as last... */
186 } eSpaceButtons_Context;
190 #define SB_PIN_CONTEXT 2
191 //#define SB_WORLD_TEX 4 //not used anymore
192 //#define SB_BRUSH_TEX 8 //not used anymore
193 #define SB_SHADING_CONTEXT 16
195 /* sbuts->texture_context */
196 typedef enum eSpaceButtons_Texture_Context {
197 SB_TEXC_MAT_OR_LAMP = 0,
200 SB_TEXC_PARTICLES = 3,
201 } eSpaceButtons_Texture_Context;
204 typedef enum eSpaceButtons_Align {
209 } eSpaceButtons_Align;
212 #define BUTS_SENS_SEL 1
213 #define BUTS_SENS_ACT 2
214 #define BUTS_SENS_LINK 4
215 #define BUTS_CONT_SEL 8
216 #define BUTS_CONT_ACT 16
217 #define BUTS_CONT_LINK 32
218 #define BUTS_ACT_SEL 64
219 #define BUTS_ACT_ACT 128
220 #define BUTS_ACT_LINK 256
221 #define BUTS_SENS_STATE 512
222 #define BUTS_ACT_STATE 1024
223 #define BUTS_CONT_INIT_STATE 2048
226 /* Outliner =============================================== */
229 typedef struct SpaceOops {
230 SpaceLink *next, *prev;
231 ListBase regionbase; /* storage of regions for inactive spaces */
233 float blockscale DNA_DEPRECATED;
234 short blockhandler[8] DNA_DEPRECATED;
236 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
239 struct TreeStore *treestore;
242 char search_string[32];
243 struct TreeStoreElem search_tse;
245 short flag, outlinevis, storeflag, search_flags;
249 /* SpaceOops->flag */
250 typedef enum eSpaceOutliner_Flag {
251 SO_TESTBLOCKS = (1 << 0),
252 SO_NEWSELECTED = (1 << 1),
253 SO_HIDE_RESTRICTCOLS = (1 << 2),
254 SO_HIDE_KEYINGSETINFO = (1 << 3),
255 } eSpaceOutliner_Flag;
257 /* SpaceOops->outlinevis */
258 typedef enum eSpaceOutliner_Mode {
267 /* SO_VERSE_SESSION = 8, */ /* deprecated! */
268 /* SO_VERSE_MS = 9, */ /* deprecated!*/
273 } eSpaceOutliner_Mode;
275 /* SpaceOops->storeflag */
276 typedef enum eSpaceOutliner_StoreFlag {
278 SO_TREESTORE_CLEANUP = (1 << 0),
279 /* if set, it allows redraws. gets set for some allqueue events */
280 SO_TREESTORE_REDRAW = (1 << 1),
281 } eSpaceOutliner_StoreFlag;
283 /* outliner search flags (SpaceOops->search_flags) */
284 typedef enum eSpaceOutliner_Search_Flags {
285 SO_FIND_CASE_SENSITIVE = (1 << 0),
286 SO_FIND_COMPLETE = (1 << 1),
287 SO_SEARCH_RECURSIVE = (1 << 2),
288 } eSpaceOutliner_Search_Flags;
291 /* Graph Editor ========================================= */
293 /* 'Graph' Editor (formerly known as the IPO Editor) */
294 typedef struct SpaceIpo {
295 SpaceLink *next, *prev;
296 ListBase regionbase; /* storage of regions for inactive spaces */
298 float blockscale DNA_DEPRECATED;
299 short blockhandler[8] DNA_DEPRECATED;
301 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
303 struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
305 ListBase ghostCurves; /* sampled snapshots of F-Curves used as in-session guides */
307 short mode; /* mode for the Graph editor (eGraphEdit_Mode) */
308 short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */
309 int flag; /* settings for Graph editor (eGraphEdit_Flag) */
311 float cursorVal; /* cursor value (y-value, x-value is current frame) */
312 int around; /* pivot point for transforms */
316 /* SpaceIpo->flag (Graph Editor Settings) */
317 typedef enum eGraphEdit_Flag {
318 /* OLD DEPRECEATED SETTING */
319 /* SIPO_LOCK_VIEW = (1 << 0), */
321 /* don't merge keyframes on the same frame after a transform */
322 SIPO_NOTRANSKEYCULL = (1 << 1),
323 /* don't show any keyframe handles at all */
324 SIPO_NOHANDLES = (1 << 2),
325 /* don't show current frame number beside indicator line */
326 SIPO_NODRAWCFRANUM = (1 << 3),
327 /* show timing in seconds instead of frames */
328 SIPO_DRAWTIME = (1 << 4),
329 /* only show keyframes for selected F-Curves */
330 SIPO_SELCUVERTSONLY = (1 << 5),
331 /* draw names of F-Curves beside the respective curves */
332 /* NOTE: currently not used */
333 SIPO_DRAWNAMES = (1 << 6),
334 /* show sliders in channels list */
335 SIPO_SLIDERS = (1 << 7),
336 /* don't show the horizontal component of the cursor */
337 SIPO_NODRAWCURSOR = (1 << 8),
338 /* only show handles of selected keyframes */
339 SIPO_SELVHANDLESONLY = (1 << 9),
340 /* temporary flag to force channel selections to be synced with main */
341 SIPO_TEMP_NEEDCHANSYNC = (1 << 10),
342 /* don't perform realtime updates */
343 SIPO_NOREALTIMEUPDATES = (1 << 11),
344 /* don't draw curves with AA ("beauty-draw") for performance */
345 SIPO_BEAUTYDRAW_OFF = (1 << 12),
346 /* draw grouped channels with colors set in group */
347 SIPO_NODRAWGCOLORS = (1 << 13),
350 /* SpaceIpo->mode (Graph Editor Mode) */
351 typedef enum eGraphEdit_Mode {
352 /* all animation curves (from all over Blender) */
353 SIPO_MODE_ANIMATION = 0,
355 SIPO_MODE_DRIVERS = 1,
359 /* NLA Editor ============================================= */
362 typedef struct SpaceNla {
363 struct SpaceLink *next, *prev;
364 ListBase regionbase; /* storage of regions for inactive spaces */
366 float blockscale DNA_DEPRECATED;
367 short blockhandler[8] DNA_DEPRECATED;
369 short autosnap; /* this uses the same settings as autosnap for Action Editor */
373 struct bDopeSheet *ads;
374 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
378 typedef enum eSpaceNla_Flag {
379 /* flags (1<<0), (1<<1), and (1<<3) are deprecated flags from old verisons */
381 /* draw timing in seconds instead of frames */
382 SNLA_DRAWTIME = (1 << 2),
383 /* don't draw frame number beside frame indicator */
384 SNLA_NODRAWCFRANUM = (1 << 4),
385 /* don't draw influence curves on strips */
386 SNLA_NOSTRIPCURVES = (1 << 5),
387 /* don't perform realtime updates */
388 SNLA_NOREALTIMEUPDATES = (1 << 6),
392 /* Timeline =============================================== */
394 /* Pointcache drawing data */
395 # /* Only store the data array in the cache to avoid constant reallocation. */
396 # /* No need to store when saved. */
397 typedef struct SpaceTimeCache {
398 struct SpaceTimeCache *next, *prev;
403 typedef struct SpaceTime {
404 SpaceLink *next, *prev;
405 ListBase regionbase; /* storage of regions for inactive spaces */
407 float blockscale DNA_DEPRECATED;
409 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
419 typedef enum eTimeline_Flag {
420 /* show timing in frames instead of in seconds */
421 TIME_DRAWFRAMES = (1 << 0),
422 /* show time indicator box beside the frame number */
423 TIME_CFRA_NUM = (1 << 1),
424 /* only keyframes from active/selected channels get shown */
425 TIME_ONLYACTSEL = (1 << 2),
428 /* time->redraws (now screen->redraws_flag) */
429 typedef enum eScreen_Redraws_Flag {
430 TIME_REGION = (1 << 0),
431 TIME_ALL_3D_WIN = (1 << 1),
432 TIME_ALL_ANIM_WIN = (1 << 2),
433 TIME_ALL_BUTS_WIN = (1 << 3),
434 TIME_WITH_SEQ_AUDIO = (1 << 4), /* DEPRECATED */
436 TIME_ALL_IMAGE_WIN = (1 << 6),
437 TIME_CONTINUE_PHYSICS = (1 << 7),
438 TIME_NODES = (1 << 8),
439 TIME_CLIPS = (1 << 9),
440 } eScreen_Redraws_Flag;
443 typedef enum eTimeline_Cache_Flag {
444 TIME_CACHE_DISPLAY = (1 << 0),
445 TIME_CACHE_SOFTBODY = (1 << 1),
446 TIME_CACHE_PARTICLES = (1 << 2),
447 TIME_CACHE_CLOTH = (1 << 3),
448 TIME_CACHE_SMOKE = (1 << 4),
449 TIME_CACHE_DYNAMICPAINT = (1 << 5),
450 } eTimeline_Cache_Flag;
453 /* Sequence Editor ======================================= */
456 typedef struct SpaceSeq {
457 SpaceLink *next, *prev;
458 ListBase regionbase; /* storage of regions for inactive spaces */
460 float blockscale DNA_DEPRECATED;
462 short blockhandler[8] DNA_DEPRECATED;
464 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
466 float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
467 short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
472 float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
473 int view; /* see SEQ_VIEW_* below */
476 struct bGPdata *gpd; /* grease-pencil data */
478 struct SequencerScopes scopes; /* different scoped displayed in space */
483 typedef enum eSpaceSeq_RegionType {
484 SEQ_DRAW_SEQUENCE = 0,
485 SEQ_DRAW_IMG_IMBUF = 1,
486 SEQ_DRAW_IMG_WAVEFORM = 2,
487 SEQ_DRAW_IMG_VECTORSCOPE = 3,
488 SEQ_DRAW_IMG_HISTOGRAM = 4,
489 } eSpaceSeq_RegionType;
492 typedef enum eSpaceSeq_Flag {
493 SEQ_DRAWFRAMES = (1 << 0),
494 SEQ_MARKER_TRANS = (1 << 1),
495 SEQ_DRAW_COLOR_SEPARATED = (1 << 2),
496 SEQ_DRAW_SAFE_MARGINS = (1 << 3),
497 SEQ_SHOW_GPENCIL = (1 << 4),
498 SEQ_NO_DRAW_CFRANUM = (1 << 5),
502 typedef enum eSpaceSeq_Displays {
503 SEQ_VIEW_SEQUENCE = 1,
504 SEQ_VIEW_PREVIEW = 2,
505 SEQ_VIEW_SEQUENCE_PREVIEW = 3,
508 /* sseq->render_size */
509 typedef enum eSpaceSeq_Proxy_RenderSize {
510 SEQ_PROXY_RENDER_SIZE_NONE = -1,
511 SEQ_PROXY_RENDER_SIZE_SCENE = 0,
512 SEQ_PROXY_RENDER_SIZE_25 = 25,
513 SEQ_PROXY_RENDER_SIZE_50 = 50,
514 SEQ_PROXY_RENDER_SIZE_75 = 75,
515 SEQ_PROXY_RENDER_SIZE_100 = 99,
516 SEQ_PROXY_RENDER_SIZE_FULL = 100
517 } eSpaceSeq_Proxy_RenderSize;
519 typedef struct MaskSpaceInfo
521 /* **** mask editing **** */
530 typedef enum eSpaceSeq_OverlayType {
531 SEQ_DRAW_OVERLAY_RECT = 0,
532 SEQ_DRAW_OVERLAY_REFERENCE = 1,
533 SEQ_DRAW_OVERLAY_CURRENT = 2
534 } eSpaceSeq_OverlayType;
536 /* File Selector ========================================== */
538 /* Config and Input for File Selector */
539 typedef struct FileSelectParams {
540 char title[96]; /* title, also used for the text of the execute button */
541 char dir[1056]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 32, this is for extreme case when 1023 length path
542 * needs to be linked in, where foo.blend/Armature need adding */
543 char file[256]; /* file */
544 char renamefile[256];
545 char renameedit[256]; /* annoying but the first is only used for initialization */
547 char filter_glob[64]; /* list of filetypes to filter */
554 short type; /* XXXXX for now store type here, should be moved to the operator */
555 short flag; /* settings for filter, hiding dots files,... */
556 short sort; /* sort order */
557 short display; /* display mode flag */
558 short filter; /* filter when (flags & FILE_FILTER) is true */
560 /* XXX --- still unused -- */
561 short f_fp; /* show font preview */
562 char fp_str[8]; /* string to use for font preview */
564 /* XXX --- end unused -- */
568 typedef struct SpaceFile {
569 SpaceLink *next, *prev;
570 ListBase regionbase; /* storage of regions for inactive spaces */
575 struct FileSelectParams *params; /* config and input for file select */
577 struct FileList *files; /* holds the list of files to show */
579 ListBase *folders_prev; /* holds the list of previous directories to show */
580 ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */
582 /* operator that is invoking fileselect
583 * op->exec() will be called on the 'Load' button.
584 * if operator provides op->cancel(), then this will be invoked
585 * on the cancel button.
587 struct wmOperator *op;
589 struct wmTimer *smoothscroll_timer;
591 struct FileLayout *layout;
593 short recentnr, bookmarknr;
594 short systemnr, pad2;
598 /* FileSelectParams.display */
599 enum FileDisplayTypeE {
600 FILE_DEFAULTDISPLAY = 0,
601 FILE_SHORTDISPLAY = 1,
602 FILE_LONGDISPLAY = 2,
606 /* FileSelectParams.sort */
610 FILE_SORT_EXTENSION = 2,
615 /* these values need to be hardcoded in structs, dna does not recognize defines */
616 /* also defined in BKE */
617 #define FILE_MAXDIR 768
618 #define FILE_MAXFILE 256
619 #define FILE_MAX 1024
621 #define FILE_MAX_LIBEXTRA (FILE_MAX + MAX_ID_NAME)
625 #define FILE_BLENDER 8 /* don't display relative paths */
626 #define FILE_SPECIAL 9
628 #define FILE_LOADLIB 1
630 #define FILE_LOADFONT 3
632 /* filesel op property -> action */
633 typedef enum eFileSel_Action {
638 /* sfile->params->flag and simasel->flag */
639 typedef enum eFileSel_Params_Flag {
640 FILE_SHOWSHORT = (1 << 0),
641 FILE_RELPATH = (1 << 1), /* was FILE_STRINGCODE */
642 FILE_LINK = (1 << 2),
643 FILE_HIDE_DOT = (1 << 3),
644 FILE_AUTOSELECT = (1 << 4),
645 FILE_ACTIVELAY = (1 << 5),
646 /* FILE_ATCURSOR = (1 << 6), */ /* deprecated */
647 FILE_DIRSEL_ONLY = (1 << 7),
648 FILE_FILTER = (1 << 8),
649 FILE_BOOKMARKS = (1 << 9),
650 FILE_GROUP_INSTANCE = (1 << 10),
651 } eFileSel_Params_Flag;
654 /* files in filesel list: file types */
655 typedef enum eFileSel_File_Types {
656 BLENDERFILE = (1 << 2),
657 BLENDERFILE_BACKUP = (1 << 3),
658 IMAGEFILE = (1 << 4),
659 MOVIEFILE = (1 << 5),
660 PYSCRIPTFILE = (1 << 6),
661 FTFONTFILE = (1 << 7),
662 SOUNDFILE = (1 << 8),
664 MOVIEFILE_ICON = (1 << 10), /* movie file that preview can't load */
665 FOLDERFILE = (1 << 11), /* represents folders for filtering */
667 COLLADAFILE = (1 << 13),
668 OPERATORFILE = (1 << 14), /* from filter_glob operator property */
669 } eFileSel_File_Types;
671 /* Selection Flags in filesel: struct direntry, unsigned char selflag */
672 typedef enum eDirEntry_SelectFlag {
673 /* ACTIVE_FILE = (1 << 1), */ /* UNUSED */
674 HILITED_FILE = (1 << 2),
675 SELECTED_FILE = (1 << 3),
676 EDITING_FILE = (1 << 4),
677 } eDirEntry_SelectFlag;
679 /* Image/UV Editor ======================================== */
681 /* Image/UV Editor */
682 typedef struct SpaceImage {
683 SpaceLink *next, *prev;
684 ListBase regionbase; /* storage of regions for inactive spaces */
690 struct ImageUser iuser;
692 struct CurveMapping *cumap DNA_DEPRECATED; /* was switched to scene's color management settings */
694 struct Scopes scopes; /* histogram waveform and vectorscope */
695 struct Histogram sample_line_hist; /* sample line histogram */
697 struct bGPdata *gpd; /* grease pencil data */
699 float cursor[2]; /* UV editor 2d cursor */
700 float xof, yof; /* user defined offset, image is centered */
701 float zoom; /* user defined zoom level */
702 float centx, centy; /* storage for offset while render drawing */
704 char mode; /* view/paint/mask */
707 short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */
709 char dt_uv; /* UV draw type */
710 char sticky; /* sticky selection type */
714 MaskSpaceInfo mask_info;
718 /* SpaceImage->dt_uv */
719 typedef enum eSpaceImage_UVDT {
726 /* SpaceImage->dt_uvstretch */
727 typedef enum eSpaceImage_UVDT_Stretch {
728 SI_UVDT_STRETCH_ANGLE = 0,
729 SI_UVDT_STRETCH_AREA = 1,
730 } eSpaceImage_UVDT_Stretch;
732 /* SpaceImage->mode */
733 typedef enum eSpaceImage_Mode {
736 SI_MODE_MASK = 2 /* note: mesh edit mode overrides mask */
739 /* SpaceImage->sticky
740 * Note DISABLE should be 0, however would also need to re-arrange icon order,
741 * also, sticky loc is the default mode so this means we don't need to 'do_versons' */
742 typedef enum eSpaceImage_Sticky {
744 SI_STICKY_DISABLE = 1,
745 SI_STICKY_VERTEX = 2,
746 } eSpaceImage_Sticky;
748 /* SpaceImage->flag */
749 typedef enum eSpaceImage_Flag {
750 /* SI_BE_SQUARE = (1 << 0), */ /* deprecated */
751 SI_EDITTILE = (1 << 1), /* XXX - not used but should be? */
752 SI_CLIP_UV = (1 << 2),
753 /* SI_DRAWTOOL = (1 << 3), */ /* deprecated */
754 SI_NO_DRAWFACES = (1 << 4),
755 SI_DRAWSHADOW = (1 << 5),
756 /* SI_SELACTFACE = (1 << 6), */ /* deprecated */
757 /* SI_DEPRECATED2 = (1 << 7), */ /* deprecated */
758 /* SI_DEPRECATED3 = (1 << 8), */ /* deprecated */
759 SI_COORDFLOATS = (1 << 9),
760 SI_PIXELSNAP = (1 << 10),
761 SI_LIVE_UNWRAP = (1 << 11),
762 SI_USE_ALPHA = (1 << 12),
763 SI_SHOW_ALPHA = (1 << 13),
764 SI_SHOW_ZBUF = (1 << 14),
766 /* next two for render window display */
767 SI_PREVSPACE = (1 << 15),
768 SI_FULLWINDOW = (1 << 16),
770 /* SI_DEPRECATED4 = (1 << 17), */ /* deprecated */
771 /* SI_DEPRECATED5 = (1 << 18), */ /* deprecated */
773 /* this means that the image is drawn until it reaches the view edge,
774 * in the image view, its unrelated to the 'tile' mode for texface
776 SI_DRAW_TILE = (1 << 19),
777 SI_SMOOTH_UV = (1 << 20),
778 SI_DRAW_STRETCH = (1 << 21),
779 SI_SHOW_GPENCIL = (1 << 22),
780 SI_DRAW_OTHER = (1 << 23),
782 SI_COLOR_CORRECTION = (1 << 24),
785 /* Text Editor ============================================ */
788 typedef struct SpaceText {
789 SpaceLink *next, *prev;
790 ListBase regionbase; /* storage of regions for inactive spaces */
792 float blockscale DNA_DEPRECATED;
793 short blockhandler[8] DNA_DEPRECATED;
800 short lheight; /* user preference, is font_size! */
801 char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */
809 short live_edit; /* run python while editing, evil */
812 struct rcti txtscroll, txtbar;
814 int wordwrap, doplugins;
816 char findstr[256]; /* ST_MAX_FIND_STR */
817 char replacestr[256]; /* ST_MAX_FIND_STR */
819 short margin_column; /* column number to show right margin at */
820 short lheight_dpi; /* actual lineheight, dpi controlled */
823 void *drawcache; /* cache for faster drawing */
827 /* SpaceText flags (moved from DNA_text_types.h) */
828 typedef enum eSpaceText_Flags {
830 ST_SCROLL_SELECT = (1 << 0),
831 /* clear namespace after script execution (BPY_main.c) */
832 ST_CLEAR_NAMESPACE = (1 << 4),
834 ST_FIND_WRAP = (1 << 5),
835 ST_FIND_ALL = (1 << 6),
836 ST_SHOW_MARGIN = (1 << 7),
837 ST_MATCH_CASE = (1 << 8),
840 /* stext->findstr/replacestr */
841 #define ST_MAX_FIND_STR 256
843 /* Script View (Obsolete) ================================== */
845 /* Script Runtime Data - Obsolete (pre 2.5) */
846 typedef struct Script {
852 void *py_browsercallback;
855 int flags, lastspace;
856 /* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */
857 char scriptname[1024]; /* 1024 = FILE_MAX */
858 char scriptarg[256]; /* 1024 = FILE_MAX */
860 #define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0
862 /* Script View - Obsolete (pre 2.5) */
863 typedef struct SpaceScript {
864 SpaceLink *next, *prev;
865 ListBase regionbase; /* storage of regions for inactive spaces */
867 float blockscale DNA_DEPRECATED;
868 struct Script *script;
876 /* Nodes Editor =========================================== */
879 typedef struct SpaceNode {
880 SpaceLink *next, *prev;
881 ListBase regionbase; /* storage of regions for inactive spaces */
883 float blockscale DNA_DEPRECATED;
884 short blockhandler[8] DNA_DEPRECATED;
886 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
888 struct ID *id, *from; /* context, no need to save in file? well... pinning... */
889 short flag, pad1; /* menunr: browse id block in header */
890 float aspect, pad2; /* internal state variables */
892 float xof, yof; /* offset for drawing the backdrop */
893 float zoom; /* zoom for backdrop */
894 float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */
896 struct bNodeTree *nodetree, *edittree;
897 int treetype; /* treetype: as same nodetree->type */
898 short texfrom; /* texfrom object, world or brush */
899 short shaderfrom; /* shader from object or world */
900 short recalc; /* currently on 0/1, for auto compo */
902 ListBase linkdrag; /* temporary data for modal linking operator */
904 struct bGPdata *gpd; /* grease-pencil data */
908 typedef enum eSpaceNode_Flag {
909 SNODE_BACKDRAW = (1 << 1),
910 SNODE_SHOW_GPENCIL = (1 << 2),
911 SNODE_USE_ALPHA = (1 << 3),
912 SNODE_SHOW_ALPHA = (1 << 4),
913 SNODE_SHOW_R = (1 << 7),
914 SNODE_SHOW_G = (1 << 8),
915 SNODE_SHOW_B = (1 << 9),
916 SNODE_AUTO_RENDER = (1 << 5),
917 SNODE_SHOW_HIGHLIGHT = (1 << 6),
918 SNODE_USE_HIDDEN_PREVIEW = (1 << 10),
922 typedef enum eSpaceNode_TexFrom {
923 SNODE_TEX_OBJECT = 0,
926 } eSpaceNode_TexFrom;
928 /* snode->shaderfrom */
929 typedef enum eSpaceNode_ShaderFrom {
930 SNODE_SHADER_OBJECT = 0,
931 SNODE_SHADER_WORLD = 1,
932 } eSpaceNode_ShaderFrom;
934 /* Game Logic Editor ===================================== */
937 typedef struct SpaceLogic {
938 SpaceLink *next, *prev;
939 ListBase regionbase; /* storage of regions for inactive spaces */
941 float blockscale DNA_DEPRECATED;
943 short blockhandler[8] DNA_DEPRECATED;
948 struct bGPdata *gpd; /* grease-pencil data */
951 /* Console ================================================ */
953 /* Console content */
954 typedef struct ConsoleLine {
955 struct ConsoleLine *next, *prev;
957 /* keep these 3 vars so as to share free, realloc funcs */
958 int len_alloc; /* allocated length */
959 int len; /* real len - strlen() */
963 int type; /* only for use when in the 'scrollback' listbase */
966 /* ConsoleLine.type */
967 typedef enum eConsoleLine_Type {
968 CONSOLE_LINE_OUTPUT = 0,
969 CONSOLE_LINE_INPUT = 1,
970 CONSOLE_LINE_INFO = 2, /* autocomp feedback */
971 CONSOLE_LINE_ERROR = 3
976 typedef struct SpaceConsole {
977 SpaceLink *next, *prev;
978 ListBase regionbase; /* storage of regions for inactive spaces */
980 float blockscale DNA_DEPRECATED; // XXX are these needed?
981 short blockhandler[8] DNA_DEPRECATED; // XXX are these needed?
986 ListBase scrollback; /* ConsoleLine; output */
987 ListBase history; /* ConsoleLine; command history, current edited line is the first */
989 char language[32]; /* multiple consoles are possible, not just python */
996 /* User Preferences ======================================= */
998 /* User Preferences View */
999 typedef struct SpaceUserPref {
1000 SpaceLink *next, *prev;
1001 ListBase regionbase; /* storage of regions for inactive spaces */
1006 char filter[64]; /* search term for filtering in the UI */
1009 /* Motion Tracking ======================================== */
1012 typedef struct SpaceClip {
1013 SpaceLink *next, *prev;
1014 ListBase regionbase; /* storage of regions for inactive spaces */
1017 float xof, yof; /* user defined offset, image is centered */
1018 float xlockof, ylockof; /* user defined offset from locked position */
1019 float zoom; /* user defined zoom level */
1021 struct MovieClipUser user; /* user of clip */
1022 struct MovieClip *clip; /* clip data */
1023 struct MovieClipScopes scopes; /* different scoped displayed in space panels */
1025 int flag; /* flags */
1026 short mode; /* editor mode (editing context being displayed) */
1027 short view; /* type of the clip editor view */
1029 int path_length; /* length of displaying path, in frames */
1031 /* current stabilization data */
1032 float loc[2], scale, angle; /* pre-composed stabilization data */
1034 float stabmat[4][4], unistabmat[4][4]; /* current stabilization matrix and the same matrix in unified space,
1035 * defined when drawing and used for mouse position calculation */
1037 /* movie postprocessing */
1041 short gpencil_src, pad2;
1045 int around, pad4; /* pivot point for transforms */
1047 MaskSpaceInfo mask_info;
1050 /* SpaceClip->flag */
1051 typedef enum eSpaceClip_Flag {
1052 SC_SHOW_MARKER_PATTERN = (1 << 0),
1053 SC_SHOW_MARKER_SEARCH = (1 << 1),
1054 SC_LOCK_SELECTION = (1 << 2),
1055 SC_SHOW_TINY_MARKER = (1 << 3),
1056 SC_SHOW_TRACK_PATH = (1 << 4),
1057 SC_SHOW_BUNDLES = (1 << 5),
1058 SC_MUTE_FOOTAGE = (1 << 6),
1059 SC_HIDE_DISABLED = (1 << 7),
1060 SC_SHOW_NAMES = (1 << 8),
1061 SC_SHOW_GRID = (1 << 9),
1062 SC_SHOW_STABLE = (1 << 10),
1063 SC_MANUAL_CALIBRATION = (1 << 11),
1064 SC_SHOW_GPENCIL = (1 << 12),
1065 SC_SHOW_FILTERS = (1 << 13),
1066 SC_SHOW_GRAPH_FRAMES = (1 << 14),
1067 SC_SHOW_GRAPH_TRACKS = (1 << 15),
1068 /* SC_SHOW_PYRAMID_LEVELS = (1 << 16), */ /* UNUSED */
1069 SC_LOCK_TIMECURSOR = (1 << 17),
1070 SC_SHOW_SECONDS = (1 << 18),
1071 SC_SHOW_GRAPH_SEL_ONLY = (1 << 19),
1072 SC_SHOW_GRAPH_HIDDEN = (1 << 20),
1075 /* SpaceClip->mode */
1076 typedef enum eSpaceClip_Mode {
1077 SC_MODE_TRACKING = 0,
1078 SC_MODE_RECONSTRUCTION = 1,
1079 SC_MODE_DISTORTION = 2,
1080 SC_MODE_MASKEDIT = 3,
1083 /* SpaceClip->view */
1084 typedef enum eSpaceClip_View {
1087 SC_VIEW_DOPESHEET = 2,
1090 /* SpaceClip->gpencil_src */
1091 typedef enum eSpaceClip_GPencil_Source {
1092 SC_GPENCIL_SRC_CLIP = 0,
1093 SC_GPENCIL_SRC_TRACK = 1,
1094 } eSpaceClip_GPencil_Source;
1096 /* **************** SPACE DEFINES ********************* */
1098 /* headerbuttons: 450-499 */
1099 #define B_IMASELHOME 451
1100 #define B_IMASELREMOVEBIP 452
1103 /* space types, moved from DNA_screen_types.h */
1104 /* Do NOT change order, append on end. types are hardcoded needed */
1105 typedef enum eSpace_Type {
1116 SPACE_IMASEL = 10, /* deprecated */
1117 SPACE_SOUND = 11, /* Deprecated */
1120 SPACE_SCRIPT = 14, /* Deprecated */
1125 SPACE_USERPREF = 19,
1128 SPACEICONMAX = SPACE_CLIP
1131 #define IMG_SIZE_FALLBACK 256