Page MenuHome

GPencil: Convert Curve to Grease Pencil clears Transform.
Closed, ResolvedPublic


System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: AMD Radeon HD 5450 ATI Technologies Inc. 4.5.13399 Core Profile Context 15.201.1151.1008

Blender Version
Broken: version: 2.81 (sub 5), branch: master, commit date: 2019-09-03 12:35, hash: rB51d8facbc327
Worked: (optional)

Short description of error
Convert Curve to Grease Pencil clears Transform.

Exact steps for others to reproduce the error


  • Add Text Object (Text in example)
  • Move, Rotate and Scale Text Object, also changed text for clarity (solid "Moved, Rotated and Scaled" in image)
  • Convert to Curve from Mesh/Text
  • Convert Grease Pencil From Curve =>new GP object has cleared Transform (outlined text in image)

Event Timeline

I think the new GPencil object is not using the original transformation, so we need take a look.

Antonio Vazquez (antoniov) lowered the priority of this task from 90 to 50.Oct 10 2019, 10:01 PM
Antonio Vazquez (antoniov) renamed this task from Convert Curve to Grease Pencil clears Transform. to GPencil: Convert Curve to Grease Pencil clears Transform..Oct 10 2019, 10:08 PM

@Germano Cavalcante (mano-wii) I have a fix, but not sure if this can be done with less lines:

diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index bbd8c425386..4676a286169 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2397,6 +2397,9 @@ static int convert_exec(bContext *C, wmOperator *op)
             const float *cur = scene->cursor.location;
             ushort local_view_bits = (v3d && v3d->localvd) ? v3d->local_view_uuid : 0;
             gpencil_ob = ED_gpencil_add_object(C, scene, cur, local_view_bits);
+            copy_v3_v3(gpencil_ob->loc, ob->loc);
+            copy_v3_v3(gpencil_ob->rot, ob->rot);
+            copy_v3_v3(gpencil_ob->scale, ob->scale);
           BKE_gpencil_convert_curve(bmain, scene, gpencil_ob, ob, false, false, true);

I tested with copy_m4_m4(gpencil_ob->obmat, ob->obmat); but it does not work.

Antonio Vazquez (antoniov) changed the task status from Unknown Status to Resolved.Oct 11 2019, 1:25 PM

Fixed in two commits:

15ffa3e7db86 and 74f9b9d144e5