Grease Pencil Edit Mode: Individual Origins does not work #59546

Closed
opened 2018-12-18 09:45:44 +01:00 by William Reynish · 10 comments

System Information
Operating system: macOS 10.14.2 (18C54)
Graphics card: AMD Radeon R9 M395X 4096 MB

Blender Version
Broken: Blender 2.80 beta Dec 18 2018

Short description of error
Grease Pencil Edit Mode: Individual Origins does not work

Exact steps for others to reproduce the error

  • Add a GP Object and draw some shapes
  • Go to Edit Mode and set pivot to Individual Origins

Rotate or Scale with all shapes selected. You'll see that the entire collection of shapes are transformed as a whole, rather than as individual items.

This blend file has two identical objects - one is a mesh and the other is a GP object:
GP_individual_origins_bug.blend
Enter Edit Mode for each and scale the items. Observe how the mesh object scales from the individual mesh islands, but the GP object in Edit Mode does not.

**System Information** Operating system: macOS 10.14.2 (18C54) Graphics card: AMD Radeon R9 M395X 4096 MB **Blender Version** Broken: Blender 2.80 beta Dec 18 2018 **Short description of error** Grease Pencil Edit Mode: Individual Origins does not work **Exact steps for others to reproduce the error** - Add a GP Object and draw some shapes - Go to Edit Mode and set pivot to Individual Origins # Rotate or Scale with all shapes selected. You'll see that the entire collection of shapes are transformed as a whole, rather than as individual items. This blend file has two identical objects - one is a mesh and the other is a GP object: [GP_individual_origins_bug.blend](https://archive.blender.org/developer/F5990956/GP_individual_origins_bug.blend) Enter Edit Mode for each and scale the items. Observe how the mesh object scales from the individual mesh islands, but the GP object in Edit Mode does not.

Added subscriber: @WilliamReynish

Added subscriber: @WilliamReynish

Added subscribers: @brecht, @antoniov

Added subscribers: @brecht, @antoniov

@brecht you changed how the origin was calculated because I did not know this area of the code. Could you take a look on this?

@brecht you changed how the origin was calculated because I did not know this area of the code. Could you take a look on this?
Antonio Vazquez was assigned by Brecht Van Lommel 2018-12-18 17:54:27 +01:00

This is just not implemented for grease pencil. I think it mainly needs changes in transform_conversions.c. See for example how createTransEditVerts does it for edit mesh. It seems to work roughly like this:

  • Compute which vertices belong to the same "island", that is which vertices are connected to each other. Not sure what the equivalent is for grease pencil, maybe just points in the same stroke? I guess there is not any more connectivity information, unless you try to do something clever with detecting overlapping strokes.
  • Then for each vertex, it sets a td->center and td->axismtxto the center and axis of the island it belongs to, rather than using the same values for all.
This is just not implemented for grease pencil. I think it mainly needs changes in `transform_conversions.c`. See for example how `createTransEditVerts` does it for edit mesh. It seems to work roughly like this: * Compute which vertices belong to the same "island", that is which vertices are connected to each other. Not sure what the equivalent is for grease pencil, maybe just points in the same stroke? I guess there is not any more connectivity information, unless you try to do something clever with detecting overlapping strokes. * Then for each vertex, it sets a `td->center` and `td->axismtx`to the center and axis of the island it belongs to, rather than using the same values for all.

@brecht I see what you mean. I will try to implement that.

@brecht I see what you mean. I will try to implement that.

@brecht I created this code P875 but still does not work. I have checked and the center is right by stroke (local coords). What am I missing?

The matrix is filled with this code:

/* apply parent transformations */
copy_m3_m4(td->smtx, inverse_diff_mat); /* final position */
copy_m3_m4(td->mtx, diff_mat);  /* display position */
copy_m3_m4(td->axismtx, diff_mat); /* axis orientation */
@brecht I created this code [P875](https://archive.blender.org/developer/P875.txt) but still does not work. I have checked and the center is right by stroke (local coords). What am I missing? The matrix is filled with this code: ``` /* apply parent transformations */ copy_m3_m4(td->smtx, inverse_diff_mat); /* final position */ copy_m3_m4(td->mtx, diff_mat); /* display position */ copy_m3_m4(td->axismtx, diff_mat); /* axis orientation */ ```
Member

Added subscriber: @zazizizou

Added subscriber: @zazizizou
Member

@antoniov: I submitted a patch to fix this: D4156. Center computation was done correctly, the problem was that transdata_check_local_center() didn't support GP objects.

@antoniov: I submitted a patch to fix this: [D4156](https://archive.blender.org/developer/D4156). Center computation was done correctly, the problem was that `transdata_check_local_center()` didn't support GP objects.

This issue was referenced by 38796a4971

This issue was referenced by 38796a4971afdd58e58bcfe043fbdb21153dfcc2

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
5 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#59546
No description provided.