Page MenuHome

Making 'singleuser' for a group with too smart NodeCustomGroup breaks user counters of both source and target nodes
Confirmed, NormalPublicBUG


System Information
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

Blender Version
Broken: version: 2.82 (sub 6), branch: master, commit date: 2019-12-23 08:34, hash: rB708045eb40b9
Worked: (optional)

Short description of error
When node tries to copy its nodetree in copy api function, user counters get broken when a group with such node is singleusered.

It seems like the same issue as with cloning materials T72317
Most likely it will also happen when singleusering a material.

Exact steps for others to reproduce the error

  1. load attached blend file and execute embedded script -- the script registers 2 custom nodes, node foo uses shared nodetree, node 'bar' tries to copy nodetree
  2. navigate to compositor -- it already contains 2 copies of a group containing these nodes
  3. observe node groups in data api view initial disposition: NodeGroup (2 users), foo (1 user), bar (1 user)
  4. click 'make single user' on one of the groups
  5. observe node groups in data api view expected: NodeGroup (1 user), NodeGroup.001 (1 user), foo (2 users), bar (1 user, source node), bar.dup (1 user, new node) observed: NodeGroup (1 user), NodeGroup.001 (1 user), foo (2 users), bar (0 users), bar.dup (2 users)