Add "Delete All" function to outliner context menu #23942

Closed
opened 2010-09-22 07:55:14 +02:00 by Torsten Rupp · 22 comments

%%%The attached patch add a "Delete All" function parallel to the already existing "Delete" function in the outliner context menu. "Delete All" delete the object and all child-objects of this object.

If you think this additional function is useful, please review it.

Torsten
%%%

%%%The attached patch add a "Delete All" function parallel to the already existing "Delete" function in the outliner context menu. "Delete All" delete the object and all child-objects of this object. If you think this additional function is useful, please review it. Torsten %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%I changed the text "Delete All" into "Delete Hierarchy" as requested.
%%%

%%%I changed the text "Delete All" into "Delete Hierarchy" as requested. %%%
Author

%%%I fixed a bug in this patch: when in edit mode and the parent object of the object which is currently edited is deleted, a SigSegV occured.

The modified patch check if the current edit object is part of the object hierarchy to delete. If this is the case, leave edit mode first, before starting to delete objects.
%%%

%%%I fixed a bug in this patch: when in edit mode and the parent object of the object which is currently edited is deleted, a SigSegV occured. The modified patch check if the current edit object is part of the object hierarchy to delete. If this is the case, leave edit mode first, before starting to delete objects. %%%
Author

%%%updated to 34026
%%%

%%%updated to 34026 %%%
Author

%%%updated to r37993
%%%

%%%updated to r37993 %%%
Author

%%%I updated to recent trunk, r42450.
%%%

%%%I updated to recent trunk, r42450. %%%
Author

%%%Updated to recent trunk, r46710

This patch add an additional context menu entry "Delete hierarchy" right after the normal "Delete" in the outliner to delete an object and all connected sub-objects. This is a "convenciene" function. E. g. when a complex object which contain a lot of sub-objects is loaded and should later be deleted "Delete hierarchy" can be used.

It would be nice if this patch could finally be integrated, though I can close it on my side and I do not have to keep it up-to-date manually.
%%%

%%%Updated to recent trunk, r46710 This patch add an additional context menu entry "Delete hierarchy" right after the normal "Delete" in the outliner to delete an object and all connected sub-objects. This is a "convenciene" function. E. g. when a complex object which contain a lot of sub-objects is loaded and should later be deleted "Delete hierarchy" can be used. It would be nice if this patch could finally be integrated, though I can close it on my side and I do not have to keep it up-to-date manually. %%%

Added subscriber: @mont29

Added subscriber: @mont29

Is this patch still maintained/alive?

Is this patch still maintained/alive?
Author

Yes, the patch is alive. If you think it is useful I can renew the patch to the latest source version.

Yes, the patch is alive. If you think it is useful I can renew the patch to the latest source version.

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung

Let’s ask Joshua, he’s the maintainer of this area iirc. ;)

Let’s ask Joshua, he’s the maintainer of this area iirc. ;)

Added subscriber: @karja

Added subscriber: @karja

Hey,

can i suggest a delete function which parents children of the deleted object to the upper next object:
KeepChildren.png This would help the reorganization/reordering in the same easy way.
Currently "delete" resolves the relationship completely - a bit strange.

Hey, can i suggest a delete function which parents children of the deleted object to the upper next object: ![KeepChildren.png](https://archive.blender.org/developer/F113478/KeepChildren.png) This would help the reorganization/reordering in the same easy way. Currently "delete" resolves the relationship completely - a bit strange.
Author

Currently I'm renewing the patch with the current version of Blender (I still fight a little bit with building Blender, but I hope I can solve this soon)

I will also check if I can extend the patch to delete an object below some parent object.

Currently I'm renewing the patch with the current version of Blender (I still fight a little bit with building Blender, but I hope I can solve this soon) I will also check if I can extend the patch to delete an object below some parent object.

Thank you, would be really nice.
But its just a suggestion, dont push yourself.

Thank you, would be really nice. But its just a suggestion, dont push yourself.
Author

Dear Karja, dear Bastien, dear Joshua

I'm sorry for the long delay for creating an updated patch. I struggled for some time to get Blender compile again on my Ubuntu 12.04. Now it works again.

I updated the proposed patch for a function to delete a complete object hierarchy to the most recent revision of Blender (last commit 20aed660f5).outliner-delete-hierarchy_level.patch

I also added another delete function to the context menu which I named "Delete level". This delete function remove the selected object and re-add the children to the parent of the deleted object.
It would be nice if someone would be able to review the proposed patch. I'm looking forward that the patch will be accepted and finally can be closed.

Dear Karja, dear Bastien, dear Joshua I'm sorry for the long delay for creating an updated patch. I struggled for some time to get Blender compile again on my Ubuntu 12.04. Now it works again. I updated the proposed patch for a function to delete a complete object hierarchy to the most recent revision of Blender (last commit 20aed660f5d852ea81ff42d1e998ebc74374900b).[outliner-delete-hierarchy_level.patch](https://archive.blender.org/developer/F133249/outliner-delete-hierarchy_level.patch) I also added another delete function to the context menu which I named "Delete level". This delete function remove the selected object and re-add the children to the parent of the deleted object. It would be nice if someone would be able to review the proposed patch. I'm looking forward that the patch will be accepted and finally can be closed.

@rupp thanks for the update. Aside from some minor style issues (which I will handle before final commit, but please try to follow http://wiki.blender.org/index.php/Dev:Doc/Code_Style), the 'delete hierarchy' part is OK. Can you please give me a (public) email address, so that I can commit it on your behalf?

The 'delete level' however is a nice idea, but is not so simple to implement correctly. Thing is, parenting in Blender is quite complex, with things like inverse parent matrix, parenting to curve/vertex(-tices)/armature/bone/… Simply re-affecting parent itself is not enough, we probably need a new ED_object_reparent() or something like that. So for now, I would just keep simple behavior of 'Delete' code (i.e. drop parenting all together).

@rupp thanks for the update. Aside from some minor style issues (which I will handle before final commit, but please try to follow http://wiki.blender.org/index.php/Dev:Doc/Code_Style), the 'delete hierarchy' part is OK. Can you please give me a (public) email address, so that I can commit it on your behalf? The 'delete level' however is a nice idea, but is not so simple to implement correctly. Thing is, parenting in Blender is quite complex, with things like inverse parent matrix, parenting to curve/vertex(-tices)/armature/bone/… Simply re-affecting parent itself is not enough, we probably need a new `ED_object_reparent()` or something like that. So for now, I would just keep simple behavior of 'Delete' code (i.e. drop parenting all together).

This issue was referenced by 82223270a8

This issue was referenced by 82223270a83f76529e0712cedbf128b07c5499ff

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 82223270a8.

Closed by commit 82223270a8.
Author

Dear Bastien,

Thank you very much for the commit.

I'm sorry for my late answer.
If you still need a public email address: torsten.rupp@gmx.net

I will check the coding styles again to create a better patch next time.

Dear Bastien, Thank you very much for the commit. I'm sorry for my late answer. If you still need a public email address: torsten.rupp@gmx.net I will check the coding styles again to create a better patch next time.
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#23942
No description provided.