* \ingroup DNA
* \since mar-2001
* \author nzc
+ *
+ * Structs for each of space type in the user interface.
*/
#ifndef __DNA_SPACE_TYPES_H__
#include "DNA_image_types.h" /* ImageUser */
#include "DNA_movieclip_types.h" /* MovieClipUser */
#include "DNA_sequence_types.h" /* SequencerScopes */
+#include "DNA_node_types.h" /* for bNodeInstanceKey */
/* Hum ... Not really nice... but needed for spacebuts. */
#include "DNA_view2d_types.h"
struct ID;
struct Text;
struct Script;
-struct bSound;
-struct ImBuf;
struct Image;
struct Scopes;
struct Histogram;
struct SpaceIpo;
-struct BlendHandle;
-struct RenderInfo;
struct bNodeTree;
-struct uiBlock;
struct FileList;
struct bGPdata;
struct bDopeSheet;
struct FileSelectParams;
struct FileLayout;
-struct bScreen;
-struct Scene;
struct wmOperator;
struct wmTimer;
struct MovieClip;
struct MovieClipScopes;
struct Mask;
+struct BLI_mempool;
/* SpaceLink (Base) ==================================== */
short mainb, mainbo, mainbuser; /* context tabs */
short re_align, align; /* align for panels */
short preview; /* preview is signal to refresh */
- short texture_context; /* texture context selector (material, world, brush)*/
- char flag, pad;
+ /* texture context selector (material, lamp, particles, world, other)*/
+ short texture_context, texture_context_prev;
+ char flag, pad[7];
void *path; /* runtime */
int pathflag, dataicon; /* runtime */
} eSpaceButtons_Context;
/* sbuts->flag */
-#define SB_PRV_OSA 1
-#define SB_PIN_CONTEXT 2
-//#define SB_WORLD_TEX 4 //not used anymore
-//#define SB_BRUSH_TEX 8 //not used anymore
-#define SB_SHADING_CONTEXT 16
+typedef enum eSpaceButtons_Flag {
+ SB_PRV_OSA = (1 << 0),
+ SB_PIN_CONTEXT = (1 << 1),
+ /* SB_WORLD_TEX = (1 << 2), */ /* not used anymore */
+ /* SB_BRUSH_TEX = (1 << 3), */ /* not used anymore */
+ SB_TEX_USER_LIMITED = (1 << 3), /* Do not add materials, particles, etc. in TemplateTextureUser list. */
+ SB_SHADING_CONTEXT = (1 << 4),
+} eSpaceButtons_Flag;
/* sbuts->texture_context */
typedef enum eSpaceButtons_Texture_Context {
- SB_TEXC_MAT_OR_LAMP = 0,
+ SB_TEXC_MATERIAL = 0,
SB_TEXC_WORLD = 1,
- SB_TEXC_BRUSH = 2,
+ SB_TEXC_LAMP = 2,
SB_TEXC_PARTICLES = 3,
+ SB_TEXC_OTHER = 4,
+ SB_TEXC_LINESTYLE = 5,
} eSpaceButtons_Texture_Context;
/* sbuts->align */
BUT_AUTO = 3,
} eSpaceButtons_Align;
-/* sbuts->scaflag */
+/* sbuts->scaflag */
#define BUTS_SENS_SEL 1
#define BUTS_SENS_ACT 2
#define BUTS_SENS_LINK 4
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
ListBase tree;
- struct TreeStore *treestore;
+
+ /* treestore is an ordered list of TreeStoreElem's from outliner tree;
+ * Note that treestore may contain duplicate elements if element
+ * is used multiple times in outliner tree (e. g. linked objects)
+ * Also note that BLI_mempool can not be read/written in DNA directly,
+ * therefore readfile.c/writefile.c linearize treestore into TreeStore structure
+ */
+ struct BLI_mempool *treestore;
/* search stuff */
char search_string[32];
struct TreeStoreElem search_tse;
short flag, outlinevis, storeflag, search_flags;
+
+ /* pointers to treestore elements, grouped by (id, type, nr) in hashtable for faster searching */
+ void *treehash;
} SpaceOops;
SO_NEWSELECTED = (1 << 1),
SO_HIDE_RESTRICTCOLS = (1 << 2),
SO_HIDE_KEYINGSETINFO = (1 << 3),
+ SO_SKIP_SORT_ALPHA = (1 << 4),
} eSpaceOutliner_Flag;
/* SpaceOops->outlinevis */
SO_GROUPS = 6,
SO_LIBRARIES = 7,
/* SO_VERSE_SESSION = 8, */ /* deprecated! */
- /* SO_VERSE_MS = 9, */ /* deprecated!*/
+ /* SO_VERSE_MS = 9, */ /* deprecated! */
SO_SEQUENCE = 10,
SO_DATABLOCKS = 11,
SO_USERDEF = 12,
- SO_KEYMAP = 13,
+ /* SO_KEYMAP = 13, */ /* deprecated! */
+ SO_ID_ORPHANS = 14,
} eSpaceOutliner_Mode;
/* SpaceOops->storeflag */
SIPO_BEAUTYDRAW_OFF = (1 << 12),
/* draw grouped channels with colors set in group */
SIPO_NODRAWGCOLORS = (1 << 13),
+ /* normalize curves on display */
+ SIPO_NORMALIZE = (1 << 14),
+ SIPO_NORMALIZE_FREEZE = (1 << 15),
} eGraphEdit_Flag;
/* SpaceIpo->mode (Graph Editor Mode) */
TIME_ALL_3D_WIN = (1 << 1),
TIME_ALL_ANIM_WIN = (1 << 2),
TIME_ALL_BUTS_WIN = (1 << 3),
- TIME_WITH_SEQ_AUDIO = (1 << 4), /* DEPRECATED */
+ // TIME_WITH_SEQ_AUDIO = (1 << 4), /* DEPRECATED */
TIME_SEQ = (1 << 5),
TIME_ALL_IMAGE_WIN = (1 << 6),
- TIME_CONTINUE_PHYSICS = (1 << 7), /* UNUSED */
+ // TIME_CONTINUE_PHYSICS = (1 << 7), /* UNUSED */
TIME_NODES = (1 << 8),
TIME_CLIPS = (1 << 9),
+
+ TIME_FOLLOW = (1 << 15),
} eScreen_Redraws_Flag;
/* time->cache */
float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
- short render_size;
+ short render_size; /* eSpaceSeq_Proxy_RenderSize */
short chanshown;
short zebra;
int flag;
float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
int view; /* see SEQ_VIEW_* below */
int overlay_type;
+ int draw_flag; /* overlay an image of the editing on below the strips */
+ int pad;
struct bGPdata *gpd; /* grease-pencil data */
struct SequencerScopes scopes; /* different scoped displayed in space */
+
+ char multiview_eye; /* multiview current eye - for internal use */
+ char pad2[7];
} SpaceSeq;
SEQ_DRAW_IMG_HISTOGRAM = 4,
} eSpaceSeq_RegionType;
+/* sseq->draw_flag */
+typedef enum eSpaceSeq_DrawFlag {
+ SEQ_DRAW_BACKDROP = (1 << 0),
+ SEQ_DRAW_OFFSET_EXT = (1 << 1),
+} eSpaceSeq_DrawFlag;
+
+
/* sseq->flag */
typedef enum eSpaceSeq_Flag {
SEQ_DRAWFRAMES = (1 << 0),
SEQ_MARKER_TRANS = (1 << 1),
SEQ_DRAW_COLOR_SEPARATED = (1 << 2),
- SEQ_DRAW_SAFE_MARGINS = (1 << 3),
+ SEQ_SHOW_SAFE_MARGINS = (1 << 3),
SEQ_SHOW_GPENCIL = (1 << 4),
SEQ_NO_DRAW_CFRANUM = (1 << 5),
+ SEQ_USE_ALPHA = (1 << 6), /* use RGBA display mode for preview */
+ SEQ_ALL_WAVEFORMS = (1 << 7), /* draw all waveforms */
+ SEQ_NO_WAVEFORMS = (1 << 8), /* draw no waveforms */
+ SEQ_SHOW_SAFE_CENTER = (1 << 9),
+ SEQ_SHOW_METADATA = (1 << 10),
} eSpaceSeq_Flag;
/* sseq->view */
SEQ_PROXY_RENDER_SIZE_FULL = 100
} eSpaceSeq_Proxy_RenderSize;
-typedef struct MaskSpaceInfo
-{
+typedef struct MaskSpaceInfo {
/* **** mask editing **** */
struct Mask *mask;
/* draw options */
char draw_flag;
char draw_type;
- char pad3[6];
+ char overlay_mode;
+ char pad3[5];
} MaskSpaceInfo;
/* sseq->mainb */
/* Config and Input for File Selector */
typedef struct FileSelectParams {
char title[96]; /* title, also used for the text of the execute button */
- char dir[1056]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 32, this is for extreme case when 1023 length path
+ char dir[1090]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 66, this is for extreme case when 1023 length path
* needs to be linked in, where foo.blend/Armature need adding */
+ char pad_c1[2];
char file[256]; /* file */
char renamefile[256];
char renameedit[256]; /* annoying but the first is only used for initialization */
char filter_glob[64]; /* list of filetypes to filter */
+ char filter_search[64]; /* text items' name must match to be shown. */
+
int active_file;
int sel_first;
int sel_last;
+ unsigned short thumbnail_size;
+ short pad;
/* short */
short type; /* XXXXX for now store type here, should be moved to the operator */
struct FileLayout *layout;
short recentnr, bookmarknr;
- short systemnr, pad2;
+ short systemnr, system_bookmarknr;
} SpaceFile;
+/* FSMenuEntry's without paths indicate seperators */
+typedef struct FSMenuEntry {
+ struct FSMenuEntry *next;
+
+ char *path;
+ char name[256]; /* FILE_MAXFILE */
+ short save;
+ short valid;
+ short pad[2];
+} FSMenuEntry;
/* FileSelectParams.display */
enum FileDisplayTypeE {
/* files in filesel list: file types */
typedef enum eFileSel_File_Types {
- BLENDERFILE = (1 << 2),
- BLENDERFILE_BACKUP = (1 << 3),
- IMAGEFILE = (1 << 4),
- MOVIEFILE = (1 << 5),
- PYSCRIPTFILE = (1 << 6),
- FTFONTFILE = (1 << 7),
- SOUNDFILE = (1 << 8),
- TEXTFILE = (1 << 9),
- MOVIEFILE_ICON = (1 << 10), /* movie file that preview can't load */
- FOLDERFILE = (1 << 11), /* represents folders for filtering */
- BTXFILE = (1 << 12),
- COLLADAFILE = (1 << 13),
- OPERATORFILE = (1 << 14), /* from filter_glob operator property */
+ FILE_TYPE_BLENDER = (1 << 2),
+ FILE_TYPE_BLENDER_BACKUP = (1 << 3),
+ FILE_TYPE_IMAGE = (1 << 4),
+ FILE_TYPE_MOVIE = (1 << 5),
+ FILE_TYPE_PYSCRIPT = (1 << 6),
+ FILE_TYPE_FTFONT = (1 << 7),
+ FILE_TYPE_SOUND = (1 << 8),
+ FILE_TYPE_TEXT = (1 << 9),
+ /* 1 << 10 was FILE_TYPE_MOVIE_ICON, got rid of this so free slot for future type... */
+ FILE_TYPE_FOLDER = (1 << 11), /* represents folders for filtering */
+ FILE_TYPE_BTX = (1 << 12),
+ FILE_TYPE_COLLADA = (1 << 13),
+ FILE_TYPE_OPERATOR = (1 << 14), /* from filter_glob operator property */
+ FILE_TYPE_APPLICATIONBUNDLE = (1 << 15),
} eFileSel_File_Types;
/* Selection Flags in filesel: struct direntry, unsigned char selflag */
typedef enum eDirEntry_SelectFlag {
-/* ACTIVE_FILE = (1 << 1), */ /* UNUSED */
- HILITED_FILE = (1 << 2),
- SELECTED_FILE = (1 << 3),
- EDITING_FILE = (1 << 4),
+/* FILE_SEL_ACTIVE = (1 << 1), */ /* UNUSED */
+ FILE_SEL_HIGHLIGHTED = (1 << 2),
+ FILE_SEL_SELECTED = (1 << 3),
+ FILE_SEL_EDITING = (1 << 4),
} eDirEntry_SelectFlag;
/* Image/UV Editor ======================================== */
SI_DRAW_OTHER = (1 << 23),
SI_COLOR_CORRECTION = (1 << 24),
+
+ SI_NO_DRAW_TEXPAINT = (1 << 25),
+ SI_DRAW_METADATA = (1 << 26)
} eSpaceImage_Flag;
/* Text Editor ============================================ */
char pad[4];
void *drawcache; /* cache for faster drawing */
+
+ float scroll_accum[2]; /* runtime, for scroll increments smaller than a line */
} SpaceText;
ST_FIND_ALL = (1 << 6),
ST_SHOW_MARGIN = (1 << 7),
ST_MATCH_CASE = (1 << 8),
+
+ ST_FIND_ACTIVATE = (1 << 9),
} eSpaceText_Flags;
/* stext->findstr/replacestr */
/* Nodes Editor =========================================== */
/* Node Editor */
+
+typedef struct bNodeTreePath {
+ struct bNodeTreePath *next, *prev;
+
+ struct bNodeTree *nodetree;
+ bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */
+ int pad;
+ float view_center[2]; /* v2d center point, so node trees can have different offsets in editors */
+
+ char node_name[64]; /* MAX_NAME */
+} bNodeTreePath;
+
typedef struct SpaceNode {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
float zoom; /* zoom for backdrop */
float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */
+ /* XXX nodetree pointer info is all in the path stack now,
+ * remove later on and use bNodeTreePath instead. For now these variables are set when pushing/popping
+ * from path stack, to avoid having to update all the functions and operators. Can be done when
+ * design is accepted and everything is properly tested.
+ */
+ ListBase treepath;
+
struct bNodeTree *nodetree, *edittree;
- int treetype; /* treetype: as same nodetree->type */
+
+ /* tree type for the current node tree */
+ char tree_idname[64];
+ int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */
+ int pad3;
+
short texfrom; /* texfrom object, world or brush */
short shaderfrom; /* shader from object or world */
short recalc; /* currently on 0/1, for auto compo */
- short pad[3];
+ short pad4;
ListBase linkdrag; /* temporary data for modal linking operator */
struct bGPdata *gpd; /* grease-pencil data */
SNODE_SHOW_B = (1 << 9),
SNODE_AUTO_RENDER = (1 << 5),
SNODE_SHOW_HIGHLIGHT = (1 << 6),
- SNODE_USE_HIDDEN_PREVIEW = (1 << 10),
+// SNODE_USE_HIDDEN_PREVIEW = (1 << 10), DNA_DEPRECATED December2013
SNODE_NEW_SHADERS = (1 << 11),
+ SNODE_PIN = (1 << 12),
} eSpaceNode_Flag;
/* snode->texfrom */
SNODE_TEX_OBJECT = 0,
SNODE_TEX_WORLD = 1,
SNODE_TEX_BRUSH = 2,
+ SNODE_TEX_LINESTYLE = 3,
} eSpaceNode_TexFrom;
/* snode->shaderfrom */
typedef enum eSpaceNode_ShaderFrom {
SNODE_SHADER_OBJECT = 0,
SNODE_SHADER_WORLD = 1,
+ SNODE_SHADER_LINESTYLE = 2,
} eSpaceNode_ShaderFrom;
/* Game Logic Editor ===================================== */
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- int pad;
-
+ char pad[3];
+ char filter_type;
char filter[64]; /* search term for filtering in the UI */
} SpaceUserPref;
/* grease pencil */
short gpencil_src, pad2;
- void *draw_context;
-
int around, pad4; /* pivot point for transforms */
+ float cursor[2]; /* Mask editor 2d cursor */
+
MaskSpaceInfo mask_info;
} SpaceClip;
/* SpaceClip->flag */
typedef enum eSpaceClip_Flag {
- SC_SHOW_MARKER_PATTERN = (1 << 0),
- SC_SHOW_MARKER_SEARCH = (1 << 1),
- SC_LOCK_SELECTION = (1 << 2),
- SC_SHOW_TINY_MARKER = (1 << 3),
- SC_SHOW_TRACK_PATH = (1 << 4),
- SC_SHOW_BUNDLES = (1 << 5),
- SC_MUTE_FOOTAGE = (1 << 6),
- SC_HIDE_DISABLED = (1 << 7),
- SC_SHOW_NAMES = (1 << 8),
- SC_SHOW_GRID = (1 << 9),
- SC_SHOW_STABLE = (1 << 10),
- SC_MANUAL_CALIBRATION = (1 << 11),
- SC_SHOW_GPENCIL = (1 << 12),
- SC_SHOW_FILTERS = (1 << 13),
- SC_SHOW_GRAPH_FRAMES = (1 << 14),
- SC_SHOW_GRAPH_TRACKS = (1 << 15),
-/* SC_SHOW_PYRAMID_LEVELS = (1 << 16), */ /* UNUSED */
- SC_LOCK_TIMECURSOR = (1 << 17),
- SC_SHOW_SECONDS = (1 << 18),
- SC_SHOW_GRAPH_SEL_ONLY = (1 << 19),
- SC_SHOW_GRAPH_HIDDEN = (1 << 20),
+ SC_SHOW_MARKER_PATTERN = (1 << 0),
+ SC_SHOW_MARKER_SEARCH = (1 << 1),
+ SC_LOCK_SELECTION = (1 << 2),
+ SC_SHOW_TINY_MARKER = (1 << 3),
+ SC_SHOW_TRACK_PATH = (1 << 4),
+ SC_SHOW_BUNDLES = (1 << 5),
+ SC_MUTE_FOOTAGE = (1 << 6),
+ SC_HIDE_DISABLED = (1 << 7),
+ SC_SHOW_NAMES = (1 << 8),
+ SC_SHOW_GRID = (1 << 9),
+ SC_SHOW_STABLE = (1 << 10),
+ SC_MANUAL_CALIBRATION = (1 << 11),
+ SC_SHOW_GPENCIL = (1 << 12),
+ SC_SHOW_FILTERS = (1 << 13),
+ SC_SHOW_GRAPH_FRAMES = (1 << 14),
+ SC_SHOW_GRAPH_TRACKS_MOTION = (1 << 15),
+/* SC_SHOW_PYRAMID_LEVELS = (1 << 16), */ /* UNUSED */
+ SC_LOCK_TIMECURSOR = (1 << 17),
+ SC_SHOW_SECONDS = (1 << 18),
+ SC_SHOW_GRAPH_SEL_ONLY = (1 << 19),
+ SC_SHOW_GRAPH_HIDDEN = (1 << 20),
+ SC_SHOW_GRAPH_TRACKS_ERROR = (1 << 21),
} eSpaceClip_Flag;
/* SpaceClip->mode */
typedef enum eSpaceClip_Mode {
SC_MODE_TRACKING = 0,
- SC_MODE_RECONSTRUCTION = 1,
- SC_MODE_DISTORTION = 2,
+ /*SC_MODE_RECONSTRUCTION = 1,*/ /* DEPRECATED */
+ /*SC_MODE_DISTORTION = 2,*/ /* DEPRECATED */
SC_MODE_MASKEDIT = 3,
} eSpaceClip_Mode;
/* **************** SPACE DEFINES ********************* */
-/* headerbuttons: 450-499 */
-#define B_IMASELHOME 451
-#define B_IMASELREMOVEBIP 452
-
-
/* space types, moved from DNA_screen_types.h */
/* Do NOT change order, append on end. types are hardcoded needed */
typedef enum eSpace_Type {
SPACEICONMAX = SPACE_CLIP
} eSpace_Type;
-#define IMG_SIZE_FALLBACK 256
+/* use for function args */
+#define SPACE_TYPE_ANY -1
+// TODO: SPACE_SCRIPT
+#if (DNA_DEPRECATED_GCC_POISON == 1)
+#pragma GCC poison SPACE_IMASEL SPACE_SOUND
#endif
+
+#define IMG_SIZE_FALLBACK 256
+
+#endif /* __DNA_SPACE_TYPES_H__ */