diff options
Diffstat (limited to 'source/blender/makesdna/DNA_space_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 6bc68baa640..5a819ead4ec 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -8,6 +8,8 @@ #pragma once +#include "BLI_utildefines.h" + #include "DNA_asset_types.h" #include "DNA_color_types.h" /* for Histogram */ #include "DNA_defs.h" @@ -48,14 +50,19 @@ struct wmTimer; /** Defined in `buttons_intern.h`. */ typedef struct SpaceProperties_Runtime SpaceProperties_Runtime; -/** Defined in `node_intern.hh`. */ #ifdef __cplusplus namespace blender::ed::space_node { struct SpaceNode_Runtime; } // namespace blender::ed::space_node using SpaceNode_Runtime = blender::ed::space_node::SpaceNode_Runtime; + +namespace blender::ed::outliner { +struct SpaceOutliner_Runtime; +} // namespace blender::ed::outliner +using SpaceOutliner_Runtime = blender::ed::outliner::SpaceOutliner_Runtime; #else typedef struct SpaceNode_Runtime SpaceNode_Runtime; +typedef struct SpaceOutliner_Runtime SpaceOutliner_Runtime; #endif /** Defined in `file_intern.h`. */ @@ -250,9 +257,6 @@ typedef enum eSpaceButtons_OutlinerSync { /** \name Outliner * \{ */ -/** Defined in `outliner_intern.hh`. */ -typedef struct SpaceOutliner_Runtime SpaceOutliner_Runtime; - /** Outliner */ typedef struct SpaceOutliner { SpaceLink *next, *prev; @@ -276,9 +280,7 @@ typedef struct SpaceOutliner { */ struct BLI_mempool *treestore; - /* search stuff */ char search_string[64]; - struct TreeStoreElem search_tse; short flag; short outlinevis; @@ -405,8 +407,8 @@ typedef enum eSpaceOutliner_StoreFlag { /* cleanup tree */ SO_TREESTORE_CLEANUP = (1 << 0), SO_TREESTORE_UNUSED_1 = (1 << 1), /* cleared */ - /* rebuild the tree, similar to cleanup, - * but defer a call to BKE_outliner_treehash_rebuild_from_treestore instead */ + /** Rebuild the tree, similar to cleanup, but defer a call to + * bke::outliner::treehash::rebuild_from_treestore instead. */ SO_TREESTORE_REBUILD = (1 << 2), } eSpaceOutliner_StoreFlag; @@ -1028,6 +1030,7 @@ typedef enum eFileSel_Params_Flag { /** Enables filtering by asset catalog. */ FILE_FILTER_ASSET_CATALOG = (1 << 15), } eFileSel_Params_Flag; +ENUM_OPERATORS(eFileSel_Params_Flag, FILE_FILTER_ASSET_CATALOG); typedef enum eFileSel_Params_AssetCatalogVisibility { FILE_SHOW_ASSETS_ALL_CATALOGS, @@ -1083,6 +1086,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 { @@ -1215,7 +1219,7 @@ typedef struct SpaceImage { char pin; - char pixel_snap_mode; + char pixel_round_mode; char lock; /** UV draw type. */ @@ -1233,11 +1237,10 @@ typedef struct SpaceImage { int tile_grid_shape[2]; /** - * UV editor custom-grid. Value of `N` will produce `NxN` grid. + * UV editor custom-grid. Value of `{M,N}` will produce `MxN` grid. * Use when #SI_CUSTOM_GRID is set. */ - int custom_grid_subdiv; - char _pad3[4]; + int custom_grid_subdiv[2]; MaskSpaceInfo mask_info; SpaceImageOverlay overlay; @@ -1257,12 +1260,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_Round_Mode; /** #SpaceImage.mode */ typedef enum eSpaceImage_Mode { @@ -1316,6 +1319,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 { @@ -1633,7 +1638,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(). */ |