Page MenuHome

Method `Node.free` is not called for nested `ShaderNodeCustomGroup` when parent `ShaderNodeTree` is removed
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Linux-5.0.0-36-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GT 730/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.56

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-18 12:53, hash: rB115a5bf65a6b
Worked: (optional)

Short description of error
Removing NodeTree implies freeing all containing nodes and calling their Node.free methods.
However, the method is not called for classes derived from ShaderNodeCustomGroup and having the method defined.

Exact steps for others to reproduce the error

  1. Load attached file and execute nodes.py script
  2. Goto 'Shading' window, call operator "add baz", remove created node.
  3. Watch console

Expected behavior

creating <bpy_struct, my.baz("baz")>
creating <bpy_struct, my.foo("foo")>
creating <bpy_struct, my.bar("bar")>
freeing <bpy_struct, my.baz("baz")>
freeing <bpy_struct, my.foo("foo")>
freeing <bpy_struct, my.bar("bar")>

Observed behavior

creating <bpy_struct, my.baz("baz")>
creating <bpy_struct, my.foo("foo")>
creating <bpy_struct, my.bar("bar")>
freeing <bpy_struct, my.baz("baz")>

Details

Type
Bug

Event Timeline