Garbage materials with no users are saved. #49568
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#49568
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
win7 x64
Blender Version
2.78
Short description of error
I found, that materials without users was saved. After resaving, they gone from main file, but still in the backup.
Garbage.7z
Changed status to: 'Open'
Added subscriber: @Vyach
Added subscriber: @mont29
Though this should not happen with new data-blocks handling code, this is how things have been working in Blender since ever…
Unless you can provide us a clear and detailed way to reproduce getting those materials with bad user count, we can’t do anything.
I found how to reproduce this
for the initial i have file with few lights and one basic material (duffuse+glossy cycles shader), that assigned to fake user. And duplicating materials with Shift+D in my settings.
New file. Select and delete all. Add box. Add material slot to Object, assign those basic material to object, click to F to clear fake user
Now switch to Data and add material slot for data. And assign Basic material again, then make it unique and change color and name just to be sure.
Duplicate box few times. It will make few copies of both materials (assigned to data and to object).
Save file.
Select all, delete, save file, close Blender. Open Blender again, open this file again.
Add box and check what materials you can assign to it. I see all materials that was assigned to data, but all materials assigned to object was gone.
my initial file.7z
garbage2.7z — result
Changed status from 'Open' to: 'Archived'
Ahhh… OK.
So there is no bug here in fact, what happens is that materials assigned to obdata (meshes etc.) 'belong' to those data, not to the object. When you delete the object, the meshes remain available, so their materials are still used by those meshes.
First save and reload will clear the meshes (since those had zero users), and next save and reload will clear the meshes' materials.
Oh! I understand now how it works!
There is not hiererchical checking and deleting.
I think, it will be useful to have special clear button, that checks all unused data through the file and clear it immediately without 2 reloadings of file. I see why saving of data is made, it is useful to keep it from accidental loosing. But clearing will add balance to it. Just because sometimes you need to get rid of unwanted datas from lists (materials, meshes, textures) that appears after editing, testing and copying different versions.
Btw where I can suggest this to developers?