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), /* UNUSED */
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 TIME_CACHE_RIGIDBODY = (1 << 6),
451 } eTimeline_Cache_Flag;
454 /* Sequence Editor ======================================= */
457 typedef struct SpaceSeq {
458 SpaceLink *next, *prev;
459 ListBase regionbase; /* storage of regions for inactive spaces */
461 float blockscale DNA_DEPRECATED;
463 short blockhandler[8] DNA_DEPRECATED;
465 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
467 float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
468 short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
473 float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
474 int view; /* see SEQ_VIEW_* below */
477 struct bGPdata *gpd; /* grease-pencil data */
479 struct SequencerScopes scopes; /* different scoped displayed in space */
484 typedef enum eSpaceSeq_RegionType {
485 SEQ_DRAW_SEQUENCE = 0,
486 SEQ_DRAW_IMG_IMBUF = 1,
487 SEQ_DRAW_IMG_WAVEFORM = 2,
488 SEQ_DRAW_IMG_VECTORSCOPE = 3,
489 SEQ_DRAW_IMG_HISTOGRAM = 4,
490 } eSpaceSeq_RegionType;
493 typedef enum eSpaceSeq_Flag {
494 SEQ_DRAWFRAMES = (1 << 0),
495 SEQ_MARKER_TRANS = (1 << 1),
496 SEQ_DRAW_COLOR_SEPARATED = (1 << 2),
497 SEQ_DRAW_SAFE_MARGINS = (1 << 3),
498 SEQ_SHOW_GPENCIL = (1 << 4),
499 SEQ_NO_DRAW_CFRANUM = (1 << 5),
503 typedef enum eSpaceSeq_Displays {
504 SEQ_VIEW_SEQUENCE = 1,
505 SEQ_VIEW_PREVIEW = 2,
506 SEQ_VIEW_SEQUENCE_PREVIEW = 3,
509 /* sseq->render_size */
510 typedef enum eSpaceSeq_Proxy_RenderSize {
511 SEQ_PROXY_RENDER_SIZE_NONE = -1,
512 SEQ_PROXY_RENDER_SIZE_SCENE = 0,
513 SEQ_PROXY_RENDER_SIZE_25 = 25,
514 SEQ_PROXY_RENDER_SIZE_50 = 50,
515 SEQ_PROXY_RENDER_SIZE_75 = 75,
516 SEQ_PROXY_RENDER_SIZE_100 = 99,
517 SEQ_PROXY_RENDER_SIZE_FULL = 100
518 } eSpaceSeq_Proxy_RenderSize;
520 typedef struct MaskSpaceInfo
522 /* **** mask editing **** */
531 typedef enum eSpaceSeq_OverlayType {
532 SEQ_DRAW_OVERLAY_RECT = 0,
533 SEQ_DRAW_OVERLAY_REFERENCE = 1,
534 SEQ_DRAW_OVERLAY_CURRENT = 2
535 } eSpaceSeq_OverlayType;
537 /* File Selector ========================================== */
539 /* Config and Input for File Selector */
540 typedef struct FileSelectParams {
541 char title[96]; /* title, also used for the text of the execute button */
542 char dir[1056]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 32, this is for extreme case when 1023 length path
543 * needs to be linked in, where foo.blend/Armature need adding */
544 char file[256]; /* file */
545 char renamefile[256];
546 char renameedit[256]; /* annoying but the first is only used for initialization */
548 char filter_glob[64]; /* list of filetypes to filter */
555 short type; /* XXXXX for now store type here, should be moved to the operator */
556 short flag; /* settings for filter, hiding dots files,... */
557 short sort; /* sort order */
558 short display; /* display mode flag */
559 short filter; /* filter when (flags & FILE_FILTER) is true */
561 /* XXX --- still unused -- */
562 short f_fp; /* show font preview */
563 char fp_str[8]; /* string to use for font preview */
565 /* XXX --- end unused -- */
569 typedef struct SpaceFile {
570 SpaceLink *next, *prev;
571 ListBase regionbase; /* storage of regions for inactive spaces */
576 struct FileSelectParams *params; /* config and input for file select */
578 struct FileList *files; /* holds the list of files to show */
580 ListBase *folders_prev; /* holds the list of previous directories to show */
581 ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */
583 /* operator that is invoking fileselect
584 * op->exec() will be called on the 'Load' button.
585 * if operator provides op->cancel(), then this will be invoked
586 * on the cancel button.
588 struct wmOperator *op;
590 struct wmTimer *smoothscroll_timer;
592 struct FileLayout *layout;
594 short recentnr, bookmarknr;
595 short systemnr, pad2;
599 /* FileSelectParams.display */
600 enum FileDisplayTypeE {
601 FILE_DEFAULTDISPLAY = 0,
602 FILE_SHORTDISPLAY = 1,
603 FILE_LONGDISPLAY = 2,
607 /* FileSelectParams.sort */
611 FILE_SORT_EXTENSION = 2,
616 /* these values need to be hardcoded in structs, dna does not recognize defines */
617 /* also defined in BKE */
618 #define FILE_MAXDIR 768
619 #define FILE_MAXFILE 256
620 #define FILE_MAX 1024
622 #define FILE_MAX_LIBEXTRA (FILE_MAX + MAX_ID_NAME)
626 #define FILE_BLENDER 8 /* don't display relative paths */
627 #define FILE_SPECIAL 9
629 #define FILE_LOADLIB 1
631 #define FILE_LOADFONT 3
633 /* filesel op property -> action */
634 typedef enum eFileSel_Action {
639 /* sfile->params->flag and simasel->flag */
640 typedef enum eFileSel_Params_Flag {
641 FILE_SHOWSHORT = (1 << 0),
642 FILE_RELPATH = (1 << 1), /* was FILE_STRINGCODE */
643 FILE_LINK = (1 << 2),
644 FILE_HIDE_DOT = (1 << 3),
645 FILE_AUTOSELECT = (1 << 4),
646 FILE_ACTIVELAY = (1 << 5),
647 /* FILE_ATCURSOR = (1 << 6), */ /* deprecated */
648 FILE_DIRSEL_ONLY = (1 << 7),
649 FILE_FILTER = (1 << 8),
650 FILE_BOOKMARKS = (1 << 9),
651 FILE_GROUP_INSTANCE = (1 << 10),
652 } eFileSel_Params_Flag;
655 /* files in filesel list: file types */
656 typedef enum eFileSel_File_Types {
657 BLENDERFILE = (1 << 2),
658 BLENDERFILE_BACKUP = (1 << 3),
659 IMAGEFILE = (1 << 4),
660 MOVIEFILE = (1 << 5),
661 PYSCRIPTFILE = (1 << 6),
662 FTFONTFILE = (1 << 7),
663 SOUNDFILE = (1 << 8),
665 MOVIEFILE_ICON = (1 << 10), /* movie file that preview can't load */
666 FOLDERFILE = (1 << 11), /* represents folders for filtering */
668 COLLADAFILE = (1 << 13),
669 OPERATORFILE = (1 << 14), /* from filter_glob operator property */
670 } eFileSel_File_Types;
672 /* Selection Flags in filesel: struct direntry, unsigned char selflag */
673 typedef enum eDirEntry_SelectFlag {
674 /* ACTIVE_FILE = (1 << 1), */ /* UNUSED */
675 HILITED_FILE = (1 << 2),
676 SELECTED_FILE = (1 << 3),
677 EDITING_FILE = (1 << 4),
678 } eDirEntry_SelectFlag;
680 /* Image/UV Editor ======================================== */
682 /* Image/UV Editor */
683 typedef struct SpaceImage {
684 SpaceLink *next, *prev;
685 ListBase regionbase; /* storage of regions for inactive spaces */
691 struct ImageUser iuser;
693 struct CurveMapping *cumap DNA_DEPRECATED; /* was switched to scene's color management settings */
695 struct Scopes scopes; /* histogram waveform and vectorscope */
696 struct Histogram sample_line_hist; /* sample line histogram */
698 struct bGPdata *gpd; /* grease pencil data */
700 float cursor[2]; /* UV editor 2d cursor */
701 float xof, yof; /* user defined offset, image is centered */
702 float zoom; /* user defined zoom level */
703 float centx, centy; /* storage for offset while render drawing */
705 char mode; /* view/paint/mask */
708 short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */
710 char dt_uv; /* UV draw type */
711 char sticky; /* sticky selection type */
715 MaskSpaceInfo mask_info;
719 /* SpaceImage->dt_uv */
720 typedef enum eSpaceImage_UVDT {
727 /* SpaceImage->dt_uvstretch */
728 typedef enum eSpaceImage_UVDT_Stretch {
729 SI_UVDT_STRETCH_ANGLE = 0,
730 SI_UVDT_STRETCH_AREA = 1,
731 } eSpaceImage_UVDT_Stretch;
733 /* SpaceImage->mode */
734 typedef enum eSpaceImage_Mode {
737 SI_MODE_MASK = 2 /* note: mesh edit mode overrides mask */
740 /* SpaceImage->sticky
741 * Note DISABLE should be 0, however would also need to re-arrange icon order,
742 * also, sticky loc is the default mode so this means we don't need to 'do_versons' */
743 typedef enum eSpaceImage_Sticky {
745 SI_STICKY_DISABLE = 1,
746 SI_STICKY_VERTEX = 2,
747 } eSpaceImage_Sticky;
749 /* SpaceImage->flag */
750 typedef enum eSpaceImage_Flag {
751 /* SI_BE_SQUARE = (1 << 0), */ /* deprecated */
752 SI_EDITTILE = (1 << 1), /* XXX - not used but should be? */
753 SI_CLIP_UV = (1 << 2),
754 /* SI_DRAWTOOL = (1 << 3), */ /* deprecated */
755 SI_NO_DRAWFACES = (1 << 4),
756 SI_DRAWSHADOW = (1 << 5),
757 /* SI_SELACTFACE = (1 << 6), */ /* deprecated */
758 /* SI_DEPRECATED2 = (1 << 7), */ /* deprecated */
759 /* SI_DEPRECATED3 = (1 << 8), */ /* deprecated */
760 SI_COORDFLOATS = (1 << 9),
761 SI_PIXELSNAP = (1 << 10),
762 SI_LIVE_UNWRAP = (1 << 11),
763 SI_USE_ALPHA = (1 << 12),
764 SI_SHOW_ALPHA = (1 << 13),
765 SI_SHOW_ZBUF = (1 << 14),
767 /* next two for render window display */
768 SI_PREVSPACE = (1 << 15),
769 SI_FULLWINDOW = (1 << 16),
771 /* SI_DEPRECATED4 = (1 << 17), */ /* deprecated */
772 /* SI_DEPRECATED5 = (1 << 18), */ /* deprecated */
774 /* this means that the image is drawn until it reaches the view edge,
775 * in the image view, its unrelated to the 'tile' mode for texface
777 SI_DRAW_TILE = (1 << 19),
778 SI_SMOOTH_UV = (1 << 20),
779 SI_DRAW_STRETCH = (1 << 21),
780 SI_SHOW_GPENCIL = (1 << 22),
781 SI_DRAW_OTHER = (1 << 23),
783 SI_COLOR_CORRECTION = (1 << 24),
786 /* Text Editor ============================================ */
789 typedef struct SpaceText {
790 SpaceLink *next, *prev;
791 ListBase regionbase; /* storage of regions for inactive spaces */
793 float blockscale DNA_DEPRECATED;
794 short blockhandler[8] DNA_DEPRECATED;
801 short lheight; /* user preference, is font_size! */
802 char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */
810 short live_edit; /* run python while editing, evil */
813 struct rcti txtscroll, txtbar;
815 int wordwrap, doplugins;
817 char findstr[256]; /* ST_MAX_FIND_STR */
818 char replacestr[256]; /* ST_MAX_FIND_STR */
820 short margin_column; /* column number to show right margin at */
821 short lheight_dpi; /* actual lineheight, dpi controlled */
824 void *drawcache; /* cache for faster drawing */
828 /* SpaceText flags (moved from DNA_text_types.h) */
829 typedef enum eSpaceText_Flags {
831 ST_SCROLL_SELECT = (1 << 0),
832 /* clear namespace after script execution (BPY_main.c) */
833 ST_CLEAR_NAMESPACE = (1 << 4),
835 ST_FIND_WRAP = (1 << 5),
836 ST_FIND_ALL = (1 << 6),
837 ST_SHOW_MARGIN = (1 << 7),
838 ST_MATCH_CASE = (1 << 8),
841 /* stext->findstr/replacestr */
842 #define ST_MAX_FIND_STR 256
844 /* Script View (Obsolete) ================================== */
846 /* Script Runtime Data - Obsolete (pre 2.5) */
847 typedef struct Script {
853 void *py_browsercallback;
856 int flags, lastspace;
857 /* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */
858 char scriptname[1024]; /* 1024 = FILE_MAX */
859 char scriptarg[256]; /* 1024 = FILE_MAX */
861 #define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0
863 /* Script View - Obsolete (pre 2.5) */
864 typedef struct SpaceScript {
865 SpaceLink *next, *prev;
866 ListBase regionbase; /* storage of regions for inactive spaces */
868 float blockscale DNA_DEPRECATED;
869 struct Script *script;
877 /* Nodes Editor =========================================== */
880 typedef struct SpaceNode {
881 SpaceLink *next, *prev;
882 ListBase regionbase; /* storage of regions for inactive spaces */
884 float blockscale DNA_DEPRECATED;
885 short blockhandler[8] DNA_DEPRECATED;
887 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
889 struct ID *id, *from; /* context, no need to save in file? well... pinning... */
890 short flag, pad1; /* menunr: browse id block in header */
891 float aspect, pad2; /* internal state variables */
893 float xof, yof; /* offset for drawing the backdrop */
894 float zoom; /* zoom for backdrop */
895 float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */
897 struct bNodeTree *nodetree, *edittree;
898 int treetype; /* treetype: as same nodetree->type */
899 short texfrom; /* texfrom object, world or brush */
900 short shaderfrom; /* shader from object or world */
901 short recalc; /* currently on 0/1, for auto compo */
903 ListBase linkdrag; /* temporary data for modal linking operator */
905 struct bGPdata *gpd; /* grease-pencil data */
909 typedef enum eSpaceNode_Flag {
910 SNODE_BACKDRAW = (1 << 1),
911 SNODE_SHOW_GPENCIL = (1 << 2),
912 SNODE_USE_ALPHA = (1 << 3),
913 SNODE_SHOW_ALPHA = (1 << 4),
914 SNODE_SHOW_R = (1 << 7),
915 SNODE_SHOW_G = (1 << 8),
916 SNODE_SHOW_B = (1 << 9),
917 SNODE_AUTO_RENDER = (1 << 5),
918 SNODE_SHOW_HIGHLIGHT = (1 << 6),
919 SNODE_USE_HIDDEN_PREVIEW = (1 << 10),
920 SNODE_NEW_SHADERS = (1 << 11),
924 typedef enum eSpaceNode_TexFrom {
925 SNODE_TEX_OBJECT = 0,
928 } eSpaceNode_TexFrom;
930 /* snode->shaderfrom */
931 typedef enum eSpaceNode_ShaderFrom {
932 SNODE_SHADER_OBJECT = 0,
933 SNODE_SHADER_WORLD = 1,
934 } eSpaceNode_ShaderFrom;
936 /* Game Logic Editor ===================================== */
939 typedef struct SpaceLogic {
940 SpaceLink *next, *prev;
941 ListBase regionbase; /* storage of regions for inactive spaces */
943 float blockscale DNA_DEPRECATED;
945 short blockhandler[8] DNA_DEPRECATED;
950 struct bGPdata *gpd; /* grease-pencil data */
953 /* Console ================================================ */
955 /* Console content */
956 typedef struct ConsoleLine {
957 struct ConsoleLine *next, *prev;
959 /* keep these 3 vars so as to share free, realloc funcs */
960 int len_alloc; /* allocated length */
961 int len; /* real len - strlen() */
965 int type; /* only for use when in the 'scrollback' listbase */
968 /* ConsoleLine.type */
969 typedef enum eConsoleLine_Type {
970 CONSOLE_LINE_OUTPUT = 0,
971 CONSOLE_LINE_INPUT = 1,
972 CONSOLE_LINE_INFO = 2, /* autocomp feedback */
973 CONSOLE_LINE_ERROR = 3
978 typedef struct SpaceConsole {
979 SpaceLink *next, *prev;
980 ListBase regionbase; /* storage of regions for inactive spaces */
982 float blockscale DNA_DEPRECATED; // XXX are these needed?
983 short blockhandler[8] DNA_DEPRECATED; // XXX are these needed?
988 ListBase scrollback; /* ConsoleLine; output */
989 ListBase history; /* ConsoleLine; command history, current edited line is the first */
991 char language[32]; /* multiple consoles are possible, not just python */
998 /* User Preferences ======================================= */
1000 /* User Preferences View */
1001 typedef struct SpaceUserPref {
1002 SpaceLink *next, *prev;
1003 ListBase regionbase; /* storage of regions for inactive spaces */
1008 char filter[64]; /* search term for filtering in the UI */
1011 /* Motion Tracking ======================================== */
1014 typedef struct SpaceClip {
1015 SpaceLink *next, *prev;
1016 ListBase regionbase; /* storage of regions for inactive spaces */
1019 float xof, yof; /* user defined offset, image is centered */
1020 float xlockof, ylockof; /* user defined offset from locked position */
1021 float zoom; /* user defined zoom level */
1023 struct MovieClipUser user; /* user of clip */
1024 struct MovieClip *clip; /* clip data */
1025 struct MovieClipScopes scopes; /* different scoped displayed in space panels */
1027 int flag; /* flags */
1028 short mode; /* editor mode (editing context being displayed) */
1029 short view; /* type of the clip editor view */
1031 int path_length; /* length of displaying path, in frames */
1033 /* current stabilization data */
1034 float loc[2], scale, angle; /* pre-composed stabilization data */
1036 float stabmat[4][4], unistabmat[4][4]; /* current stabilization matrix and the same matrix in unified space,
1037 * defined when drawing and used for mouse position calculation */
1039 /* movie postprocessing */
1043 short gpencil_src, pad2;
1047 int around, pad4; /* pivot point for transforms */
1049 MaskSpaceInfo mask_info;
1052 /* SpaceClip->flag */
1053 typedef enum eSpaceClip_Flag {
1054 SC_SHOW_MARKER_PATTERN = (1 << 0),
1055 SC_SHOW_MARKER_SEARCH = (1 << 1),
1056 SC_LOCK_SELECTION = (1 << 2),
1057 SC_SHOW_TINY_MARKER = (1 << 3),
1058 SC_SHOW_TRACK_PATH = (1 << 4),
1059 SC_SHOW_BUNDLES = (1 << 5),
1060 SC_MUTE_FOOTAGE = (1 << 6),
1061 SC_HIDE_DISABLED = (1 << 7),
1062 SC_SHOW_NAMES = (1 << 8),
1063 SC_SHOW_GRID = (1 << 9),
1064 SC_SHOW_STABLE = (1 << 10),
1065 SC_MANUAL_CALIBRATION = (1 << 11),
1066 SC_SHOW_GPENCIL = (1 << 12),
1067 SC_SHOW_FILTERS = (1 << 13),
1068 SC_SHOW_GRAPH_FRAMES = (1 << 14),
1069 SC_SHOW_GRAPH_TRACKS = (1 << 15),
1070 /* SC_SHOW_PYRAMID_LEVELS = (1 << 16), */ /* UNUSED */
1071 SC_LOCK_TIMECURSOR = (1 << 17),
1072 SC_SHOW_SECONDS = (1 << 18),
1073 SC_SHOW_GRAPH_SEL_ONLY = (1 << 19),
1074 SC_SHOW_GRAPH_HIDDEN = (1 << 20),
1077 /* SpaceClip->mode */
1078 typedef enum eSpaceClip_Mode {
1079 SC_MODE_TRACKING = 0,
1080 SC_MODE_RECONSTRUCTION = 1,
1081 SC_MODE_DISTORTION = 2,
1082 SC_MODE_MASKEDIT = 3,
1085 /* SpaceClip->view */
1086 typedef enum eSpaceClip_View {
1089 SC_VIEW_DOPESHEET = 2,
1092 /* SpaceClip->gpencil_src */
1093 typedef enum eSpaceClip_GPencil_Source {
1094 SC_GPENCIL_SRC_CLIP = 0,
1095 SC_GPENCIL_SRC_TRACK = 1,
1096 } eSpaceClip_GPencil_Source;
1098 /* **************** SPACE DEFINES ********************* */
1100 /* headerbuttons: 450-499 */
1101 #define B_IMASELHOME 451
1102 #define B_IMASELREMOVEBIP 452
1105 /* space types, moved from DNA_screen_types.h */
1106 /* Do NOT change order, append on end. types are hardcoded needed */
1107 typedef enum eSpace_Type {
1118 SPACE_IMASEL = 10, /* deprecated */
1119 SPACE_SOUND = 11, /* Deprecated */
1122 SPACE_SCRIPT = 14, /* Deprecated */
1127 SPACE_USERPREF = 19,
1130 SPACEICONMAX = SPACE_CLIP
1133 #define IMG_SIZE_FALLBACK 256