assets of non active scenes arent purged of elements with zero users after saving and re-opening #71875

Closed
opened 2019-11-25 03:01:15 +01:00 by michael campbell · 7 comments

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.86

Blender Version
Broken: version: 2.82 (sub 1), branch: master, commit date: 2019-11-22 18:14, hash: 373e936e3e
Worked: (optional)

Short description of error
assets of non active scenes arent purged of elements with zero users after saving and re-opening

Exact steps for others to reproduce the error
open the attached file, open the 3 scenes one at a time and delete the mesh from each. Change the outliner to blend file mode so you can see how many materials etc there are in the current scene. Save the file, re-open the file. Open each of the scenes and notice that only the materials etc of the scene that was active during saving/re-opening were removed from the blend file.

zero user purge bug in multiple scenes.blend

**System Information** Operating system: Windows-10-10.0.17134 64 Bits Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.86 **Blender Version** Broken: version: 2.82 (sub 1), branch: master, commit date: 2019-11-22 18:14, hash: `373e936e3e` Worked: (optional) **Short description of error** assets of non active scenes arent purged of elements with zero users after saving and re-opening **Exact steps for others to reproduce the error** open the attached file, open the 3 scenes one at a time and delete the mesh from each. Change the outliner to blend file mode so you can see how many materials etc there are in the current scene. Save the file, re-open the file. Open each of the scenes and notice that only the materials etc of the scene that was active during saving/re-opening were removed from the blend file. [zero user purge bug in multiple scenes.blend](https://archive.blender.org/developer/F8163730/zero_user_purge_bug_in_multiple_scenes.blend)

Added subscriber: @3di

Added subscriber: @3di

Added subscriber: @AnthonyEdlin

Added subscriber: @AnthonyEdlin

Hi, thanks for the report.

I could not reproduce this on 2.81 or my local master. Every time I tried it worked as designed. All meshes (3 of them) would be deleted from the file once I reopened it. If I repeat the process of saving and opening two more times then the materials and then textures would also be deleted. Note you can see what should be deleted if you go to outliner and set display mode to Orphan Data.

Hi, thanks for the report. I could not reproduce this on 2.81 or my local master. Every time I tried it worked as designed. All meshes (3 of them) would be deleted from the file once I reopened it. If I repeat the process of saving and opening two more times then the materials and then textures would also be deleted. Note you can see what should be deleted if you go to outliner and set display mode to Orphan Data.

ah ok, I didn't realise you had to save and re-open the file 3 times for unused assets to be purged. I'll just write a bit of python to automatically do it without saving and re-opening, is there an inbuilt function already, or do I need to loop through each data type one by one?

ah ok, I didn't realise you had to save and re-open the file 3 times for unused assets to be purged. I'll just write a bit of python to automatically do it without saving and re-opening, is there an inbuilt function already, or do I need to loop through each data type one by one?

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Anthony Edlin self-assigned this 2019-11-25 19:27:25 +01:00

If you select the display mode of the outliner to Orphan Data then a Purge button shows up that you can click to remove things that have 0 users. The python code for the purge operator is "bpy.ops.outliner.orphans_purge()"

Closing for now, reopen if you can find an error.

If you select the display mode of the outliner to Orphan Data then a Purge button shows up that you can click to remove things that have 0 users. The python code for the purge operator is "bpy.ops.outliner.orphans_purge()" Closing for now, reopen if you can find an error.

perfect, thanks.

perfect, thanks.
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
2 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#71875
No description provided.