GPencil: New support for Asset Manager #104413

Closed
Antonio Vazquez wants to merge 10 commits from antoniov/blender:temp-asset-lite into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 09b4912447 - Show all commits

View File

@ -16,7 +16,8 @@ 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_GR | FILTER_ID_OB | FILTER_ID_AC | FILTER_ID_WO | FILTER_ID_NT)
(FILTER_ID_MA | FILTER_ID_GR | FILTER_ID_OB | FILTER_ID_AC | FILTER_ID_WO | FILTER_ID_NT | \
FILTER_ID_GD)
/**
* Check if the asset type for \a id (which doesn't need to be an asset right now) can be an asset,
@ -39,7 +40,7 @@ int64_t ED_asset_types_supported_as_filter_flags(void);
* Should start with a consonant, so usages can prefix it with "a" (not "an").
*/
#define ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_UI_STRING \
"Material, Collection, Object, Pose Action, Node Group or World"
"Material, Collection, Object, Pose Action, Node Group or World, Grease Pencil"
#ifdef __cplusplus
}

View File

@ -16,7 +16,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_GR, ID_OB, ID_AC, ID_WO, ID_NT);
return ELEM(GS(id->name), ID_MA, ID_GR, ID_OB, ID_AC, ID_WO, ID_NT, ID_GD);
}
bool ED_asset_type_is_supported(const ID *id)