Fix: Knife tool does not interpolate vertex customdata in interior cuts #107367
No reviewers
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#107367
Loading…
Reference in New Issue
No description provided.
Delete Branch "lichtwerk/blender:BM_edgenet_vdata_support_makes_knife_support_vgrous_in_face_cuts"
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?
Using the Knife tool, making cuts that split an edge exactly interpolate
fine for vertex customdata (weights or attributes on the vertex domain)
due to
BM_edge_split
taking care of data layers from the edge andvertex domain (also mdisps -- which unfortunately dont seem to work
well, but that is for another patch...).
However, making cuts inside a face though dont interpolate at all
(giving default values on new vertices).
With this patch, also interpolate vertex customdata in
BM_face_split_edgenet
.Example video
@ -618,11 +620,15 @@ bool BM_face_split_edgenet(BMesh *bm,
interp_weights_poly_v2(w, cos_2d, f->len, co);
CustomData_bmesh_interp(
&bm->ldata, (const void **)blocks, w, NULL, f->len, l_iter->head.data);
CustomData_bmesh_interp(
Looks like this could use
liter->v->head.data
here instead of requiring the separatevblocks
array?The
vblocks
array is needed as a source each vertices custom data as they're not contiguous as with Mesh custom-data.Ah of course, my bad, thanks.
This patch should update the
CustomData_has_math(&bm->ldata)
checkCustomData_has_math
for both verts and loops separately, only constructing custom-data arrays & runningCustomData_bmesh_interp(..)
when needed.Otherwise this looks fine.
CustomData_has_interp
should be enough here even, right?@ -575,3 +577,3 @@
/* See: #BM_loop_interp_from_face for similar logic. */
void **blocks = BLI_array_alloca(blocks, f->len);
void **blocks, **vblocks;
Prefer
void **blocks = has_interp_ldata ? BLI_array_alloca(blocks, f->len) : NULL;
- uses less space & doesn't leave unassigned.I reverted this because it changed the behavior of booleans in regards to vertex weights as well (and made the
CubeMaskFirst
modifier test fail).Not entirely clear to me what the desired behavior would be (current situation is "wrong" in certain situations as well I think), but until this is further discussed with the #modeling-module , I think reverting is the better choice.
For example, here is a boolean of two objects (base has full weights 1.0 and cutout has 0.5 weights everywhere).
Current main does this:
With the patch, we got this:
So, I'd be happy to look into this further (just not sure what the desired behavior should be really...)
@HooglyBoogly : I recall you had the discussion as well in relation to the boolean node/modifier?
And here is the .blend for the test above (cutout is animated to move up over time)