[Bf-blender-cvs] [b0560149d95] asset-browser: Merge branch 'asset-metadata' into asset-browser

Julian Eisel noreply at git.blender.org
Mon Nov 23 14:56:05 CET 2020


Commit: b0560149d95715ea951eb7d3901744a2f49a903f
Author: Julian Eisel
Date:   Mon Nov 23 14:20:43 2020 +0100
Branches: asset-browser
https://developer.blender.org/rBb0560149d95715ea951eb7d3901744a2f49a903f

Merge branch 'asset-metadata' into asset-browser

===================================================================



===================================================================

diff --cc source/blender/makesdna/DNA_asset_types.h
index 3a1e2f035e2,b1ce2a01785..610b78984cc
--- a/source/blender/makesdna/DNA_asset_types.h
+++ b/source/blender/makesdna/DNA_asset_types.h
@@@ -33,20 -33,14 +33,28 @@@ typedef struct CustomTag 
    char name[64]; /* MAX_NAME */
  } CustomTag;
  
 +#ifdef WITH_ASSET_REPO_INFO
 +typedef struct AssetCatalog {
 +  struct AssetCatalog *next, *prev;
 +
 +  char name[64]; /* MAX_NAME */
 +} AssetCatalog;
 +
 +typedef struct AssetRepositoryInfo {
 +  ListBase catalogs;
 +} AssetRepositoryInfo;
 +
 +extern AssetRepositoryInfo *G_asset_repository_info;
 +#endif
 +
+ /**
+  * \brief The meta-data of an asset.
+  * By creating and giving this for a data-block (#ID.asset_data), the data-block becomes an asset.
+  *
+  * \note This struct must be readable without having to read anything but blocks from the ID it is
+  *       attached to! That way, asset information of a file can be read, without reading anything
+  *       more than that from the file. So pointers to other IDs or ID data are strictly forbidden.
+  */
  typedef struct AssetData {
    /** Thumbnail image of the data-block. Duplicate of the referenced ID preview. */
    struct PreviewImage *preview;
diff --cc source/blender/makesrna/intern/rna_asset.c
index d0beb524773,60eb9ffc30d..35dca7be612
--- a/source/blender/makesrna/intern/rna_asset.c
+++ b/source/blender/makesrna/intern/rna_asset.c
@@@ -31,9 -31,8 +31,10 @@@
  #ifdef RNA_RUNTIME
  
  #  include "BKE_asset.h"
+ #  include "BKE_idprop.h"
  
 +#  include "BLI_listbase.h"
 +
  #  include "RNA_access.h"
  
  static CustomTag *rna_AssetData_tag_new(AssetData *asset_data,



More information about the Bf-blender-cvs mailing list