Data belonging to unused appended group is impossible to delete from file #44890

Closed
opened 2015-05-29 23:58:01 +02:00 by Diet Coke · 19 comments

If a group is appended from another file, it is impossible to remove the group datablock, as well as the object/mesh/etc. datablocks because the original objects are not in the scene and can't be deleted. Even if the group datablock has no duplicator objects using it, and no objects in any scenes are members of it, it doesn't get purged like other 0-user datablocks in blender on file save. This also prevents all of the datablocks used by the group from being purged.

This bug was reported in 2006:

https://developer.blender.org/T4355

And was incorrectly closed due to being marked as archived. This behavior still exists.

If a group is appended from another file, it is impossible to remove the group datablock, as well as the object/mesh/etc. datablocks because the original objects are not in the scene and can't be deleted. Even if the group datablock has no duplicator objects using it, and no objects in any scenes are members of it, it doesn't get purged like other 0-user datablocks in blender on file save. This also prevents all of the datablocks used by the group from being purged. This bug was reported in 2006: https://developer.blender.org/T4355 And was incorrectly closed due to being marked as archived. This behavior still exists.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Ton Roosendaal was assigned by Diet Coke 2015-05-29 23:58:01 +02:00
Author

Added subscriber: @dlots

Added subscriber: @dlots
Member

Added subscribers: @Ton, @Blendify

Added subscribers: @Ton, @Blendify
Ton Roosendaal was unassigned by Aaron Carlisle 2015-05-30 02:01:09 +02:00
Member

Please don't make assignments yourself

Please don't make assignments yourself
Member

What blender version are you using

What blender version are you using
Author

This is also occuring with this plugin because the plugin does not place the objects assigned to the group into the scene anywhere (as opposed to append, which does).

http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/CutCopyPaste3D

This is an issue that stems from the fact that it is (presumably) impossible to remove an object from a group causing a recursive usage scenario. It appears to be not possible to remove an object from a group in the UI other than from the Properties panel when said object is selected. However, it's not possible to select a deleted object.

Essentially this appears to be an issue of an object not being removed from a group though it doesn't exist anywhere in the scenes. group_paste_error_consumer.blend

To accomplish this orphaned scenario. Append an instance of a group (an empty duplicating a group). This will append the instance and the contents of the group. Delete the instance and the contents with one operation. Normally, this will remove the objects from the Datablocks view of the outliner, because they will not have a user, in this case this recursive orphaning occurs.

This is also occuring with this plugin because the plugin does not place the objects assigned to the group into the scene anywhere (as opposed to append, which does). http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/CutCopyPaste3D This is an issue that stems from the fact that it is (presumably) impossible to remove an object from a group causing a recursive usage scenario. It appears to be not possible to remove an object from a group in the UI other than from the Properties panel when said object is selected. However, it's not possible to select a deleted object. Essentially this appears to be an issue of an object not being removed from a group though it doesn't exist anywhere in the scenes. [group_paste_error_consumer.blend](https://archive.blender.org/developer/F181717/group_paste_error_consumer.blend) To accomplish this orphaned scenario. Append an instance of a group (an empty duplicating a group). This will append the instance and the contents of the group. Delete the instance and the contents with one operation. Normally, this will remove the objects from the Datablocks view of the outliner, because they will not have a user, in this case this recursive orphaning occurs.
Author

This is with 2.74 3-31 release from the main site and has been occuring since atleast 2.65, but presumably during all of Blender's life.

This is with 2.74 3-31 release from the main site and has been occuring since atleast 2.65, but presumably during all of Blender's life.
Author

group_paste_error_provider.blend

You can append the test duplicating empty from this provider file.

[group_paste_error_provider.blend](https://archive.blender.org/developer/F181720/group_paste_error_provider.blend) You can append the test duplicating empty from this provider file.
Author

I have a file that has materials caused by workflow as well. I don't quite remember how these materials accumulated these ghost users but I will try to remember.

In addition, this plugin:

http://blenderartists.org/forum/showthread.php?282550-A-new-tree-add-on&p=2878164&viewfull=1#post2878164

May be interacting with the algorithm that culls recursive orphaned objects as relevant to this error.

I have a file that has materials caused by workflow as well. I don't quite remember how these materials accumulated these ghost users but I will try to remember. In addition, this plugin: http://blenderartists.org/forum/showthread.php?282550-A-new-tree-add-on&p=2878164&viewfull=1#post2878164 May be interacting with the algorithm that culls recursive orphaned objects as relevant to this error.
Member

Added subscriber: @MichelAnders

Added subscriber: @MichelAnders

Added subscriber: @sindra1961

Added subscriber: @sindra1961

I think that I can delete it in the following procedures.

gr1.png
Carry out 'Link Group Objects To Scene' for each groups.
gr2.png
Because Objects becomes selectable, delete the Group setting of each Object.
gr3.png
Delete each Objects.
After having saved it, load it.
Carry out 'Unlink Group' for each group.
After having saved it, load it.
It should be deleted all.

This is the result that I deleted from group_paste_error_consumer.blend.
group2.blend

I think that I can delete it in the following procedures. ![gr1.png](https://archive.blender.org/developer/F181813/gr1.png) Carry out 'Link Group Objects To Scene' for each groups. ![gr2.png](https://archive.blender.org/developer/F181815/gr2.png) Because Objects becomes selectable, delete the Group setting of each Object. ![gr3.png](https://archive.blender.org/developer/F181817/gr3.png) Delete each Objects. After having saved it, load it. Carry out 'Unlink Group' for each group. After having saved it, load it. It should be deleted all. This is the result that I deleted from group_paste_error_consumer.blend. [group2.blend](https://archive.blender.org/developer/F181820/group2.blend)
Member

I think this can even be done quicker by selecting ´orphaned data' in the outliner and clicking 'Purge all' (but you need to do that twice)
Screenshot_2015-05-30_11-08-12.png

The addon appends a bunch of materials and particle systems from a bundled library but does not instance any objects in the scene. So all those items are in fact immediately orphaned, unless the user selects one of them to use on a tree object.

Now any objects with zero users are purged on saving the .blend (just like when you click purge all) but this is not done recursively: the object for example are purge but leave their associated meshes with zero user in turn and these are not purged (unless you click Purge all again).

So the bug (if it is a bug, their might be a good reason for this behaviour) is that purge-on-save does not act recursively.

I think this can even be done quicker by selecting ´orphaned data' in the outliner and clicking 'Purge all' (but you need to do that twice) ![Screenshot_2015-05-30_11-08-12.png](https://archive.blender.org/developer/F181867/Screenshot_2015-05-30_11-08-12.png) The addon appends a bunch of materials and particle systems from a bundled library but does not instance any objects in the scene. So all those items are in fact immediately orphaned, unless the user selects one of them to use on a tree object. Now any objects with zero users are purged on saving the .blend (just like when you click purge all) but this is not done recursively: the object for example are purge but leave their associated meshes with zero user in turn and these are not purged (unless you click Purge all again). So the bug (if it is a bug, their might be a good reason for this behaviour) is that purge-on-save does not act recursively.

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2015-05-30 14:37:33 +02:00

This is currently the intended behavior for groups, they are not removed automatically even if they have zero users. It's one of the datablocks that have this exception. It might be good to remove at some point, but that gives various other issues which then need to be solved first, so it's not a simple change and more of a bigger redesign.

And yes, having to load and save multiple times to get rid of all unused datablocks is silly, but it's not considered a bug at the moment and is a limitation in the current design.

This is currently the intended behavior for groups, they are not removed automatically even if they have zero users. It's one of the datablocks that have this exception. It might be good to remove at some point, but that gives various other issues which then need to be solved first, so it's not a simple change and more of a bigger redesign. And yes, having to load and save multiple times to get rid of all unused datablocks is silly, but it's not considered a bug at the moment and is a limitation in the current design.

Added subscriber: @AdamJanz

Added subscriber: @AdamJanz

For anyone who has come across this issue in 2018:

In my case, a linked group of a shrub model was preventing the same model from then being appended, and it seemed nearly impossible to delete the offending group. Well, it is not impossible! :-)

In the Outliner, select "Blender File" for type of data to display, and inside "Groups", right-click on the offending group and press Delete. You may need to save, close, and re-open the .blend file. Then you will need to scroll down to the linked data section (identified by a Document Icon with an Arrow), right-click it, and select "Delete". Again, you may need to save, close, and re-open the .blend for the changes to take effect. Now you should be able to append the file as normal. :-)

For anyone who has come across this issue in 2018: In my case, a linked group of a shrub model was preventing the same model from then being appended, and it seemed nearly impossible to delete the offending group. Well, it is not impossible! :-) In the Outliner, select "Blender File" for type of data to display, and inside "Groups", right-click on the offending group and press Delete. You may need to save, close, and re-open the .blend file. Then you will need to scroll down to the linked data section (identified by a Document Icon with an Arrow), right-click it, and select "Delete". Again, you may need to save, close, and re-open the .blend for the changes to take effect. Now you should be able to append the file as normal. :-)

I thank God for a much simpler solution to this issue. Posted answer on StackExchange here .

I thank God for a much simpler solution to this issue. Posted answer on [StackExchange here ](https://blender.stackexchange.com/a/105680/39431).
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
6 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#44890
No description provided.