Delete Globally won't work with Datablock ID Properties #51243

Closed
opened 2017-04-18 08:12:13 +02:00 by Mikhail Rachinskiy · 8 comments

System Information
Windows 10 x64
Renderer: GeForce GTX 860M/PCIe/SSE2

Blender Version
Broken: 2.78.4 4d0d1b5

Short description of error
Delete Globally does not take into account Datablock ID Properties, i. e. object referenced in add-on prop will be deleted from the scene, but not from the blend file.

Exact steps for others to reproduce the error

  • Open provided blend file: delete_global.blend
  • Use Run Script from the Text Editor.
  • Locate Test Panel tab in 3D View > Tool Shelf.
  • Pick a Cube object using eyedropper.

Delete Cube using Shift X for Delete Globally.

Now notice how Orphan Data in Outline doesn't show anything as it should, which means that Cube object is still has one user and will not be removed on save/open action. So user have to unreference it from every single add-on property manually.
To see how it should work do the following:

  • Open provided blend file.
  • Create new scene choosing Link Objects option (now we have two users on a Cube object).

Delete Cube using Shift X for Delete Globally.

Now notice how Orphan Data shows Cube mesh with zero users, which means that Cube object is deleted from everywhere.

**System Information** Windows 10 x64 Renderer: GeForce GTX 860M/PCIe/SSE2 **Blender Version** Broken: 2.78.4 4d0d1b5 **Short description of error** Delete Globally does not take into account Datablock ID Properties, i. e. object referenced in add-on prop will be deleted from the scene, but not from the blend file. **Exact steps for others to reproduce the error** - Open provided blend file: [delete_global.blend](https://archive.blender.org/developer/F548706/delete_global.blend) - Use Run Script from the Text Editor. - Locate Test Panel tab in 3D View > Tool Shelf. - Pick a Cube object using eyedropper. # Delete Cube using Shift X for Delete Globally. Now notice how Orphan Data in Outline doesn't show anything as it should, which means that Cube object is still has one user and will not be removed on save/open action. So user have to unreference it from every single add-on property manually. To see how it should work do the following: - Open provided blend file. - Create new scene choosing Link Objects option (now we have two users on a Cube object). # Delete Cube using Shift X for Delete Globally. Now notice how Orphan Data shows Cube mesh with zero users, which means that Cube object is deleted from everywhere.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @MikhailRachinskiy

Added subscriber: @MikhailRachinskiy
Alexander Romanov was assigned by Aaron Carlisle 2017-04-18 15:37:04 +02:00

Added subscriber: @mont29

Added subscriber: @mont29

@mont29, If I understand correctly, "X" do removing for the current scene and "Shift+X" - for all scenes? So in case of single scene "X" should also work? If this operator has "scene" context, I suppose that lookup in scene idproperties should be sufficient?

@mont29, If I understand correctly, "X" do removing for the current scene and "Shift+X" - for all scenes? So in case of single scene "X" should also work? If this operator has "scene" context, I suppose that lookup in scene idproperties should be sufficient?
Alexander Romanov was unassigned by Bastien Montagne 2017-04-19 17:58:49 +02:00
Bastien Montagne self-assigned this 2017-04-19 17:58:49 +02:00

Added subscriber: @AlexanderRomanov

Added subscriber: @AlexanderRomanov

OK, so… This is muddy waters, spent some time thinking about this and for now would consider this 'not a bug', as in, code is behaving as expected and consistently (since Object is user of itself, it is not a detectable orphaned currently, it’s an 'orphaned archipelago', a loop of orphanage, and we are not really ready to detect and handle those in current code).

To be more detailed, Object handling is currently in a big TODO stage - first because it used a lot of custom code that could be replaced by new generic one, but that kind of cleanup takes a lot of time to do and check! Furthermore, Object handling is also being changed to some extent in new blender2.8, so would rather not start messing with it in master at this point.

I think I'll just add a 'hack' around the issue for this specific case only: when you enable 'global' option for this operator, and object is local, just use 'full-nuke' delete ID code instead - simpler, shorter and should do the work.

OK, so… This is muddy waters, spent some time thinking about this and for now would consider this 'not a bug', as in, code is behaving as expected and consistently (since Object is user of itself, it is not a detectable orphaned currently, it’s an 'orphaned archipelago', a loop of orphanage, and we are not really ready to detect and handle those in current code). To be more detailed, Object handling is currently in a big TODO stage - first because it used a lot of custom code that could be replaced by new generic one, but that kind of cleanup takes a lot of time to do *and check*! Furthermore, Object handling is also being changed to some extent in new blender2.8, so would rather not start messing with it in master at this point. I think I'll just add a 'hack' around the issue for this specific case only: when you enable 'global' option for this operator, and object is local, just use 'full-nuke' delete ID code instead - simpler, shorter and should do the work.

This issue was referenced by 1873ea337c

This issue was referenced by 1873ea337c24e7a169c306a7467ce899a53eb0f8

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#51243
No description provided.