Deleting object does not delete shape keys #45106

Closed
opened 2015-06-18 18:30:36 +02:00 by Vladimir Kuvandjiev · 7 comments

System Information
Ubuntu 14.04
MD Mobility Radeon HD 5000 Series

Blender Version
Broken: 2.74

Short description of error
After the object is deleted from the scene, if there were existing shape keys added to the object they are not removed from bpy.data.shape_keys collection. bpy.data.shape_keys['Key'].users is 0, however bpy.data.shape_keys['Key'].user points to
bpy.data.meshes['Cube'] (for ex.)

If all shape keys are removed from the object ( bpy.ops.object.shape_key_remove(all=True) ) before deleting it, the bpy.data.shape_keys collection is correctly cleared.

If you reopen the blend file the shape keys are properly removed.

Exact steps for others to reproduce the error

  1. Add shape key to an object

  2. Delete the shape key

  3. Delete the object bpy.ops.object.delete()

  4. bpy.data.shape_keys is empty

  5. Add shape key to an object

  6. Delete the mesh bpy.ops.object.delete()

  7. bpy.data.shape_keys is not empty

**System Information** Ubuntu 14.04 MD Mobility Radeon HD 5000 Series **Blender Version** Broken: 2.74 **Short description of error** After the object is deleted from the scene, if there were existing shape keys added to the object they are not removed from bpy.data.shape_keys collection. bpy.data.shape_keys['Key'].users is 0, however bpy.data.shape_keys['Key'].user points to bpy.data.meshes['Cube'] (for ex.) If all shape keys are removed from the object ( bpy.ops.object.shape_key_remove(all=True) ) before deleting it, the bpy.data.shape_keys collection is correctly cleared. If you reopen the blend file the shape keys are properly removed. **Exact steps for others to reproduce the error** 1. Add shape key to an object 2. Delete the shape key 3. Delete the object bpy.ops.object.delete() 4. bpy.data.shape_keys is empty 1. Add shape key to an object 2. Delete the mesh bpy.ops.object.delete() 3. bpy.data.shape_keys is not empty

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @kuvandjiev

Added subscriber: @kuvandjiev

Added subscribers: @ideasman42, @Sergey

Added subscribers: @ideasman42, @Sergey

@ideasman42, not sure we'll consider this a bug? That's just a weak design of shapekeys which originally were supposed to be reusable across multiple datablocks.

@ideasman42, not sure we'll consider this a bug? That's just a weak design of shapekeys which originally were supposed to be reusable across multiple datablocks.

Added subscriber: @sindra1961

Added subscriber: @sindra1961

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Campbell Barton self-assigned this 2015-08-31 17:23:32 +02:00

The shapekey is stored in the Mesh, on removing the object the mesh isn't removed either.

This is working as intended, closing.

The shapekey is stored in the `Mesh`, on removing the object the mesh isn't removed either. This is working as intended, closing.
Sign in to join this conversation.
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
4 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#45106
No description provided.