diff options
Diffstat (limited to 'source/blender/makesdna/DNA_space_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 103 |
1 files changed, 11 insertions, 92 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 5151f35c43d..5ee96497bd5 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1043,68 +1043,6 @@ 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 { @@ -1116,9 +1054,14 @@ typedef struct FileDirEntry { 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 +1084,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 +1107,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. */ |