Fix #117997: Crash trying to copy vertex group attributes as spans #119212
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#119212
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "LukasTonne/blender:fix-curve-to-mesh-dvert-attributes"
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?
Grease Pencil provides custom vertex group attributes as VArrays that
are a view on the
MDeformVert
buffer. These attributes are not spans,which the curve conversion code was expecting. Non-span VArrays must be
materialized first.
@blender-bot build
@ -381,0 +383,4 @@
buffer.reinitialize(curves.evaluated_points_num() * src.type().size());
GMutableSpan eval{src.type(), buffer.data(), curves.evaluated_points_num()};
curves.ensure_can_interpolate_to_evaluated();
ensure_can_interpolate_to_evaluated
should be called at some higher level before all this interpolation needs to happen@ -381,1 +388,4 @@
return eval;
}
GArray src_buffer(src.type(), src.size());
GVArraySpan
is a utility to do thisI don't see how this would work:
GVArraySpan
can wrap the inputsrc
array but is not mutable (can't materialize into it).GVMutableArraySpan
is mutable but can't be simply constructed from the immutablesrc
buffer.But this is src buffer and should not be mutable, no?
Ok, looked into the constructor and it actually does a
materialize
internally. That wasn't clear to me.@ -381,1 +389,4 @@
}
GArray src_buffer(src.type(), src.size());
src.materialize_to_uninitialized(src_buffer.data());
Seems worth also having a fast path for
curves.is_single_type(CURVE_TYPE_POLY)
here. Thematerialize
can happen directly into thebuffer
.I don't think we can directly materialize into the output buffer because of the
interpolate_to_evaluated
call. The input array is per control point, the output is per evaluated point.When
curves.is_single_type(CURVE_TYPE_POLY)
is true, there is the same number of control point and evaluated points. That optimization is done just above, except that it requiresis_span()
there.Ok, makes sense. I'll add a comment though, because i don't think it's obvious why this works for poly curves.
ensure
calls to a higher level. 400776a868@blender-bot build
@blender-bot build