diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2021-07-18 14:14:23 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2021-07-18 14:14:23 +0300 |
commit | ca50a1f762703d477ee84cf494dec601fd540299 (patch) | |
tree | fbd86a77e77015d7cc6becc1255a63e436a45b2a /source/blender/makesdna/DNA_space_types.h | |
parent | d35969a74ff7a71fc0ca233ae65a2f1c47eb9a25 (diff) | |
parent | e82c5c660778b3805f50f3f2901923692c17db2a (diff) |
Merge branch 'master' into geometry-nodes-unnamed-attributesgeometry-nodes-unnamed-attributes
Diffstat (limited to 'source/blender/makesdna/DNA_space_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 137 |
1 files changed, 23 insertions, 114 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 556a9e48de5..b990de29ff3 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -448,7 +448,7 @@ typedef struct SpaceGraph { /** Mode for the Graph editor (eGraphEdit_Mode). */ short mode; /** - * Time-transform autosnapping settings for Graph editor + * Time-transform auto-snapping settings for Graph editor * (eAnimEdit_AutoSnap in DNA_action_types.h). */ short autosnap; @@ -700,14 +700,14 @@ typedef enum eSpaceSeq_OverlayType { * Information to identify a asset library. May be either one of the predefined types (current * 'Main', builtin library, project library), or a custom type as defined in the Preferences. * - * If the type is set to #FILE_ASSET_LIBRARY_CUSTOM, idname must have the name to identify the + * If the type is set to #ASSET_LIBRARY_CUSTOM, idname must have the name to identify the * custom library. Otherwise idname is not used. */ typedef struct FileSelectAssetLibraryUID { short type; /* eFileAssetLibrary_Type */ char _pad[2]; /** - * If showing a custom asset library (#FILE_ASSET_LIBRARY_CUSTOM), this is the index of the + * If showing a custom asset library (#ASSET_LIBRARY_CUSTOM), this is the index of the * #bUserAssetLibrary within #UserDef.asset_libraries. * Should be ignored otherwise (but better set to -1 then, for sanity and debugging). */ @@ -727,6 +727,12 @@ typedef struct FileSelectParams { char renamefile[256]; short rename_flag; + char _pad[4]; + /** An ID that was just renamed. Used to identify a renamed asset file over re-reads, similar to + * `renamefile` but for local IDs (takes precedence). Don't keep this stored across handlers! + * Would break on undo. */ + const ID *rename_id; + void *_pad3; /** List of filetypes to filter (FILE_MAXFILE). */ char filter_glob[256]; @@ -734,7 +740,6 @@ typedef struct FileSelectParams { /** Text items name must match to be shown. */ char filter_search[64]; /** Same as filter, but for ID types (aka library groups). */ - int _pad0; uint64_t filter_id; /** Active file used for keyboard navigation. */ @@ -880,22 +885,6 @@ typedef enum eFileBrowse_Mode { FILE_BROWSE_MODE_ASSETS = 1, } eFileBrowse_Mode; -typedef enum eFileAssetLibrary_Type { - /* For the future. Display assets bundled with Blender by default. */ - // FILE_ASSET_LIBRARY_BUNDLED = 0, - /** Display assets from the current session (current "Main"). */ - FILE_ASSET_LIBRARY_LOCAL = 1, - /* For the future. Display assets for the current project. */ - // FILE_ASSET_LIBRARY_PROJECT = 2, - - /** Display assets from custom asset libraries, as defined in the preferences - * (#bUserAssetLibrary). The name will be taken from #FileSelectParams.asset_library.idname - * then. - * In RNA, we add the index of the custom library to this to identify it by index. So keep - * this last! */ - FILE_ASSET_LIBRARY_CUSTOM = 100, -} eFileAssetLibrary_Type; - /* FileSelectParams.display */ enum eFileDisplayType { /** Internal (not exposed to users): Keep whatever display type was used during the last File @@ -987,7 +976,7 @@ typedef enum eFileSel_Params_Flag { } eFileSel_Params_Flag; /* sfile->params->rename_flag */ -/* Note: short flag. Defined as bitflags, but currently only used as exclusive status markers... */ +/* NOTE: short flag. Defined as bitflags, but currently only used as exclusive status markers... */ typedef enum eFileSel_Params_RenameFlag { /** Used when we only have the name of the entry we want to rename, * but not yet access to its matching file entry. */ @@ -1043,82 +1032,25 @@ typedef enum eDirEntry_SelectFlag { /* ***** Related to file browser, but never saved in DNA, only here to help with RNA. ***** */ -/** - * About Unique identifier. - * - * Stored in a CustomProps once imported. - * Each engine is free to use it as it likes - it will be the only thing passed to it by blender to - * identify asset/variant/version (concatenating the three into a single 48 bytes one). - * Assumed to be 128bits, handled as four integers due to lack of real bytes proptype in RNA :|. - */ -#define ASSET_UUID_LENGTH 16 - -/* Used to communicate with asset engines outside of 'import' context. */ -# -# -typedef struct AssetUUID { - int uuid_asset[4]; - int uuid_variant[4]; - int uuid_revision[4]; -} AssetUUID; - -# -# -typedef struct AssetUUIDList { - AssetUUID *uuids; - int nbr_uuids; - char _pad[4]; -} AssetUUIDList; - -/* Container for a revision, only relevant in asset context. */ -# -# -typedef struct FileDirEntryRevision { - struct FileDirEntryRevision *next, *prev; - - char *comment; - void *_pad; - - int uuid[4]; - - uint64_t size; - int64_t time; - /* Temp caching of UI-generated strings... */ - char size_str[16]; - char datetime_str[16 + 8]; -} FileDirEntryRevision; - -/* Container for a variant, only relevant in asset context. - * In case there are no variants, a single one shall exist, with NULL name/description. */ -# -# -typedef struct FileDirEntryVariant { - struct FileDirEntryVariant *next, *prev; - - int uuid[4]; - char *name; - char *description; - - ListBase revisions; - int nbr_revisions; - int act_revision; -} FileDirEntryVariant; - -/* Container for mere direntry, with additional asset-related data. */ # # typedef struct FileDirEntry { struct FileDirEntry *next, *prev; - int uuid[4]; + 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; char *description; - /* Either point to active variant/revision if available, or own entry - * (in mere filebrowser case). */ - FileDirEntryRevision *entry; + uint64_t size; + int64_t time; + + struct { + /* Temp caching of UI-generated strings. */ + char size_str[16]; + char datetime_str[16 + 8]; + } draw_data; /** #eFileSel_File_Types. */ int typeflag; @@ -1141,32 +1073,16 @@ typedef struct FileDirEntry { /* The icon_id for the preview image. */ int preview_icon_id; - /* Tags are for info only, most of filtering is done in asset engine. */ - char **tags; - int nbr_tags; - - short status; short flags; /* eFileAttributes defined in BLI_fileops.h */ int attributes; - - ListBase variants; - int nbr_variants; - int act_variant; } FileDirEntry; /** - * Array of direntries. - * - * This struct is used in various, different contexts. - * - * In Filebrowser UI, it stores the total number of available entries, the number of visible - * (filtered) entries, and a subset of those in 'entries' ListBase, from idx_start (included) - * to idx_end (excluded). + * Array of directory entries. * - * In AssetEngine context (i.e. outside of 'browsing' context), entries contain all needed data, - * there is no filtering, so nbr_entries_filtered, entry_idx_start and entry_idx_end - * should all be set to -1. + * Stores the total number of available entries, the number of visible (filtered) entries, and a + * subset of those in 'entries' ListBase, from idx_start (included) to idx_end (excluded). */ # # @@ -1180,14 +1096,6 @@ typedef struct FileDirEntryArr { char root[1024]; } FileDirEntryArr; -#if 0 /* UNUSED */ -/* FileDirEntry.status */ -enum { - ASSET_STATUS_LOCAL = 1 << 0, /* If active uuid is available locally/immediately. */ - ASSET_STATUS_LATEST = 1 << 1, /* If active uuid is latest available version. */ -}; -#endif - /* FileDirEntry.flags */ enum { FILE_ENTRY_INVALID_PREVIEW = 1 << 0, /* The preview for this entry could not be generated. */ @@ -2003,6 +1911,7 @@ typedef enum eSpreadsheetFilterOperation { typedef enum eSpaceSpreadsheet_ObjectEvalState { SPREADSHEET_OBJECT_EVAL_STATE_EVALUATED = 0, SPREADSHEET_OBJECT_EVAL_STATE_ORIGINAL = 1, + SPREADSHEET_OBJECT_EVAL_STATE_VIEWER_NODE = 2, } eSpaceSpreadsheet_Context; typedef enum eSpaceSpreadsheet_ContextType { |