Applying Vertex Weight Mix modifier invalidates existing references to Vertex Groups #98751
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#98751
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?
System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.11
Blender Version
Broken: 3.0.0, 3.2.0, 3.3.0 Alpha (branch: master, commit date: 2022-06-07 18:08, hash:
173a15bcda
)Worked: 2.93.9
Short description of error
After applying a Vertex Weight Mix modifier, any existing references to Vertex Groups on the object the modifier was applied to become invalid, appearing to no longer reference the correct data in memory.
Exact steps for others to reproduce the error
all_vg = bpy.context.object.vertex_groups[:]
[v.name for v in all_vg]
Performing other actions in Blender before running
[v.name for v in all_vg]
, such as changing the Properties space from Modifier Properties to Material Properties is likely to cause issues even when there are only very few vertex groups on the cube.An alternative to running
[v.name for v in all_vg]
in the Python Console, that may make the issue clearer, would be to instead run the following code as it will catch the UnicodeDecodeErrors:try:
names.append(vg.name)
except UnicodeDecodeError:
names.append('error')
import bpy
cube = bpy.context.object
for _ in range(100):
cube.vertex_groups.new()
mod = cube.modifiers.new('Vertex Weight Mix', 'VERTEX_WEIGHT_MIX')
mod.vertex_group_a = cube.vertex_groups[0].name
mod.vertex_group_b = cube.vertex_groups[1].name
all_vg = cube.vertex_groups[:]
bpy.ops.object.modifier_apply(modifier=mod.name)
names = []
for vg in all_vg:
try:
names.append(vg.name)
except UnicodeDecodeError:
names.append('error')
print(names)
The following lines are to make it easier to repeatedly run the script, they are not required
print()
bpy.context.object.vertex_groups.clear()```
Added subscriber: @Mysteryem-2
Added subscriber: @OmarEmaraDev
Changed status from 'Needs Triage' to: 'Needs User Info'
I can't reproduce on any of the listed versions for some reason, both in release and debug builds. Can you try this code instead:
Do any of the pointers change?
(I'm not sure the call to reversed() was supposed to be in your script, I removed it so that the vertex groups would line up).
Yes, on 3.0.0+, all the pointers change. On 2.93.9, the pointers remain the same
Changed status from 'Needs User Info' to: 'Needs Triage'
The pointers are the same for me in all versions, pre and post 3.0. Since I am on Linux, I will let someone on Windows to triage this and see if it can be confirmed there.
Closed as duplicate of #93896