[Bf-blender-cvs] [37848d1c8ed] master: Assets: enable node group assets

Jacques Lucke noreply at git.blender.org
Wed Jan 26 15:22:23 CET 2022


Commit: 37848d1c8edf18ac52095cec7c50dfd1dde65e7c
Author: Jacques Lucke
Date:   Wed Jan 26 15:22:15 2022 +0100
Branches: master
https://developer.blender.org/rB37848d1c8edf18ac52095cec7c50dfd1dde65e7c

Assets: enable node group assets

This enables support for node group assets. Previously, node group
assets only worked when the "extended asset browser" experimental
features is enabled.

Differential Revision: https://developer.blender.org/D13748

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

M	source/blender/editors/asset/ED_asset_type.h
M	source/blender/editors/asset/intern/asset_type.cc

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

diff --git a/source/blender/editors/asset/ED_asset_type.h b/source/blender/editors/asset/ED_asset_type.h
index 36cbb4591e9..e1c327808aa 100644
--- a/source/blender/editors/asset/ED_asset_type.h
+++ b/source/blender/editors/asset/ED_asset_type.h
@@ -30,7 +30,7 @@ struct ID;
 
 bool ED_asset_type_id_is_non_experimental(const struct ID *id);
 #define ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_FLAGS \
-  (FILTER_ID_MA | FILTER_ID_OB | FILTER_ID_AC | FILTER_ID_WO)
+  (FILTER_ID_MA | FILTER_ID_OB | FILTER_ID_AC | FILTER_ID_WO | FILTER_ID_NT)
 
 /**
  * Check if the asset type for \a id (which doesn't need to be an asset right now) can be an asset,
@@ -52,7 +52,8 @@ int64_t ED_asset_types_supported_as_filter_flags(void);
  * strings with this (not all UI code supports dynamic strings nicely).
  * Should start with a consonant, so usages can prefix it with "a" (not "an").
  */
-#define ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_UI_STRING "Material, Object, Pose Action, or World"
+#define ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_UI_STRING \
+  "Material, Object, Pose Action, Node Group or World"
 
 #ifdef __cplusplus
 }
diff --git a/source/blender/editors/asset/intern/asset_type.cc b/source/blender/editors/asset/intern/asset_type.cc
index 028c0cb9ffc..3d6ce3e3409 100644
--- a/source/blender/editors/asset/intern/asset_type.cc
+++ b/source/blender/editors/asset/intern/asset_type.cc
@@ -30,7 +30,7 @@ bool ED_asset_type_id_is_non_experimental(const ID *id)
 {
   /* Remember to update #ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_UI_STRING and
    * #ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_FLAGS() with this! */
-  return ELEM(GS(id->name), ID_MA, ID_OB, ID_AC, ID_WO);
+  return ELEM(GS(id->name), ID_MA, ID_OB, ID_AC, ID_WO, ID_NT);
 }
 
 bool ED_asset_type_is_supported(const ID *id)



More information about the Bf-blender-cvs mailing list