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,
183 BCONTEXT_RENDER_LAYER = 13,
185 /* always as last... */
187 } eSpaceButtons_Context;
191 #define SB_PIN_CONTEXT 2
192 //#define SB_WORLD_TEX 4 //not used anymore
193 //#define SB_BRUSH_TEX 8 //not used anymore
194 #define SB_SHADING_CONTEXT 16
196 /* sbuts->texture_context */
197 typedef enum eSpaceButtons_Texture_Context {
198 SB_TEXC_MAT_OR_LAMP = 0,
201 SB_TEXC_PARTICLES = 3,
202 } eSpaceButtons_Texture_Context;
205 typedef enum eSpaceButtons_Align {
210 } eSpaceButtons_Align;
213 #define BUTS_SENS_SEL 1
214 #define BUTS_SENS_ACT 2
215 #define BUTS_SENS_LINK 4
216 #define BUTS_CONT_SEL 8
217 #define BUTS_CONT_ACT 16
218 #define BUTS_CONT_LINK 32
219 #define BUTS_ACT_SEL 64
220 #define BUTS_ACT_ACT 128
221 #define BUTS_ACT_LINK 256
222 #define BUTS_SENS_STATE 512
223 #define BUTS_ACT_STATE 1024
224 #define BUTS_CONT_INIT_STATE 2048
227 /* Outliner =============================================== */
230 typedef struct SpaceOops {
231 SpaceLink *next, *prev;
232 ListBase regionbase; /* storage of regions for inactive spaces */
234 float blockscale DNA_DEPRECATED;
235 short blockhandler[8] DNA_DEPRECATED;
237 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
240 struct TreeStore *treestore;
243 char search_string[32];
244 struct TreeStoreElem search_tse;
246 short flag, outlinevis, storeflag, search_flags;
250 /* SpaceOops->flag */
251 typedef enum eSpaceOutliner_Flag {
252 SO_TESTBLOCKS = (1 << 0),
253 SO_NEWSELECTED = (1 << 1),
254 SO_HIDE_RESTRICTCOLS = (1 << 2),
255 SO_HIDE_KEYINGSETINFO = (1 << 3),
256 } eSpaceOutliner_Flag;
258 /* SpaceOops->outlinevis */
259 typedef enum eSpaceOutliner_Mode {
268 /* SO_VERSE_SESSION = 8, */ /* deprecated! */
269 /* SO_VERSE_MS = 9, */ /* deprecated!*/
274 } eSpaceOutliner_Mode;
276 /* SpaceOops->storeflag */
277 typedef enum eSpaceOutliner_StoreFlag {
279 SO_TREESTORE_CLEANUP = (1 << 0),
280 /* if set, it allows redraws. gets set for some allqueue events */
281 SO_TREESTORE_REDRAW = (1 << 1),
282 } eSpaceOutliner_StoreFlag;
284 /* outliner search flags (SpaceOops->search_flags) */
285 typedef enum eSpaceOutliner_Search_Flags {
286 SO_FIND_CASE_SENSITIVE = (1 << 0),
287 SO_FIND_COMPLETE = (1 << 1),
288 SO_SEARCH_RECURSIVE = (1 << 2),
289 } eSpaceOutliner_Search_Flags;
292 /* Graph Editor ========================================= */
294 /* 'Graph' Editor (formerly known as the IPO Editor) */
295 typedef struct SpaceIpo {
296 SpaceLink *next, *prev;
297 ListBase regionbase; /* storage of regions for inactive spaces */
299 float blockscale DNA_DEPRECATED;
300 short blockhandler[8] DNA_DEPRECATED;
302 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
304 struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
306 ListBase ghostCurves; /* sampled snapshots of F-Curves used as in-session guides */
308 short mode; /* mode for the Graph editor (eGraphEdit_Mode) */
309 short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */
310 int flag; /* settings for Graph editor (eGraphEdit_Flag) */
312 float cursorVal; /* cursor value (y-value, x-value is current frame) */
313 int around; /* pivot point for transforms */
317 /* SpaceIpo->flag (Graph Editor Settings) */
318 typedef enum eGraphEdit_Flag {
319 /* OLD DEPRECEATED SETTING */
320 /* SIPO_LOCK_VIEW = (1 << 0), */
322 /* don't merge keyframes on the same frame after a transform */
323 SIPO_NOTRANSKEYCULL = (1 << 1),
324 /* don't show any keyframe handles at all */
325 SIPO_NOHANDLES = (1 << 2),
326 /* don't show current frame number beside indicator line */
327 SIPO_NODRAWCFRANUM = (1 << 3),
328 /* show timing in seconds instead of frames */
329 SIPO_DRAWTIME = (1 << 4),
330 /* only show keyframes for selected F-Curves */
331 SIPO_SELCUVERTSONLY = (1 << 5),
332 /* draw names of F-Curves beside the respective curves */
333 /* NOTE: currently not used */
334 SIPO_DRAWNAMES = (1 << 6),
335 /* show sliders in channels list */
336 SIPO_SLIDERS = (1 << 7),
337 /* don't show the horizontal component of the cursor */
338 SIPO_NODRAWCURSOR = (1 << 8),
339 /* only show handles of selected keyframes */
340 SIPO_SELVHANDLESONLY = (1 << 9),
341 /* temporary flag to force channel selections to be synced with main */
342 SIPO_TEMP_NEEDCHANSYNC = (1 << 10),
343 /* don't perform realtime updates */
344 SIPO_NOREALTIMEUPDATES = (1 << 11),
345 /* don't draw curves with AA ("beauty-draw") for performance */
346 SIPO_BEAUTYDRAW_OFF = (1 << 12),
347 /* draw grouped channels with colors set in group */
348 SIPO_NODRAWGCOLORS = (1 << 13),
351 /* SpaceIpo->mode (Graph Editor Mode) */
352 typedef enum eGraphEdit_Mode {
353 /* all animation curves (from all over Blender) */
354 SIPO_MODE_ANIMATION = 0,
356 SIPO_MODE_DRIVERS = 1,
360 /* NLA Editor ============================================= */
363 typedef struct SpaceNla {
364 struct SpaceLink *next, *prev;
365 ListBase regionbase; /* storage of regions for inactive spaces */
367 float blockscale DNA_DEPRECATED;
368 short blockhandler[8] DNA_DEPRECATED;
370 short autosnap; /* this uses the same settings as autosnap for Action Editor */
374 struct bDopeSheet *ads;
375 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
379 typedef enum eSpaceNla_Flag {
380 /* flags (1<<0), (1<<1), and (1<<3) are deprecated flags from old verisons */
382 /* draw timing in seconds instead of frames */
383 SNLA_DRAWTIME = (1 << 2),
384 /* don't draw frame number beside frame indicator */
385 SNLA_NODRAWCFRANUM = (1 << 4),
386 /* don't draw influence curves on strips */
387 SNLA_NOSTRIPCURVES = (1 << 5),
388 /* don't perform realtime updates */
389 SNLA_NOREALTIMEUPDATES = (1 << 6),
393 /* Timeline =============================================== */
395 /* Pointcache drawing data */
396 # /* Only store the data array in the cache to avoid constant reallocation. */
397 # /* No need to store when saved. */
398 typedef struct SpaceTimeCache {
399 struct SpaceTimeCache *next, *prev;
404 typedef struct SpaceTime {
405 SpaceLink *next, *prev;
406 ListBase regionbase; /* storage of regions for inactive spaces */
408 float blockscale DNA_DEPRECATED;
410 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
420 typedef enum eTimeline_Flag {
421 /* show timing in frames instead of in seconds */
422 TIME_DRAWFRAMES = (1 << 0),
423 /* show time indicator box beside the frame number */
424 TIME_CFRA_NUM = (1 << 1),
425 /* only keyframes from active/selected channels get shown */
426 TIME_ONLYACTSEL = (1 << 2),
429 /* time->redraws (now screen->redraws_flag) */
430 typedef enum eScreen_Redraws_Flag {
431 TIME_REGION = (1 << 0),
432 TIME_ALL_3D_WIN = (1 << 1),
433 TIME_ALL_ANIM_WIN = (1 << 2),
434 TIME_ALL_BUTS_WIN = (1 << 3),
435 TIME_WITH_SEQ_AUDIO = (1 << 4), /* DEPRECATED */
437 TIME_ALL_IMAGE_WIN = (1 << 6),
438 TIME_CONTINUE_PHYSICS = (1 << 7), /* UNUSED */
439 TIME_NODES = (1 << 8),
440 TIME_CLIPS = (1 << 9),
441 } eScreen_Redraws_Flag;
444 typedef enum eTimeline_Cache_Flag {
445 TIME_CACHE_DISPLAY = (1 << 0),
446 TIME_CACHE_SOFTBODY = (1 << 1),
447 TIME_CACHE_PARTICLES = (1 << 2),
448 TIME_CACHE_CLOTH = (1 << 3),
449 TIME_CACHE_SMOKE = (1 << 4),
450 TIME_CACHE_DYNAMICPAINT = (1 << 5),
451 TIME_CACHE_RIGIDBODY = (1 << 6),
452 } eTimeline_Cache_Flag;
455 /* Sequence Editor ======================================= */
458 typedef struct SpaceSeq {
459 SpaceLink *next, *prev;
460 ListBase regionbase; /* storage of regions for inactive spaces */
462 float blockscale DNA_DEPRECATED;
464 short blockhandler[8] DNA_DEPRECATED;
466 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
468 float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
469 short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
474 float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
475 int view; /* see SEQ_VIEW_* below */
478 struct bGPdata *gpd; /* grease-pencil data */
480 struct SequencerScopes scopes; /* different scoped displayed in space */
485 typedef enum eSpaceSeq_RegionType {
486 SEQ_DRAW_SEQUENCE = 0,
487 SEQ_DRAW_IMG_IMBUF = 1,
488 SEQ_DRAW_IMG_WAVEFORM = 2,
489 SEQ_DRAW_IMG_VECTORSCOPE = 3,
490 SEQ_DRAW_IMG_HISTOGRAM = 4,
491 } eSpaceSeq_RegionType;
494 typedef enum eSpaceSeq_Flag {
495 SEQ_DRAWFRAMES = (1 << 0),
496 SEQ_MARKER_TRANS = (1 << 1),
497 SEQ_DRAW_COLOR_SEPARATED = (1 << 2),
498 SEQ_DRAW_SAFE_MARGINS = (1 << 3),
499 SEQ_SHOW_GPENCIL = (1 << 4),
500 SEQ_NO_DRAW_CFRANUM = (1 << 5),
504 typedef enum eSpaceSeq_Displays {
505 SEQ_VIEW_SEQUENCE = 1,
506 SEQ_VIEW_PREVIEW = 2,
507 SEQ_VIEW_SEQUENCE_PREVIEW = 3,
510 /* sseq->render_size */
511 typedef enum eSpaceSeq_Proxy_RenderSize {
512 SEQ_PROXY_RENDER_SIZE_NONE = -1,
513 SEQ_PROXY_RENDER_SIZE_SCENE = 0,
514 SEQ_PROXY_RENDER_SIZE_25 = 25,
515 SEQ_PROXY_RENDER_SIZE_50 = 50,
516 SEQ_PROXY_RENDER_SIZE_75 = 75,
517 SEQ_PROXY_RENDER_SIZE_100 = 99,
518 SEQ_PROXY_RENDER_SIZE_FULL = 100
519 } eSpaceSeq_Proxy_RenderSize;
521 typedef struct MaskSpaceInfo
523 /* **** mask editing **** */
532 typedef enum eSpaceSeq_OverlayType {
533 SEQ_DRAW_OVERLAY_RECT = 0,
534 SEQ_DRAW_OVERLAY_REFERENCE = 1,
535 SEQ_DRAW_OVERLAY_CURRENT = 2
536 } eSpaceSeq_OverlayType;
538 /* File Selector ========================================== */
540 /* Config and Input for File Selector */
541 typedef struct FileSelectParams {
542 char title[96]; /* title, also used for the text of the execute button */
543 char dir[1056]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 32, this is for extreme case when 1023 length path
544 * needs to be linked in, where foo.blend/Armature need adding */
545 char file[256]; /* file */
546 char renamefile[256];
547 char renameedit[256]; /* annoying but the first is only used for initialization */
549 char filter_glob[64]; /* list of filetypes to filter */
556 short type; /* XXXXX for now store type here, should be moved to the operator */
557 short flag; /* settings for filter, hiding dots files,... */
558 short sort; /* sort order */
559 short display; /* display mode flag */
560 short filter; /* filter when (flags & FILE_FILTER) is true */
562 /* XXX --- still unused -- */
563 short f_fp; /* show font preview */
564 char fp_str[8]; /* string to use for font preview */
566 /* XXX --- end unused -- */
570 typedef struct SpaceFile {
571 SpaceLink *next, *prev;
572 ListBase regionbase; /* storage of regions for inactive spaces */
577 struct FileSelectParams *params; /* config and input for file select */
579 struct FileList *files; /* holds the list of files to show */
581 ListBase *folders_prev; /* holds the list of previous directories to show */
582 ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */
584 /* operator that is invoking fileselect
585 * op->exec() will be called on the 'Load' button.
586 * if operator provides op->cancel(), then this will be invoked
587 * on the cancel button.
589 struct wmOperator *op;
591 struct wmTimer *smoothscroll_timer;
593 struct FileLayout *layout;
595 short recentnr, bookmarknr;
596 short systemnr, pad2;
600 /* FileSelectParams.display */
601 enum FileDisplayTypeE {
602 FILE_DEFAULTDISPLAY = 0,
603 FILE_SHORTDISPLAY = 1,
604 FILE_LONGDISPLAY = 2,
608 /* FileSelectParams.sort */
612 FILE_SORT_EXTENSION = 2,
617 /* these values need to be hardcoded in structs, dna does not recognize defines */
618 /* also defined in BKE */
619 #define FILE_MAXDIR 768
620 #define FILE_MAXFILE 256
621 #define FILE_MAX 1024
623 #define FILE_MAX_LIBEXTRA (FILE_MAX + MAX_ID_NAME)
627 #define FILE_BLENDER 8 /* don't display relative paths */
628 #define FILE_SPECIAL 9
630 #define FILE_LOADLIB 1
632 #define FILE_LOADFONT 3
634 /* filesel op property -> action */
635 typedef enum eFileSel_Action {
640 /* sfile->params->flag and simasel->flag */
641 typedef enum eFileSel_Params_Flag {
642 FILE_SHOWSHORT = (1 << 0),
643 FILE_RELPATH = (1 << 1), /* was FILE_STRINGCODE */
644 FILE_LINK = (1 << 2),
645 FILE_HIDE_DOT = (1 << 3),
646 FILE_AUTOSELECT = (1 << 4),
647 FILE_ACTIVELAY = (1 << 5),
648 /* FILE_ATCURSOR = (1 << 6), */ /* deprecated */
649 FILE_DIRSEL_ONLY = (1 << 7),
650 FILE_FILTER = (1 << 8),
651 FILE_BOOKMARKS = (1 << 9),
652 FILE_GROUP_INSTANCE = (1 << 10),
653 } eFileSel_Params_Flag;
656 /* files in filesel list: file types */
657 typedef enum eFileSel_File_Types {
658 BLENDERFILE = (1 << 2),
659 BLENDERFILE_BACKUP = (1 << 3),
660 IMAGEFILE = (1 << 4),
661 MOVIEFILE = (1 << 5),
662 PYSCRIPTFILE = (1 << 6),
663 FTFONTFILE = (1 << 7),
664 SOUNDFILE = (1 << 8),
666 MOVIEFILE_ICON = (1 << 10), /* movie file that preview can't load */
667 FOLDERFILE = (1 << 11), /* represents folders for filtering */
669 COLLADAFILE = (1 << 13),
670 OPERATORFILE = (1 << 14), /* from filter_glob operator property */
671 } eFileSel_File_Types;
673 /* Selection Flags in filesel: struct direntry, unsigned char selflag */
674 typedef enum eDirEntry_SelectFlag {
675 /* ACTIVE_FILE = (1 << 1), */ /* UNUSED */
676 HILITED_FILE = (1 << 2),
677 SELECTED_FILE = (1 << 3),
678 EDITING_FILE = (1 << 4),
679 } eDirEntry_SelectFlag;
681 /* Image/UV Editor ======================================== */
683 /* Image/UV Editor */
684 typedef struct SpaceImage {
685 SpaceLink *next, *prev;
686 ListBase regionbase; /* storage of regions for inactive spaces */
692 struct ImageUser iuser;
694 struct CurveMapping *cumap DNA_DEPRECATED; /* was switched to scene's color management settings */
696 struct Scopes scopes; /* histogram waveform and vectorscope */
697 struct Histogram sample_line_hist; /* sample line histogram */
699 struct bGPdata *gpd; /* grease pencil data */
701 float cursor[2]; /* UV editor 2d cursor */
702 float xof, yof; /* user defined offset, image is centered */
703 float zoom; /* user defined zoom level */
704 float centx, centy; /* storage for offset while render drawing */
706 char mode; /* view/paint/mask */
709 short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */
711 char dt_uv; /* UV draw type */
712 char sticky; /* sticky selection type */
716 MaskSpaceInfo mask_info;
720 /* SpaceImage->dt_uv */
721 typedef enum eSpaceImage_UVDT {
728 /* SpaceImage->dt_uvstretch */
729 typedef enum eSpaceImage_UVDT_Stretch {
730 SI_UVDT_STRETCH_ANGLE = 0,
731 SI_UVDT_STRETCH_AREA = 1,
732 } eSpaceImage_UVDT_Stretch;
734 /* SpaceImage->mode */
735 typedef enum eSpaceImage_Mode {
738 SI_MODE_MASK = 2 /* note: mesh edit mode overrides mask */
741 /* SpaceImage->sticky
742 * Note DISABLE should be 0, however would also need to re-arrange icon order,
743 * also, sticky loc is the default mode so this means we don't need to 'do_versons' */
744 typedef enum eSpaceImage_Sticky {
746 SI_STICKY_DISABLE = 1,
747 SI_STICKY_VERTEX = 2,
748 } eSpaceImage_Sticky;
750 /* SpaceImage->flag */
751 typedef enum eSpaceImage_Flag {
752 /* SI_BE_SQUARE = (1 << 0), */ /* deprecated */
753 SI_EDITTILE = (1 << 1), /* XXX - not used but should be? */
754 SI_CLIP_UV = (1 << 2),
755 /* SI_DRAWTOOL = (1 << 3), */ /* deprecated */
756 SI_NO_DRAWFACES = (1 << 4),
757 SI_DRAWSHADOW = (1 << 5),
758 /* SI_SELACTFACE = (1 << 6), */ /* deprecated */
759 /* SI_DEPRECATED2 = (1 << 7), */ /* deprecated */
760 /* SI_DEPRECATED3 = (1 << 8), */ /* deprecated */
761 SI_COORDFLOATS = (1 << 9),
762 SI_PIXELSNAP = (1 << 10),
763 SI_LIVE_UNWRAP = (1 << 11),
764 SI_USE_ALPHA = (1 << 12),
765 SI_SHOW_ALPHA = (1 << 13),
766 SI_SHOW_ZBUF = (1 << 14),
768 /* next two for render window display */
769 SI_PREVSPACE = (1 << 15),
770 SI_FULLWINDOW = (1 << 16),
772 /* SI_DEPRECATED4 = (1 << 17), */ /* deprecated */
773 /* SI_DEPRECATED5 = (1 << 18), */ /* deprecated */
775 /* this means that the image is drawn until it reaches the view edge,
776 * in the image view, its unrelated to the 'tile' mode for texface
778 SI_DRAW_TILE = (1 << 19),
779 SI_SMOOTH_UV = (1 << 20),
780 SI_DRAW_STRETCH = (1 << 21),
781 SI_SHOW_GPENCIL = (1 << 22),
782 SI_DRAW_OTHER = (1 << 23),
784 SI_COLOR_CORRECTION = (1 << 24),
787 /* Text Editor ============================================ */
790 typedef struct SpaceText {
791 SpaceLink *next, *prev;
792 ListBase regionbase; /* storage of regions for inactive spaces */
794 float blockscale DNA_DEPRECATED;
795 short blockhandler[8] DNA_DEPRECATED;
802 short lheight; /* user preference, is font_size! */
803 char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */
811 short live_edit; /* run python while editing, evil */
814 struct rcti txtscroll, txtbar;
816 int wordwrap, doplugins;
818 char findstr[256]; /* ST_MAX_FIND_STR */
819 char replacestr[256]; /* ST_MAX_FIND_STR */
821 short margin_column; /* column number to show right margin at */
822 short lheight_dpi; /* actual lineheight, dpi controlled */
825 void *drawcache; /* cache for faster drawing */
829 /* SpaceText flags (moved from DNA_text_types.h) */
830 typedef enum eSpaceText_Flags {
832 ST_SCROLL_SELECT = (1 << 0),
833 /* clear namespace after script execution (BPY_main.c) */
834 ST_CLEAR_NAMESPACE = (1 << 4),
836 ST_FIND_WRAP = (1 << 5),
837 ST_FIND_ALL = (1 << 6),
838 ST_SHOW_MARGIN = (1 << 7),
839 ST_MATCH_CASE = (1 << 8),
842 /* stext->findstr/replacestr */
843 #define ST_MAX_FIND_STR 256
845 /* Script View (Obsolete) ================================== */
847 /* Script Runtime Data - Obsolete (pre 2.5) */
848 typedef struct Script {
854 void *py_browsercallback;
857 int flags, lastspace;
858 /* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */
859 char scriptname[1024]; /* 1024 = FILE_MAX */
860 char scriptarg[256]; /* 1024 = FILE_MAX */
862 #define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0
864 /* Script View - Obsolete (pre 2.5) */
865 typedef struct SpaceScript {
866 SpaceLink *next, *prev;
867 ListBase regionbase; /* storage of regions for inactive spaces */
869 float blockscale DNA_DEPRECATED;
870 struct Script *script;
878 /* Nodes Editor =========================================== */
881 typedef struct SpaceNode {
882 SpaceLink *next, *prev;
883 ListBase regionbase; /* storage of regions for inactive spaces */
885 float blockscale DNA_DEPRECATED;
886 short blockhandler[8] DNA_DEPRECATED;
888 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
890 struct ID *id, *from; /* context, no need to save in file? well... pinning... */
891 short flag, pad1; /* menunr: browse id block in header */
892 float aspect, pad2; /* internal state variables */
894 float xof, yof; /* offset for drawing the backdrop */
895 float zoom; /* zoom for backdrop */
896 float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */
898 struct bNodeTree *nodetree, *edittree;
899 int treetype; /* treetype: as same nodetree->type */
900 short texfrom; /* texfrom object, world or brush */
901 short shaderfrom; /* shader from object or world */
902 short recalc; /* currently on 0/1, for auto compo */
904 ListBase linkdrag; /* temporary data for modal linking operator */
906 struct bGPdata *gpd; /* grease-pencil data */
910 typedef enum eSpaceNode_Flag {
911 SNODE_BACKDRAW = (1 << 1),
912 SNODE_SHOW_GPENCIL = (1 << 2),
913 SNODE_USE_ALPHA = (1 << 3),
914 SNODE_SHOW_ALPHA = (1 << 4),
915 SNODE_SHOW_R = (1 << 7),
916 SNODE_SHOW_G = (1 << 8),
917 SNODE_SHOW_B = (1 << 9),
918 SNODE_AUTO_RENDER = (1 << 5),
919 SNODE_SHOW_HIGHLIGHT = (1 << 6),
920 SNODE_USE_HIDDEN_PREVIEW = (1 << 10),
921 SNODE_NEW_SHADERS = (1 << 11),
925 typedef enum eSpaceNode_TexFrom {
926 SNODE_TEX_OBJECT = 0,
929 } eSpaceNode_TexFrom;
931 /* snode->shaderfrom */
932 typedef enum eSpaceNode_ShaderFrom {
933 SNODE_SHADER_OBJECT = 0,
934 SNODE_SHADER_WORLD = 1,
935 } eSpaceNode_ShaderFrom;
937 /* Game Logic Editor ===================================== */
940 typedef struct SpaceLogic {
941 SpaceLink *next, *prev;
942 ListBase regionbase; /* storage of regions for inactive spaces */
944 float blockscale DNA_DEPRECATED;
946 short blockhandler[8] DNA_DEPRECATED;
951 struct bGPdata *gpd; /* grease-pencil data */
954 /* Console ================================================ */
956 /* Console content */
957 typedef struct ConsoleLine {
958 struct ConsoleLine *next, *prev;
960 /* keep these 3 vars so as to share free, realloc funcs */
961 int len_alloc; /* allocated length */
962 int len; /* real len - strlen() */
966 int type; /* only for use when in the 'scrollback' listbase */
969 /* ConsoleLine.type */
970 typedef enum eConsoleLine_Type {
971 CONSOLE_LINE_OUTPUT = 0,
972 CONSOLE_LINE_INPUT = 1,
973 CONSOLE_LINE_INFO = 2, /* autocomp feedback */
974 CONSOLE_LINE_ERROR = 3
979 typedef struct SpaceConsole {
980 SpaceLink *next, *prev;
981 ListBase regionbase; /* storage of regions for inactive spaces */
983 float blockscale DNA_DEPRECATED; // XXX are these needed?
984 short blockhandler[8] DNA_DEPRECATED; // XXX are these needed?
989 ListBase scrollback; /* ConsoleLine; output */
990 ListBase history; /* ConsoleLine; command history, current edited line is the first */
992 char language[32]; /* multiple consoles are possible, not just python */
999 /* User Preferences ======================================= */
1001 /* User Preferences View */
1002 typedef struct SpaceUserPref {
1003 SpaceLink *next, *prev;
1004 ListBase regionbase; /* storage of regions for inactive spaces */
1009 char filter[64]; /* search term for filtering in the UI */
1012 /* Motion Tracking ======================================== */
1015 typedef struct SpaceClip {
1016 SpaceLink *next, *prev;
1017 ListBase regionbase; /* storage of regions for inactive spaces */
1020 float xof, yof; /* user defined offset, image is centered */
1021 float xlockof, ylockof; /* user defined offset from locked position */
1022 float zoom; /* user defined zoom level */
1024 struct MovieClipUser user; /* user of clip */
1025 struct MovieClip *clip; /* clip data */
1026 struct MovieClipScopes scopes; /* different scoped displayed in space panels */
1028 int flag; /* flags */
1029 short mode; /* editor mode (editing context being displayed) */
1030 short view; /* type of the clip editor view */
1032 int path_length; /* length of displaying path, in frames */
1034 /* current stabilization data */
1035 float loc[2], scale, angle; /* pre-composed stabilization data */
1037 float stabmat[4][4], unistabmat[4][4]; /* current stabilization matrix and the same matrix in unified space,
1038 * defined when drawing and used for mouse position calculation */
1040 /* movie postprocessing */
1044 short gpencil_src, pad2;
1048 int around, pad4; /* pivot point for transforms */
1050 MaskSpaceInfo mask_info;
1053 /* SpaceClip->flag */
1054 typedef enum eSpaceClip_Flag {
1055 SC_SHOW_MARKER_PATTERN = (1 << 0),
1056 SC_SHOW_MARKER_SEARCH = (1 << 1),
1057 SC_LOCK_SELECTION = (1 << 2),
1058 SC_SHOW_TINY_MARKER = (1 << 3),
1059 SC_SHOW_TRACK_PATH = (1 << 4),
1060 SC_SHOW_BUNDLES = (1 << 5),
1061 SC_MUTE_FOOTAGE = (1 << 6),
1062 SC_HIDE_DISABLED = (1 << 7),
1063 SC_SHOW_NAMES = (1 << 8),
1064 SC_SHOW_GRID = (1 << 9),
1065 SC_SHOW_STABLE = (1 << 10),
1066 SC_MANUAL_CALIBRATION = (1 << 11),
1067 SC_SHOW_GPENCIL = (1 << 12),
1068 SC_SHOW_FILTERS = (1 << 13),
1069 SC_SHOW_GRAPH_FRAMES = (1 << 14),
1070 SC_SHOW_GRAPH_TRACKS = (1 << 15),
1071 /* SC_SHOW_PYRAMID_LEVELS = (1 << 16), */ /* UNUSED */
1072 SC_LOCK_TIMECURSOR = (1 << 17),
1073 SC_SHOW_SECONDS = (1 << 18),
1074 SC_SHOW_GRAPH_SEL_ONLY = (1 << 19),
1075 SC_SHOW_GRAPH_HIDDEN = (1 << 20),
1078 /* SpaceClip->mode */
1079 typedef enum eSpaceClip_Mode {
1080 SC_MODE_TRACKING = 0,
1081 SC_MODE_RECONSTRUCTION = 1,
1082 SC_MODE_DISTORTION = 2,
1083 SC_MODE_MASKEDIT = 3,
1086 /* SpaceClip->view */
1087 typedef enum eSpaceClip_View {
1090 SC_VIEW_DOPESHEET = 2,
1093 /* SpaceClip->gpencil_src */
1094 typedef enum eSpaceClip_GPencil_Source {
1095 SC_GPENCIL_SRC_CLIP = 0,
1096 SC_GPENCIL_SRC_TRACK = 1,
1097 } eSpaceClip_GPencil_Source;
1099 /* **************** SPACE DEFINES ********************* */
1101 /* headerbuttons: 450-499 */
1102 #define B_IMASELHOME 451
1103 #define B_IMASELREMOVEBIP 452
1106 /* space types, moved from DNA_screen_types.h */
1107 /* Do NOT change order, append on end. types are hardcoded needed */
1108 typedef enum eSpace_Type {
1119 SPACE_IMASEL = 10, /* deprecated */
1120 SPACE_SOUND = 11, /* Deprecated */
1123 SPACE_SCRIPT = 14, /* Deprecated */
1128 SPACE_USERPREF = 19,
1131 SPACEICONMAX = SPACE_CLIP
1134 #define IMG_SIZE_FALLBACK 256