[Bf-blender-cvs] [2fdd80ba1da] blender2.8: GP: Use same name when duplicate datablock

Antonioya noreply at git.blender.org
Sun Nov 11 14:31:34 CET 2018


Commit: 2fdd80ba1dab682c93cf03d16013947ca19a5725
Author: Antonioya
Date:   Sun Nov 11 14:31:23 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB2fdd80ba1dab682c93cf03d16013947ca19a5725

GP: Use same name when duplicate datablock

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

M	source/blender/editors/gpencil/gpencil_edit.c

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

diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index c988a541c42..655b0bd6007 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -3301,7 +3301,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
 
 	/* create new grease pencil datablock */
 	// XXX: check usercounts
-	gpd_dst = BKE_gpencil_data_addnew(bmain, "GPencil");
+	gpd_dst = BKE_gpencil_data_addnew(bmain, gpd_src->id.name + 2);
 	ob_dst->data = (bGPdata *)gpd_dst;
 
 	int totslots = ob_dst->totcol;



More information about the Bf-blender-cvs mailing list