GPv3: Lattice modifier #117955

Merged
Lukas Tönne merged 9 commits from LukasTonne/blender:gp3-lattice-modifier into main 2024-02-08 14:09:20 +01:00
Member

Ported lattice modifier from GPv2.

The LatticeDeformData is no longer stored in the modifier data, but calculated on-the-fly like in the mesh deform modifier. This is quite trivial data and only stores deformed positions of the lattice, so not really worth the effort and complexity of caching it.

Ported lattice modifier from GPv2. The `LatticeDeformData` is no longer stored in the modifier data, but calculated on-the-fly like in the mesh deform modifier. This is quite trivial data and only stores deformed positions of the lattice, so not really worth the effort and complexity of caching it.
Lukas Tönne added 1 commit 2024-02-07 18:24:48 +01:00
Lukas Tönne added this to the Grease Pencil project 2024-02-07 18:25:04 +01:00
Lukas Tönne requested review from Falk David 2024-02-07 18:25:15 +01:00
Hans Goudey reviewed 2024-02-07 18:27:05 +01:00
@ -0,0 +127,4 @@
}
});
curves.tag_positions_changed();
Member

Looks like the drawing needs a positions changed tag too

Looks like the drawing needs a positions changed tag too
LukasTonne marked this conversation as resolved
Lukas Tönne added 1 commit 2024-02-08 10:15:55 +01:00
Lukas Tönne added 1 commit 2024-02-08 10:16:10 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
a79d05b1ae
Merge branch 'main' into gp3-lattice-modifier
Author
Member

@blender-bot build

@blender-bot build
Falk David requested changes 2024-02-08 10:53:33 +01:00
Falk David left a comment
Member

Looks very straightforward! Just a few cleanup comments.

Looks very straightforward! Just a few cleanup comments.
@ -944,2 +949,4 @@
RNA_MOD_OBJECT_SET(Shrinkwrap, auxTarget, OB_MESH);
RNA_MOD_OBJECT_SET(SurfaceDeform, target, OB_MESH);
RNA_MOD_OBJECT_SET(GreasePencilLattice, object, OB_LATTICE);
RNA_MOD_OBJECT_SET(GreasePencilMirror, object, OB_EMPTY);
Member

Could you commit these changes seperately as a fix? Same for removing the rna setter functions below.

Could you commit these changes seperately as a fix? Same for removing the rna setter functions below.
LukasTonne marked this conversation as resolved
@ -0,0 +128,4 @@
}
});
curves.tag_positions_changed();
Member

Tagging the drawing will tag the curves geometry, so this line can be removed now.

Tagging the drawing will tag the curves geometry, so this line can be removed now.
LukasTonne marked this conversation as resolved
@ -0,0 +140,4 @@
BLI_assert(lmd->object != nullptr && lmd->object->type == OB_LATTICE);
LatticeDeformData *cache_data = BKE_lattice_deform_data_create(lmd->object, ctx->object);
GreasePencil *grease_pencil = geometry_set->get_grease_pencil_for_write();
Member

We've been using this pattern in other modifiers, which is a bit nicer imho:

if (!geometry_set->has_grease_pencil()) {
  return;
}
GreasePencil &grease_pencil = *geometry_set->get_grease_pencil_for_write();
We've been using this pattern in other modifiers, which is a bit nicer imho: ``` if (!geometry_set->has_grease_pencil()) { return; } GreasePencil &grease_pencil = *geometry_set->get_grease_pencil_for_write(); ```
LukasTonne marked this conversation as resolved
@ -0,0 +145,4 @@
return;
}
IndexMaskMemory mask_memory;
Member

I haven't thought about this before, but I think we should call

GeometryComponentEditData::remember_deformed_positions_if_necessary(geometry_set);

in modifiers that deform the drawings.

Maybe this should be done as a seperate PR though.

I haven't thought about this before, but I think we should call ``` GeometryComponentEditData::remember_deformed_positions_if_necessary(geometry_set); ``` in modifiers that deform the drawings. Maybe this should be done as a seperate PR though.
Author
Member

Added a note to #106665, will ignore it here for now.

Added a note to #106665, will ignore it here for now.
LukasTonne marked this conversation as resolved
Lukas Tönne added 2 commits 2024-02-08 11:58:40 +01:00
Lukas Tönne added 1 commit 2024-02-08 11:59:46 +01:00
Lukas Tönne added 2 commits 2024-02-08 12:44:15 +01:00
Lukas Tönne added 1 commit 2024-02-08 12:44:32 +01:00
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
9e6e483a73
Merge branch 'main' into gp3-lattice-modifier
Author
Member

@blender-bot build

@blender-bot build
Falk David approved these changes 2024-02-08 12:47:23 +01:00
Lukas Tönne merged commit da2d3be202 into main 2024-02-08 14:09:20 +01:00
Lukas Tönne referenced this issue from a commit 2024-02-08 14:09:21 +01:00
Lukas Tönne deleted branch gp3-lattice-modifier 2024-02-08 14:09:22 +01:00
Sign in to join this conversation.
No reviewers
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#117955
No description provided.