Operating system: Linux-5.0.0-37-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GT 730/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.56
Broken: version: 2.82 (sub 4), branch: master, commit date: 2019-12-08 18:49, hash: rB761111efb8e4
Short description of error
Some of my shader nodes need to have separate node trees for each their copies.
It seems quite legal to do like this:
def copy(self, node): self.node_tree = bpy.data.node_groups.new('newtree', 'ShaderNodeTree')
When the material is cloned (via ops.material.new), it makes the original tree.users == 0, and new tree.users == 2
Source node becomes zombie and dies after reloading or orphan cleaning.
Target node becomes undead and cannot die because of zero users.
Exact steps for others to reproduce the error
- run attached script from command line: blender --factory-startup --background --python test_op_mat_clone.py
- observe output: all trees are expected to have 1 users