Fix #105096: Material Utilities: Clean Material Slots fails to remove unused slots #105098
No reviewers
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#105098
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Mysteryem/blender-addons:fix_105096_material_utilities_clean_slots"
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?
The code was removing material slots while iterating through them which
is generally a bad idea, and it stopped working as the addon expected in
Blender 3.0+.
The slots are now removed by counting how many slots there are and then
removing that number of slots.
now seams to work. thanks
Hi, this Indeed fixes the bug. But we already have similar Cpp operator, perhaps we can remove it from the add-on's code in future?
Yes I think it could be removed from the addon's code.
While the addon has implemented its unused material removal for more than just active/selected Objects, e.g. all Objects in the .blend, the addon's Operator only ever uses either the active or the selected Objects.
Removing from selected Objects is obsolete because that's what
Object
>Cleanup
>Remove Unused Material Slots
from the 3D View does.And removing from the active Object is obsolete because that's what doing
Remove Unused Slots
from the "Material Specials" menu in Properties does.