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
32 * Structs for each of space type in the user interface.
35 #ifndef __DNA_SPACE_TYPES_H__
36 #define __DNA_SPACE_TYPES_H__
39 #include "DNA_listBase.h"
40 #include "DNA_color_types.h" /* for Histogram */
41 #include "DNA_vec_types.h"
42 #include "DNA_outliner_types.h" /* for TreeStoreElem */
43 #include "DNA_image_types.h" /* ImageUser */
44 #include "DNA_movieclip_types.h" /* MovieClipUser */
45 #include "DNA_sequence_types.h" /* SequencerScopes */
46 #include "DNA_node_types.h" /* for bNodeInstanceKey */
47 /* Hum ... Not really nice... but needed for spacebuts. */
48 #include "DNA_view2d_types.h"
66 struct FileSelectParams;
73 struct MovieClipScopes;
77 /* SpaceLink (Base) ==================================== */
80 * The base structure all the other spaces
81 * are derived (implicitly) from. Would be
82 * good to make this explicit.
84 typedef struct SpaceLink {
85 struct SpaceLink *next, *prev;
86 ListBase regionbase; /* storage of regions for inactive spaces */
88 float blockscale DNA_DEPRECATED; /* XXX make deprecated */
89 short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
93 /* Space Info ========================================== */
96 typedef struct SpaceInfo {
97 SpaceLink *next, *prev;
98 ListBase regionbase; /* storage of regions for inactive spaces */
100 float blockscale DNA_DEPRECATED;
101 short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
107 /* SpaceInfo.rpt_mask */
108 typedef enum eSpaceInfo_RptMask {
109 INFO_RPT_DEBUG = (1 << 0),
110 INFO_RPT_INFO = (1 << 1),
111 INFO_RPT_OP = (1 << 2),
112 INFO_RPT_WARN = (1 << 3),
113 INFO_RPT_ERR = (1 << 4),
114 } eSpaceInfo_RptMask;
117 /* Properties Editor ==================================== */
119 /* Properties Editor */
120 typedef struct SpaceButs {
121 SpaceLink *next, *prev;
122 ListBase regionbase; /* storage of regions for inactive spaces */
124 float blockscale DNA_DEPRECATED;
126 short blockhandler[8] DNA_DEPRECATED;
128 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
130 short mainb, mainbo, mainbuser; /* context tabs */
131 short re_align, align; /* align for panels */
132 short preview; /* preview is signal to refresh */
133 short texture_context; /* texture context selector (material, world, brush)*/
136 void *path; /* runtime */
137 int pathflag, dataicon; /* runtime */
143 /* button defines (deprecated) */
144 /* warning: the values of these defines are used in sbuts->tabs[8] */
145 /* sbuts->mainb new */
146 #define CONTEXT_SCENE 0
147 #define CONTEXT_OBJECT 1
148 #define CONTEXT_TYPES 2
149 #define CONTEXT_SHADING 3
150 #define CONTEXT_EDITING 4
151 #define CONTEXT_SCRIPT 5
152 #define CONTEXT_LOGIC 6
154 /* sbuts->mainb old (deprecated) */
161 #define BUTS_RENDER 6
164 #define BUTS_FPAINT 9
165 #define BUTS_RADIO 10
166 #define BUTS_SCRIPT 11
167 #define BUTS_SOUND 12
168 #define BUTS_CONSTRAINT 13
169 #define BUTS_EFFECTS 14
171 /* buts->mainb new */
172 typedef enum eSpaceButtons_Context {
178 BCONTEXT_MATERIAL = 5,
179 BCONTEXT_TEXTURE = 6,
180 BCONTEXT_PARTICLE = 7,
181 BCONTEXT_PHYSICS = 8,
183 BCONTEXT_MODIFIER = 10,
184 BCONTEXT_CONSTRAINT = 11,
185 BCONTEXT_BONE_CONSTRAINT = 12,
187 /* always as last... */
189 } eSpaceButtons_Context;
193 #define SB_PIN_CONTEXT 2
194 //#define SB_WORLD_TEX 4 //not used anymore
195 //#define SB_BRUSH_TEX 8 //not used anymore
196 #define SB_SHADING_CONTEXT 16
198 /* sbuts->texture_context */
199 typedef enum eSpaceButtons_Texture_Context {
200 SB_TEXC_MAT_OR_LAMP = 0,
203 SB_TEXC_PARTICLES = 3,
204 } eSpaceButtons_Texture_Context;
207 typedef enum eSpaceButtons_Align {
212 } eSpaceButtons_Align;
215 #define BUTS_SENS_SEL 1
216 #define BUTS_SENS_ACT 2
217 #define BUTS_SENS_LINK 4
218 #define BUTS_CONT_SEL 8
219 #define BUTS_CONT_ACT 16
220 #define BUTS_CONT_LINK 32
221 #define BUTS_ACT_SEL 64
222 #define BUTS_ACT_ACT 128
223 #define BUTS_ACT_LINK 256
224 #define BUTS_SENS_STATE 512
225 #define BUTS_ACT_STATE 1024
226 #define BUTS_CONT_INIT_STATE 2048
229 /* Outliner =============================================== */
232 typedef struct SpaceOops {
233 SpaceLink *next, *prev;
234 ListBase regionbase; /* storage of regions for inactive spaces */
236 float blockscale DNA_DEPRECATED;
237 short blockhandler[8] DNA_DEPRECATED;
239 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
242 struct TreeStore *treestore;
245 char search_string[32];
246 struct TreeStoreElem search_tse;
248 short flag, outlinevis, storeflag, search_flags;
252 /* SpaceOops->flag */
253 typedef enum eSpaceOutliner_Flag {
254 SO_TESTBLOCKS = (1 << 0),
255 SO_NEWSELECTED = (1 << 1),
256 SO_HIDE_RESTRICTCOLS = (1 << 2),
257 SO_HIDE_KEYINGSETINFO = (1 << 3),
258 } eSpaceOutliner_Flag;
260 /* SpaceOops->outlinevis */
261 typedef enum eSpaceOutliner_Mode {
270 /* SO_VERSE_SESSION = 8, */ /* deprecated! */
271 /* SO_VERSE_MS = 9, */ /* deprecated!*/
276 } eSpaceOutliner_Mode;
278 /* SpaceOops->storeflag */
279 typedef enum eSpaceOutliner_StoreFlag {
281 SO_TREESTORE_CLEANUP = (1 << 0),
282 /* if set, it allows redraws. gets set for some allqueue events */
283 SO_TREESTORE_REDRAW = (1 << 1),
284 } eSpaceOutliner_StoreFlag;
286 /* outliner search flags (SpaceOops->search_flags) */
287 typedef enum eSpaceOutliner_Search_Flags {
288 SO_FIND_CASE_SENSITIVE = (1 << 0),
289 SO_FIND_COMPLETE = (1 << 1),
290 SO_SEARCH_RECURSIVE = (1 << 2),
291 } eSpaceOutliner_Search_Flags;
294 /* Graph Editor ========================================= */
296 /* 'Graph' Editor (formerly known as the IPO Editor) */
297 typedef struct SpaceIpo {
298 SpaceLink *next, *prev;
299 ListBase regionbase; /* storage of regions for inactive spaces */
301 float blockscale DNA_DEPRECATED;
302 short blockhandler[8] DNA_DEPRECATED;
304 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
306 struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
308 ListBase ghostCurves; /* sampled snapshots of F-Curves used as in-session guides */
310 short mode; /* mode for the Graph editor (eGraphEdit_Mode) */
311 short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */
312 int flag; /* settings for Graph editor (eGraphEdit_Flag) */
314 float cursorVal; /* cursor value (y-value, x-value is current frame) */
315 int around; /* pivot point for transforms */
319 /* SpaceIpo->flag (Graph Editor Settings) */
320 typedef enum eGraphEdit_Flag {
321 /* OLD DEPRECEATED SETTING */
322 /* SIPO_LOCK_VIEW = (1 << 0), */
324 /* don't merge keyframes on the same frame after a transform */
325 SIPO_NOTRANSKEYCULL = (1 << 1),
326 /* don't show any keyframe handles at all */
327 SIPO_NOHANDLES = (1 << 2),
328 /* don't show current frame number beside indicator line */
329 SIPO_NODRAWCFRANUM = (1 << 3),
330 /* show timing in seconds instead of frames */
331 SIPO_DRAWTIME = (1 << 4),
332 /* only show keyframes for selected F-Curves */
333 SIPO_SELCUVERTSONLY = (1 << 5),
334 /* draw names of F-Curves beside the respective curves */
335 /* NOTE: currently not used */
336 SIPO_DRAWNAMES = (1 << 6),
337 /* show sliders in channels list */
338 SIPO_SLIDERS = (1 << 7),
339 /* don't show the horizontal component of the cursor */
340 SIPO_NODRAWCURSOR = (1 << 8),
341 /* only show handles of selected keyframes */
342 SIPO_SELVHANDLESONLY = (1 << 9),
343 /* temporary flag to force channel selections to be synced with main */
344 SIPO_TEMP_NEEDCHANSYNC = (1 << 10),
345 /* don't perform realtime updates */
346 SIPO_NOREALTIMEUPDATES = (1 << 11),
347 /* don't draw curves with AA ("beauty-draw") for performance */
348 SIPO_BEAUTYDRAW_OFF = (1 << 12),
349 /* draw grouped channels with colors set in group */
350 SIPO_NODRAWGCOLORS = (1 << 13),
353 /* SpaceIpo->mode (Graph Editor Mode) */
354 typedef enum eGraphEdit_Mode {
355 /* all animation curves (from all over Blender) */
356 SIPO_MODE_ANIMATION = 0,
358 SIPO_MODE_DRIVERS = 1,
362 /* NLA Editor ============================================= */
365 typedef struct SpaceNla {
366 struct SpaceLink *next, *prev;
367 ListBase regionbase; /* storage of regions for inactive spaces */
369 float blockscale DNA_DEPRECATED;
370 short blockhandler[8] DNA_DEPRECATED;
372 short autosnap; /* this uses the same settings as autosnap for Action Editor */
376 struct bDopeSheet *ads;
377 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
381 typedef enum eSpaceNla_Flag {
382 /* flags (1<<0), (1<<1), and (1<<3) are deprecated flags from old verisons */
384 /* draw timing in seconds instead of frames */
385 SNLA_DRAWTIME = (1 << 2),
386 /* don't draw frame number beside frame indicator */
387 SNLA_NODRAWCFRANUM = (1 << 4),
388 /* don't draw influence curves on strips */
389 SNLA_NOSTRIPCURVES = (1 << 5),
390 /* don't perform realtime updates */
391 SNLA_NOREALTIMEUPDATES = (1 << 6),
395 /* Timeline =============================================== */
397 /* Pointcache drawing data */
398 # /* Only store the data array in the cache to avoid constant reallocation. */
399 # /* No need to store when saved. */
400 typedef struct SpaceTimeCache {
401 struct SpaceTimeCache *next, *prev;
406 typedef struct SpaceTime {
407 SpaceLink *next, *prev;
408 ListBase regionbase; /* storage of regions for inactive spaces */
410 float blockscale DNA_DEPRECATED;
412 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
422 typedef enum eTimeline_Flag {
423 /* show timing in frames instead of in seconds */
424 TIME_DRAWFRAMES = (1 << 0),
425 /* show time indicator box beside the frame number */
426 TIME_CFRA_NUM = (1 << 1),
427 /* only keyframes from active/selected channels get shown */
428 TIME_ONLYACTSEL = (1 << 2),
431 /* time->redraws (now screen->redraws_flag) */
432 typedef enum eScreen_Redraws_Flag {
433 TIME_REGION = (1 << 0),
434 TIME_ALL_3D_WIN = (1 << 1),
435 TIME_ALL_ANIM_WIN = (1 << 2),
436 TIME_ALL_BUTS_WIN = (1 << 3),
437 TIME_WITH_SEQ_AUDIO = (1 << 4), /* DEPRECATED */
439 TIME_ALL_IMAGE_WIN = (1 << 6),
440 TIME_CONTINUE_PHYSICS = (1 << 7), /* UNUSED */
441 TIME_NODES = (1 << 8),
442 TIME_CLIPS = (1 << 9),
443 } eScreen_Redraws_Flag;
446 typedef enum eTimeline_Cache_Flag {
447 TIME_CACHE_DISPLAY = (1 << 0),
448 TIME_CACHE_SOFTBODY = (1 << 1),
449 TIME_CACHE_PARTICLES = (1 << 2),
450 TIME_CACHE_CLOTH = (1 << 3),
451 TIME_CACHE_SMOKE = (1 << 4),
452 TIME_CACHE_DYNAMICPAINT = (1 << 5),
453 TIME_CACHE_RIGIDBODY = (1 << 6),
454 } eTimeline_Cache_Flag;
457 /* Sequence Editor ======================================= */
460 typedef struct SpaceSeq {
461 SpaceLink *next, *prev;
462 ListBase regionbase; /* storage of regions for inactive spaces */
464 float blockscale DNA_DEPRECATED;
466 short blockhandler[8] DNA_DEPRECATED;
468 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
470 float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
471 short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
476 float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
477 int view; /* see SEQ_VIEW_* below */
480 struct bGPdata *gpd; /* grease-pencil data */
482 struct SequencerScopes scopes; /* different scoped displayed in space */
487 typedef enum eSpaceSeq_RegionType {
488 SEQ_DRAW_SEQUENCE = 0,
489 SEQ_DRAW_IMG_IMBUF = 1,
490 SEQ_DRAW_IMG_WAVEFORM = 2,
491 SEQ_DRAW_IMG_VECTORSCOPE = 3,
492 SEQ_DRAW_IMG_HISTOGRAM = 4,
493 } eSpaceSeq_RegionType;
496 typedef enum eSpaceSeq_Flag {
497 SEQ_DRAWFRAMES = (1 << 0),
498 SEQ_MARKER_TRANS = (1 << 1),
499 SEQ_DRAW_COLOR_SEPARATED = (1 << 2),
500 SEQ_DRAW_SAFE_MARGINS = (1 << 3),
501 SEQ_SHOW_GPENCIL = (1 << 4),
502 SEQ_NO_DRAW_CFRANUM = (1 << 5),
503 SEQ_USE_ALPHA = (1 << 6), /* use RGBA display mode for preview */
507 typedef enum eSpaceSeq_Displays {
508 SEQ_VIEW_SEQUENCE = 1,
509 SEQ_VIEW_PREVIEW = 2,
510 SEQ_VIEW_SEQUENCE_PREVIEW = 3,
513 /* sseq->render_size */
514 typedef enum eSpaceSeq_Proxy_RenderSize {
515 SEQ_PROXY_RENDER_SIZE_NONE = -1,
516 SEQ_PROXY_RENDER_SIZE_SCENE = 0,
517 SEQ_PROXY_RENDER_SIZE_25 = 25,
518 SEQ_PROXY_RENDER_SIZE_50 = 50,
519 SEQ_PROXY_RENDER_SIZE_75 = 75,
520 SEQ_PROXY_RENDER_SIZE_100 = 99,
521 SEQ_PROXY_RENDER_SIZE_FULL = 100
522 } eSpaceSeq_Proxy_RenderSize;
524 typedef struct MaskSpaceInfo
526 /* **** mask editing **** */
535 typedef enum eSpaceSeq_OverlayType {
536 SEQ_DRAW_OVERLAY_RECT = 0,
537 SEQ_DRAW_OVERLAY_REFERENCE = 1,
538 SEQ_DRAW_OVERLAY_CURRENT = 2
539 } eSpaceSeq_OverlayType;
541 /* File Selector ========================================== */
543 /* Config and Input for File Selector */
544 typedef struct FileSelectParams {
545 char title[96]; /* title, also used for the text of the execute button */
546 char dir[1056]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 32, this is for extreme case when 1023 length path
547 * needs to be linked in, where foo.blend/Armature need adding */
548 char file[256]; /* file */
549 char renamefile[256];
550 char renameedit[256]; /* annoying but the first is only used for initialization */
552 char filter_glob[64]; /* list of filetypes to filter */
559 short type; /* XXXXX for now store type here, should be moved to the operator */
560 short flag; /* settings for filter, hiding dots files,... */
561 short sort; /* sort order */
562 short display; /* display mode flag */
563 short filter; /* filter when (flags & FILE_FILTER) is true */
565 /* XXX --- still unused -- */
566 short f_fp; /* show font preview */
567 char fp_str[8]; /* string to use for font preview */
569 /* XXX --- end unused -- */
573 typedef struct SpaceFile {
574 SpaceLink *next, *prev;
575 ListBase regionbase; /* storage of regions for inactive spaces */
580 struct FileSelectParams *params; /* config and input for file select */
582 struct FileList *files; /* holds the list of files to show */
584 ListBase *folders_prev; /* holds the list of previous directories to show */
585 ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */
587 /* operator that is invoking fileselect
588 * op->exec() will be called on the 'Load' button.
589 * if operator provides op->cancel(), then this will be invoked
590 * on the cancel button.
592 struct wmOperator *op;
594 struct wmTimer *smoothscroll_timer;
596 struct FileLayout *layout;
598 short recentnr, bookmarknr;
599 short systemnr, pad2;
603 /* FileSelectParams.display */
604 enum FileDisplayTypeE {
605 FILE_DEFAULTDISPLAY = 0,
606 FILE_SHORTDISPLAY = 1,
607 FILE_LONGDISPLAY = 2,
611 /* FileSelectParams.sort */
615 FILE_SORT_EXTENSION = 2,
620 /* these values need to be hardcoded in structs, dna does not recognize defines */
621 /* also defined in BKE */
622 #define FILE_MAXDIR 768
623 #define FILE_MAXFILE 256
624 #define FILE_MAX 1024
626 #define FILE_MAX_LIBEXTRA (FILE_MAX + MAX_ID_NAME)
630 #define FILE_BLENDER 8 /* don't display relative paths */
631 #define FILE_SPECIAL 9
633 #define FILE_LOADLIB 1
635 #define FILE_LOADFONT 3
637 /* filesel op property -> action */
638 typedef enum eFileSel_Action {
643 /* sfile->params->flag and simasel->flag */
644 typedef enum eFileSel_Params_Flag {
645 FILE_SHOWSHORT = (1 << 0),
646 FILE_RELPATH = (1 << 1), /* was FILE_STRINGCODE */
647 FILE_LINK = (1 << 2),
648 FILE_HIDE_DOT = (1 << 3),
649 FILE_AUTOSELECT = (1 << 4),
650 FILE_ACTIVELAY = (1 << 5),
651 /* FILE_ATCURSOR = (1 << 6), */ /* deprecated */
652 FILE_DIRSEL_ONLY = (1 << 7),
653 FILE_FILTER = (1 << 8),
654 FILE_BOOKMARKS = (1 << 9),
655 FILE_GROUP_INSTANCE = (1 << 10),
656 } eFileSel_Params_Flag;
659 /* files in filesel list: file types */
660 typedef enum eFileSel_File_Types {
661 BLENDERFILE = (1 << 2),
662 BLENDERFILE_BACKUP = (1 << 3),
663 IMAGEFILE = (1 << 4),
664 MOVIEFILE = (1 << 5),
665 PYSCRIPTFILE = (1 << 6),
666 FTFONTFILE = (1 << 7),
667 SOUNDFILE = (1 << 8),
669 MOVIEFILE_ICON = (1 << 10), /* movie file that preview can't load */
670 FOLDERFILE = (1 << 11), /* represents folders for filtering */
672 COLLADAFILE = (1 << 13),
673 OPERATORFILE = (1 << 14), /* from filter_glob operator property */
674 } eFileSel_File_Types;
676 /* Selection Flags in filesel: struct direntry, unsigned char selflag */
677 typedef enum eDirEntry_SelectFlag {
678 /* ACTIVE_FILE = (1 << 1), */ /* UNUSED */
679 HILITED_FILE = (1 << 2),
680 SELECTED_FILE = (1 << 3),
681 EDITING_FILE = (1 << 4),
682 } eDirEntry_SelectFlag;
684 /* Image/UV Editor ======================================== */
686 /* Image/UV Editor */
687 typedef struct SpaceImage {
688 SpaceLink *next, *prev;
689 ListBase regionbase; /* storage of regions for inactive spaces */
695 struct ImageUser iuser;
697 struct CurveMapping *cumap DNA_DEPRECATED; /* was switched to scene's color management settings */
699 struct Scopes scopes; /* histogram waveform and vectorscope */
700 struct Histogram sample_line_hist; /* sample line histogram */
702 struct bGPdata *gpd; /* grease pencil data */
704 float cursor[2]; /* UV editor 2d cursor */
705 float xof, yof; /* user defined offset, image is centered */
706 float zoom; /* user defined zoom level */
707 float centx, centy; /* storage for offset while render drawing */
709 char mode; /* view/paint/mask */
712 short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */
714 char dt_uv; /* UV draw type */
715 char sticky; /* sticky selection type */
719 MaskSpaceInfo mask_info;
723 /* SpaceImage->dt_uv */
724 typedef enum eSpaceImage_UVDT {
731 /* SpaceImage->dt_uvstretch */
732 typedef enum eSpaceImage_UVDT_Stretch {
733 SI_UVDT_STRETCH_ANGLE = 0,
734 SI_UVDT_STRETCH_AREA = 1,
735 } eSpaceImage_UVDT_Stretch;
737 /* SpaceImage->mode */
738 typedef enum eSpaceImage_Mode {
741 SI_MODE_MASK = 2 /* note: mesh edit mode overrides mask */
744 /* SpaceImage->sticky
745 * Note DISABLE should be 0, however would also need to re-arrange icon order,
746 * also, sticky loc is the default mode so this means we don't need to 'do_versons' */
747 typedef enum eSpaceImage_Sticky {
749 SI_STICKY_DISABLE = 1,
750 SI_STICKY_VERTEX = 2,
751 } eSpaceImage_Sticky;
753 /* SpaceImage->flag */
754 typedef enum eSpaceImage_Flag {
755 /* SI_BE_SQUARE = (1 << 0), */ /* deprecated */
756 SI_EDITTILE = (1 << 1), /* XXX - not used but should be? */
757 SI_CLIP_UV = (1 << 2),
758 /* SI_DRAWTOOL = (1 << 3), */ /* deprecated */
759 SI_NO_DRAWFACES = (1 << 4),
760 SI_DRAWSHADOW = (1 << 5),
761 /* SI_SELACTFACE = (1 << 6), */ /* deprecated */
762 /* SI_DEPRECATED2 = (1 << 7), */ /* deprecated */
763 /* SI_DEPRECATED3 = (1 << 8), */ /* deprecated */
764 SI_COORDFLOATS = (1 << 9),
765 SI_PIXELSNAP = (1 << 10),
766 SI_LIVE_UNWRAP = (1 << 11),
767 SI_USE_ALPHA = (1 << 12),
768 SI_SHOW_ALPHA = (1 << 13),
769 SI_SHOW_ZBUF = (1 << 14),
771 /* next two for render window display */
772 SI_PREVSPACE = (1 << 15),
773 SI_FULLWINDOW = (1 << 16),
775 /* SI_DEPRECATED4 = (1 << 17), */ /* deprecated */
776 /* SI_DEPRECATED5 = (1 << 18), */ /* deprecated */
778 /* this means that the image is drawn until it reaches the view edge,
779 * in the image view, its unrelated to the 'tile' mode for texface
781 SI_DRAW_TILE = (1 << 19),
782 SI_SMOOTH_UV = (1 << 20),
783 SI_DRAW_STRETCH = (1 << 21),
784 SI_SHOW_GPENCIL = (1 << 22),
785 SI_DRAW_OTHER = (1 << 23),
787 SI_COLOR_CORRECTION = (1 << 24),
790 /* Text Editor ============================================ */
793 typedef struct SpaceText {
794 SpaceLink *next, *prev;
795 ListBase regionbase; /* storage of regions for inactive spaces */
797 float blockscale DNA_DEPRECATED;
798 short blockhandler[8] DNA_DEPRECATED;
805 short lheight; /* user preference, is font_size! */
806 char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */
814 short live_edit; /* run python while editing, evil */
817 struct rcti txtscroll, txtbar;
819 int wordwrap, doplugins;
821 char findstr[256]; /* ST_MAX_FIND_STR */
822 char replacestr[256]; /* ST_MAX_FIND_STR */
824 short margin_column; /* column number to show right margin at */
825 short lheight_dpi; /* actual lineheight, dpi controlled */
828 void *drawcache; /* cache for faster drawing */
832 /* SpaceText flags (moved from DNA_text_types.h) */
833 typedef enum eSpaceText_Flags {
835 ST_SCROLL_SELECT = (1 << 0),
836 /* clear namespace after script execution (BPY_main.c) */
837 ST_CLEAR_NAMESPACE = (1 << 4),
839 ST_FIND_WRAP = (1 << 5),
840 ST_FIND_ALL = (1 << 6),
841 ST_SHOW_MARGIN = (1 << 7),
842 ST_MATCH_CASE = (1 << 8),
844 ST_FIND_ACTIVATE = (1 << 9),
847 /* stext->findstr/replacestr */
848 #define ST_MAX_FIND_STR 256
850 /* Script View (Obsolete) ================================== */
852 /* Script Runtime Data - Obsolete (pre 2.5) */
853 typedef struct Script {
859 void *py_browsercallback;
862 int flags, lastspace;
863 /* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */
864 char scriptname[1024]; /* 1024 = FILE_MAX */
865 char scriptarg[256]; /* 1024 = FILE_MAX */
867 #define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0
869 /* Script View - Obsolete (pre 2.5) */
870 typedef struct SpaceScript {
871 SpaceLink *next, *prev;
872 ListBase regionbase; /* storage of regions for inactive spaces */
874 float blockscale DNA_DEPRECATED;
875 struct Script *script;
883 /* Nodes Editor =========================================== */
887 typedef struct bNodeTreePath {
888 struct bNodeTreePath *next, *prev;
890 struct bNodeTree *nodetree;
891 bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */
893 /* XXX this is not automatically updated when node names are changed! */
894 char node_name[64]; /* MAX_NAME */
897 typedef struct SpaceNode {
898 SpaceLink *next, *prev;
899 ListBase regionbase; /* storage of regions for inactive spaces */
901 float blockscale DNA_DEPRECATED;
902 short blockhandler[8] DNA_DEPRECATED;
904 View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
906 struct ID *id, *from; /* context, no need to save in file? well... pinning... */
907 short flag, pad1; /* menunr: browse id block in header */
908 float aspect, pad2; /* internal state variables */
910 float xof, yof; /* offset for drawing the backdrop */
911 float zoom; /* zoom for backdrop */
912 float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */
914 /* XXX nodetree pointer info is all in the path stack now,
915 * remove later on and use bNodeTreePath instead. For now these variables are set when pushing/popping
916 * from path stack, to avoid having to update all the functions and operators. Can be done when
917 * design is accepted and everything is properly tested.
921 struct bNodeTree *nodetree, *edittree;
923 /* tree type for the current node tree */
924 char tree_idname[64];
925 int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */
928 short texfrom; /* texfrom object, world or brush */
929 short shaderfrom; /* shader from object or world */
930 short recalc; /* currently on 0/1, for auto compo */
932 ListBase linkdrag; /* temporary data for modal linking operator */
934 struct bGPdata *gpd; /* grease-pencil data */
938 typedef enum eSpaceNode_Flag {
939 SNODE_BACKDRAW = (1 << 1),
940 SNODE_SHOW_GPENCIL = (1 << 2),
941 SNODE_USE_ALPHA = (1 << 3),
942 SNODE_SHOW_ALPHA = (1 << 4),
943 SNODE_SHOW_R = (1 << 7),
944 SNODE_SHOW_G = (1 << 8),
945 SNODE_SHOW_B = (1 << 9),
946 SNODE_AUTO_RENDER = (1 << 5),
947 SNODE_SHOW_HIGHLIGHT = (1 << 6),
948 SNODE_USE_HIDDEN_PREVIEW = (1 << 10),
949 SNODE_NEW_SHADERS = (1 << 11),
950 SNODE_PIN = (1 << 12),
954 typedef enum eSpaceNode_TexFrom {
955 SNODE_TEX_OBJECT = 0,
958 } eSpaceNode_TexFrom;
960 /* snode->shaderfrom */
961 typedef enum eSpaceNode_ShaderFrom {
962 SNODE_SHADER_OBJECT = 0,
963 SNODE_SHADER_WORLD = 1,
964 } eSpaceNode_ShaderFrom;
966 /* Game Logic Editor ===================================== */
969 typedef struct SpaceLogic {
970 SpaceLink *next, *prev;
971 ListBase regionbase; /* storage of regions for inactive spaces */
973 float blockscale DNA_DEPRECATED;
975 short blockhandler[8] DNA_DEPRECATED;
980 struct bGPdata *gpd; /* grease-pencil data */
983 /* Console ================================================ */
985 /* Console content */
986 typedef struct ConsoleLine {
987 struct ConsoleLine *next, *prev;
989 /* keep these 3 vars so as to share free, realloc funcs */
990 int len_alloc; /* allocated length */
991 int len; /* real len - strlen() */
995 int type; /* only for use when in the 'scrollback' listbase */
998 /* ConsoleLine.type */
999 typedef enum eConsoleLine_Type {
1000 CONSOLE_LINE_OUTPUT = 0,
1001 CONSOLE_LINE_INPUT = 1,
1002 CONSOLE_LINE_INFO = 2, /* autocomp feedback */
1003 CONSOLE_LINE_ERROR = 3
1004 } eConsoleLine_Type;
1008 typedef struct SpaceConsole {
1009 SpaceLink *next, *prev;
1010 ListBase regionbase; /* storage of regions for inactive spaces */
1012 float blockscale DNA_DEPRECATED; // XXX are these needed?
1013 short blockhandler[8] DNA_DEPRECATED; // XXX are these needed?
1018 ListBase scrollback; /* ConsoleLine; output */
1019 ListBase history; /* ConsoleLine; command history, current edited line is the first */
1021 char language[32]; /* multiple consoles are possible, not just python */
1028 /* User Preferences ======================================= */
1030 /* User Preferences View */
1031 typedef struct SpaceUserPref {
1032 SpaceLink *next, *prev;
1033 ListBase regionbase; /* storage of regions for inactive spaces */
1038 char filter[64]; /* search term for filtering in the UI */
1041 /* Motion Tracking ======================================== */
1044 typedef struct SpaceClip {
1045 SpaceLink *next, *prev;
1046 ListBase regionbase; /* storage of regions for inactive spaces */
1049 float xof, yof; /* user defined offset, image is centered */
1050 float xlockof, ylockof; /* user defined offset from locked position */
1051 float zoom; /* user defined zoom level */
1053 struct MovieClipUser user; /* user of clip */
1054 struct MovieClip *clip; /* clip data */
1055 struct MovieClipScopes scopes; /* different scoped displayed in space panels */
1057 int flag; /* flags */
1058 short mode; /* editor mode (editing context being displayed) */
1059 short view; /* type of the clip editor view */
1061 int path_length; /* length of displaying path, in frames */
1063 /* current stabilization data */
1064 float loc[2], scale, angle; /* pre-composed stabilization data */
1066 float stabmat[4][4], unistabmat[4][4]; /* current stabilization matrix and the same matrix in unified space,
1067 * defined when drawing and used for mouse position calculation */
1069 /* movie postprocessing */
1073 short gpencil_src, pad2;
1077 int around, pad4; /* pivot point for transforms */
1079 MaskSpaceInfo mask_info;
1082 /* SpaceClip->flag */
1083 typedef enum eSpaceClip_Flag {
1084 SC_SHOW_MARKER_PATTERN = (1 << 0),
1085 SC_SHOW_MARKER_SEARCH = (1 << 1),
1086 SC_LOCK_SELECTION = (1 << 2),
1087 SC_SHOW_TINY_MARKER = (1 << 3),
1088 SC_SHOW_TRACK_PATH = (1 << 4),
1089 SC_SHOW_BUNDLES = (1 << 5),
1090 SC_MUTE_FOOTAGE = (1 << 6),
1091 SC_HIDE_DISABLED = (1 << 7),
1092 SC_SHOW_NAMES = (1 << 8),
1093 SC_SHOW_GRID = (1 << 9),
1094 SC_SHOW_STABLE = (1 << 10),
1095 SC_MANUAL_CALIBRATION = (1 << 11),
1096 SC_SHOW_GPENCIL = (1 << 12),
1097 SC_SHOW_FILTERS = (1 << 13),
1098 SC_SHOW_GRAPH_FRAMES = (1 << 14),
1099 SC_SHOW_GRAPH_TRACKS = (1 << 15),
1100 /* SC_SHOW_PYRAMID_LEVELS = (1 << 16), */ /* UNUSED */
1101 SC_LOCK_TIMECURSOR = (1 << 17),
1102 SC_SHOW_SECONDS = (1 << 18),
1103 SC_SHOW_GRAPH_SEL_ONLY = (1 << 19),
1104 SC_SHOW_GRAPH_HIDDEN = (1 << 20),
1107 /* SpaceClip->mode */
1108 typedef enum eSpaceClip_Mode {
1109 SC_MODE_TRACKING = 0,
1110 SC_MODE_RECONSTRUCTION = 1,
1111 SC_MODE_DISTORTION = 2,
1112 SC_MODE_MASKEDIT = 3,
1115 /* SpaceClip->view */
1116 typedef enum eSpaceClip_View {
1119 SC_VIEW_DOPESHEET = 2,
1122 /* SpaceClip->gpencil_src */
1123 typedef enum eSpaceClip_GPencil_Source {
1124 SC_GPENCIL_SRC_CLIP = 0,
1125 SC_GPENCIL_SRC_TRACK = 1,
1126 } eSpaceClip_GPencil_Source;
1128 /* **************** SPACE DEFINES ********************* */
1130 /* headerbuttons: 450-499 */
1131 #define B_IMASELHOME 451
1132 #define B_IMASELREMOVEBIP 452
1135 /* space types, moved from DNA_screen_types.h */
1136 /* Do NOT change order, append on end. types are hardcoded needed */
1137 typedef enum eSpace_Type {
1148 SPACE_IMASEL = 10, /* deprecated */
1149 SPACE_SOUND = 11, /* Deprecated */
1152 SPACE_SCRIPT = 14, /* Deprecated */
1157 SPACE_USERPREF = 19,
1160 SPACEICONMAX = SPACE_CLIP
1163 #define IMG_SIZE_FALLBACK 256
1165 #endif /* __DNA_SPACE_TYPES_H__ */