Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesdna/DNA_space_types.h')
-rw-r--r--source/blender/makesdna/DNA_space_types.h84
1 files changed, 36 insertions, 48 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 6e05dd395ba..8dce71fd33e 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -22,6 +22,7 @@
#include "DNA_vec_types.h"
/* Hum ... Not really nice... but needed for spacebuts. */
#include "DNA_view2d_types.h"
+#include "DNA_viewer_path_types.h"
#ifdef __cplusplus
extern "C" {
@@ -666,7 +667,7 @@ typedef struct SpaceSeq {
struct SequencerPreviewOverlay preview_overlay;
struct SequencerTimelineOverlay timeline_overlay;
- /** Multiview current eye - for internal use. */
+ /** Multi-view current eye - for internal use. */
char multiview_eye;
char _pad2[7];
@@ -1080,6 +1081,7 @@ typedef enum eFileSel_File_Types {
FILE_TYPE_DIR = (1 << 30),
FILE_TYPE_BLENDERLIB = (1u << 31),
} eFileSel_File_Types;
+ENUM_OPERATORS(eFileSel_File_Types, FILE_TYPE_BLENDERLIB);
/** Selection Flags in filesel: struct direntry, unsigned char selflag. */
typedef enum eDirEntry_SelectFlag {
@@ -1099,7 +1101,7 @@ typedef struct FileDirEntry {
uint32_t uid; /* FileUID */
/* Name needs freeing if FILE_ENTRY_NAME_FREE is set. Otherwise this is a direct pointer to a
* name buffer. */
- char *name;
+ const char *name;
uint64_t size;
int64_t time;
@@ -1126,7 +1128,7 @@ typedef struct FileDirEntry {
/** If this file represents an asset, its asset data is here. Note that we may show assets of
* external files in which case this is set but not the id above.
* Note comment for FileListInternEntry.local_data, the same applies here! */
- struct AssetMetaData *asset_data;
+ struct AssetRepresentation *asset;
/* The icon_id for the preview image. */
int preview_icon_id;
@@ -1161,6 +1163,10 @@ enum {
FILE_ENTRY_NAME_FREE = 1 << 1,
/* The preview for this entry is being loaded on another thread. */
FILE_ENTRY_PREVIEW_LOADING = 1 << 2,
+ /** For #FILE_TYPE_BLENDERLIB only: Denotes that the ID is known to not have a preview (none was
+ * found in the .blend). Stored so we don't keep trying to find non-existent previews every time
+ * we reload previews. When dealing with heavy files this can have quite an impact. */
+ FILE_ENTRY_BLENDERLIB_NO_PREVIEW = 1 << 3,
};
/** \} */
@@ -1176,6 +1182,12 @@ typedef struct SpaceImageOverlay {
char _pad[4];
} SpaceImageOverlay;
+typedef enum eSpaceImage_GridShapeSource {
+ SI_GRID_SHAPE_DYNAMIC = 0,
+ SI_GRID_SHAPE_FIXED = 1,
+ SI_GRID_SHAPE_PIXEL = 2,
+} eSpaceImage_GridShapeSource;
+
typedef struct SpaceImage {
SpaceLink *next, *prev;
/** Storage of regions for inactive spaces. */
@@ -1212,7 +1224,7 @@ typedef struct SpaceImage {
char pin;
- char pixel_snap_mode;
+ char pixel_round_mode;
char lock;
/** UV draw type. */
@@ -1222,7 +1234,9 @@ typedef struct SpaceImage {
char around;
char gizmo_flag;
- char _pad1[3];
+
+ char grid_shape_source;
+ char _pad1[2];
int flag;
@@ -1230,11 +1244,10 @@ typedef struct SpaceImage {
int tile_grid_shape[2];
/**
- * UV editor custom-grid. Value of `N` will produce `NxN` grid.
- * Use when #SI_CUSTOM_GRID is set.
+ * UV editor custom-grid. Value of `{M,N}` will produce `MxN` grid.
+ * Use when `custom_grid_shape == SI_GRID_SHAPE_FIXED`.
*/
- int custom_grid_subdiv;
- char _pad3[4];
+ int custom_grid_subdiv[2];
MaskSpaceInfo mask_info;
SpaceImageOverlay overlay;
@@ -1254,12 +1267,12 @@ typedef enum eSpaceImage_UVDT_Stretch {
SI_UVDT_STRETCH_AREA = 1,
} eSpaceImage_UVDT_Stretch;
-/** #SpaceImage.pixel_snap_mode */
-typedef enum eSpaceImage_PixelSnapMode {
- SI_PIXEL_SNAP_DISABLED = 0,
- SI_PIXEL_SNAP_CENTER = 1,
- SI_PIXEL_SNAP_CORNER = 2,
-} eSpaceImage_Snap_Mode;
+/** #SpaceImage.pixel_round_mode */
+typedef enum eSpaceImage_PixelRoundMode {
+ SI_PIXEL_ROUND_DISABLED = 0,
+ SI_PIXEL_ROUND_CENTER = 1,
+ SI_PIXEL_ROUND_CORNER = 2,
+} eSpaceImage_PixelRoundMode;
/** #SpaceImage.mode */
typedef enum eSpaceImage_Mode {
@@ -1293,7 +1306,7 @@ typedef enum eSpaceImage_Flag {
SI_FULLWINDOW = (1 << 16),
SI_FLAG_UNUSED_17 = (1 << 17),
- SI_CUSTOM_GRID = (1 << 18),
+ SI_FLAG_UNUSED_18 = (1 << 18),
/**
* This means that the image is drawn until it reaches the view edge,
@@ -1313,6 +1326,8 @@ typedef enum eSpaceImage_Flag {
SI_SHOW_R = (1 << 27),
SI_SHOW_G = (1 << 28),
SI_SHOW_B = (1 << 29),
+
+ SI_GRID_OVER_IMAGE = (1 << 30),
} eSpaceImage_Flag;
typedef enum eSpaceImageOverlay_Flag {
@@ -1630,7 +1645,7 @@ enum {
typedef struct ConsoleLine {
struct ConsoleLine *next, *prev;
- /* keep these 3 vars so as to share free, realloc funcs */
+ /* Keep these 3 vars so as to share free, realloc functions. */
/** Allocated length. */
int len_alloc;
/** Real len - strlen(). */
@@ -1880,32 +1895,6 @@ typedef struct SpreadsheetColumn {
char *display_name;
} SpreadsheetColumn;
-/**
- * An item in SpaceSpreadsheet.context_path.
- * This is a bases struct for the structs below.
- */
-typedef struct SpreadsheetContext {
- struct SpreadsheetContext *next, *prev;
- /* eSpaceSpreadsheet_ContextType. */
- int type;
- char _pad[4];
-} SpreadsheetContext;
-
-typedef struct SpreadsheetContextObject {
- SpreadsheetContext base;
- struct Object *object;
-} SpreadsheetContextObject;
-
-typedef struct SpreadsheetContextModifier {
- SpreadsheetContext base;
- char *modifier_name;
-} SpreadsheetContextModifier;
-
-typedef struct SpreadsheetContextNode {
- SpreadsheetContext base;
- char *node_name;
-} SpreadsheetContextNode;
-
typedef struct SpaceSpreadsheet {
SpaceLink *next, *prev;
/** Storage of regions for inactive spaces. */
@@ -1922,12 +1911,11 @@ typedef struct SpaceSpreadsheet {
ListBase row_filters;
/**
- * List of #SpreadsheetContext.
- * This is a path to the data that is displayed in the spreadsheet.
- * It can be set explicitly by an action of the user (e.g. clicking the preview icon in a
- * geometry node) or it can be derived from context automatically based on some heuristic.
+ * Context that is currently displayed in the editor. This is usually a either a single object
+ * (in original/evaluated mode) or path to a viewer node. This is retrieved from the workspace
+ * but can be pinned so that it stays constant even when the active node changes.
*/
- ListBase context_path;
+ ViewerPath viewer_path;
/* eSpaceSpreadsheet_FilterFlag. */
uint8_t filter_flag;