Fix #111024: Crash when adding attribute to curve object #111036
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#111036
Loading…
Reference in New Issue
No description provided.
Delete Branch "PratikPB2123/blender:111024-cv-vgroup"
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?
After
12ef20990b
, attributes and vertex group names were checkedsimulatanously to fix the name collision. But this results in crash when
new attribute is added to curve object (it searches for vertex group
list). To avoid the crash, check for supported id types.
Ah, how could that have slipped through? Thx working on this, it would work just fine..
Two things:
BKE_defgroup_unique_name_check
, but already inBKE_id_attribute_and_defgroup_unique_name_check
--
BKE_defgroup_unique_name_check
is called from other places where we already know we have a valid ID (so it would be redundant in that case)BKE_object_supports_vertex_groups
-- maybe we could add
BKE_id_supports_vertex_groups
and use that (for this fix as well as inBKE_object_supports_vertex_groups
)?-- this way we dont risk this running out of sync in case other IDs gain vertex groups supprt at a later point in time
Will also add @HooglyBoogly here
Thanks. I exactly had a thought to include the same function 😃 (use of it will be less since
BKE_object_supports_vertex_groups
is used everywhere. So decided to keep the scope limited)Both changes are included now :)
Nitpick just out of curiosity.
Other than that, tested and worked fine.
@ -26,6 +26,7 @@ struct MDeformVert;
struct Object;
struct bDeformGroup;
const bool BKE_id_supports_vertex_groups(const struct ID *id);
Why return
const
?removed, thanks.
No need to return
const
since return type is primitive data 😅LGTM now, would really prefer that @HooglyBoogly checks as well though.
Looks good, thanks!
@ -447,1 +445,4 @@
bool BKE_object_supports_vertex_groups(const Object *ob)
{
const ID *id = (const ID *)ob->data;
Use
static_cast
Merged, thanks for reviewing :)