[Bf-blender-cvs] [5955d7ffd52] asset-greasepencil: GPencil: Split tags
Antonio Vazquez
noreply at git.blender.org
Tue Aug 3 10:36:32 CEST 2021
Commit: 5955d7ffd52d8986812b8dadf11be4aa8ec52c5e
Author: Antonio Vazquez
Date: Tue Aug 3 10:36:28 2021 +0200
Branches: asset-greasepencil
https://developer.blender.org/rB5955d7ffd52d8986812b8dadf11be4aa8ec52c5e
GPencil: Split tags
Add Animation tag separated of Grease Pencil Tag
===================================================================
M source/blender/editors/gpencil/gpencil_asset.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_asset.c b/source/blender/editors/gpencil/gpencil_asset.c
index d678bd4a8d1..b5257fbe478 100644
--- a/source/blender/editors/gpencil/gpencil_asset.c
+++ b/source/blender/editors/gpencil/gpencil_asset.c
@@ -361,10 +361,12 @@ static bool gpencil_asset_create(const bContext *C,
/* Mark as asset. */
if (ED_asset_mark_id(C, &gpd->id)) {
- const char *tags[] = {"Grease Pencil Strokes", "Grease Pencil Animation"};
- /* Add tag to asset. */
- int index = (is_animation) ? 1 : 0;
- BKE_asset_metadata_tag_ensure(gpd->id.asset_data, tags[index]);
+ const char *tags[] = {"Grease Pencil", "Animation"};
+ /* Add tags to asset. */
+ BKE_asset_metadata_tag_ensure(gpd->id.asset_data, tags[0]);
+ if (is_animation) {
+ BKE_asset_metadata_tag_ensure(gpd->id.asset_data, tags[1]);
+ }
/* Retime frame number to start by 1. Must be done after generate the render preview. */
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
More information about the Bf-blender-cvs
mailing list