GPv3: Vertex groups in GreasePencil data block and conversion #117337
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117337
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GreasePencil
data block DNA.grease_pencil_convert_legacy.cc
:bGPdata
to newGreasePencil
.bGPdata
to allDrawings
in the data block.Optimization: skip vertex groups in
Drawings
where they have no assigned verticesMDeformVert
frombGPDstroke
to newCustomData
Adding a conventional DNA
ListBase
of vertex group names toGreasePencil
is not ideal. It raises questions of where data is actually defined. Vertex groups could be added both through theGreasePencil
DNA and through the attributes API inCurves
, and the respective other side of the data would need to be kept in sync.A radical solution would be to not store vertex groups in
GreasePencil
data blocks at all. EachDrawing
stores an independent list of vertex groups. This would require adding each vertex group individually to each drawing. Modifiers would not be able to select a vertex group.Compromise: use
Drawings
as the primary storage for vertex groups, and derive a cached runtime list inGreasePencil
from that data. This has implications for workflow:A read-only collection property on
GreasePencil
calledall_drawing_vertex_groups
seems like a good place to start. That would be used to choose vertex groups in the modifiers.The property editor will have to be extended to show properties of the active drawing: attributes and vertex groups.
As I see it, there is no functional relationship between vertex groups and layers (drawings). A vertex group has a 1:n relationship with stroke points. Those points can reside in multiple layers.
A vertex group is really an object-level thing. So storing it at layer level, sounds like a troublesome design to me.
At the module meeting we decided to try the "runtime cache" approach:
CurvesGeometry
).GreasePencil
data block is cached at runtime.GreasePencil
names are used for global ordering between drawings.Vertex groups definitions (
bDeformGroup
) have alock_weight
flag, which is used to maintain relative weights during editing. With the "drawings own vertex groups" approach this begs the question: do we use the individual flags on the drawings to determine locking state?As a user-facing editor setting i would expect all drawings to use the same property. But if drawings are the source of truth this could become a bit more difficult. We could apply the same principle as for vertex group names:
lock_weight
flag is disabled on any drawing it is disabled on the data block too.