[Bf-blender-cvs] [dbcd4518245] asset-greasepencil: GPencil: Fix error in layers order
Antonio Vazquez
noreply at git.blender.org
Thu Jul 22 11:15:56 CEST 2021
Commit: dbcd4518245b5a72ab27cd2cec3d0746f8093093
Author: Antonio Vazquez
Date: Thu Jul 22 11:12:17 2021 +0200
Branches: asset-greasepencil
https://developer.blender.org/rBdbcd4518245b5a72ab27cd2cec3d0746f8093093
GPencil: Fix error in layers order
Before was inverted because a bug
===================================================================
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 864933a69b1..0a2997dfad1 100644
--- a/source/blender/editors/gpencil/gpencil_asset.c
+++ b/source/blender/editors/gpencil/gpencil_asset.c
@@ -858,8 +858,7 @@ static void gpencil_asset_add_strokes(tGPDasset *tgpa)
/* Get the first frame in the asset. */
int const first_fra = gpencil_asset_get_first_franum(gpd_asset);
- /* Layers must be added inverse to keep strokes order. */
- LISTBASE_FOREACH_BACKWARD (bGPDlayer *, gpl_asset, &gpd_asset->layers) {
+ LISTBASE_FOREACH (bGPDlayer *, gpl_asset, &gpd_asset->layers) {
/* Check if Layer is in target datablock. */
bGPDlayer *gpl_target = BKE_gpencil_layer_get_by_name(gpd_target, gpl_asset->info, false);
if (gpl_target == NULL) {
More information about the Bf-blender-cvs
mailing list