[Bf-blender-cvs] [73435e36d47] asset-greasepencil: GPencil: Remove parenting when the asset is created

Antonio Vazquez noreply at git.blender.org
Mon Jul 19 16:42:29 CEST 2021


Commit: 73435e36d474bcd89d4165f06b0da700d6229437
Author: Antonio Vazquez
Date:   Mon Jul 19 16:17:52 2021 +0200
Branches: asset-greasepencil
https://developer.blender.org/rB73435e36d474bcd89d4165f06b0da700d6229437

GPencil: Remove parenting when the asset is created

The parent cannot be used in the asset.

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

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 780f5f60a53..eb4f33c1094 100644
--- a/source/blender/editors/gpencil/gpencil_asset.c
+++ b/source/blender/editors/gpencil/gpencil_asset.c
@@ -225,6 +225,10 @@ static int gpencil_asset_create_exec(bContext *C, wmOperator *op)
       BKE_gpencil_layer_delete(gpd, gpl);
       continue;
     }
+    /* Remove parenting data. */
+    gpl->parent = NULL;
+    gpl->parsubstr[0] = 0;
+    gpl->partype = 0;
 
     bGPDframe *gpf_active = gpl->actframe;



More information about the Bf-blender-cvs mailing list