GPencil: Convert Curve to Grease Pencil clears Transform. #69459

Closed
opened 2019-09-03 22:47:31 +02:00 by Johnny Matthews · 8 comments

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: 51d8facbc3
Worked: (optional)

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

Exact steps for others to reproduce the error

Steps

  • 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)

screen.png

GP.blend

**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: `51d8facbc3` Worked: (optional) **Short description of error** Convert Curve to Grease Pencil clears Transform. **Exact steps for others to reproduce the error** Steps - 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) ![screen.png](https://archive.blender.org/developer/F7715641/screen.png) [GP.blend](https://archive.blender.org/developer/F7715646/GP.blend)
Author
Member

Added subscriber: @guitargeek

Added subscriber: @guitargeek

Added subscribers: @antoniov, @mano-wii

Added subscribers: @antoniov, @mano-wii
Antonio Vazquez was assigned by Germano Cavalcante 2019-10-10 20:30:37 +02:00

@antoniov, is this a known limitation?
Any reason for just the cursor location being used?

@antoniov, is this a known limitation? Any reason for just the cursor location being used?

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

I think the new GPencil object is not using the original transformation, so we need take a look.
Antonio Vazquez changed title from Convert Curve to Grease Pencil clears Transform. to GPencil: Convert Curve to Grease Pencil clears Transform. 2019-10-10 22:08:57 +02:00

@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.

@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.

Proposed Fix: D6045

Proposed Fix: [D6045](https://archive.blender.org/developer/D6045)

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Fixed in two commits:

15ffa3e7db and 74f9b9d144

Fixed in two commits: 15ffa3e7db86 and 74f9b9d144e5
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#69459
No description provided.