Page MenuHome

Crash after removing lamp, linked to "Lamp Data" shader node in Material Mode.
Closed, ResolvedPublic

Description

Exact steps for others to reproduce the error

  1. Create Lamp Data Node for any node material
  2. Select any scene lamp in Lamp Data Node
  3. Switch to Material mode
  4. Remove that lamp from the scene

After research I found that it happens because field "users" of linked lamp not incremented when lamp is being selected in Lamp Node.
Nevertheless after opening saved file "users" restores correct number of links and lamp origin becomes blue. IMO increasing and decreasing of "us" field should be in combobox event handler of "Lamp Data" shader node,
but I've not found any good infrastacture for this yet.

Event Timeline

Alexander Romanov (a.romanov) raised the priority of this task from to Needs Triage by Developer.
Alexander Romanov (a.romanov) updated the task description. (Show Details)

After this fix the bug has gone, but there is one more problem left.

  1. While adding or deleting lamp in Lamp Data node the number of its users does not change. Thus it will disappear from datablocks after deleting.
  2. If we press Ctl+Z or save and reopen file the number of users becomes correct. And it will stay in datablocks after deleting.

This is known and a separate issue check T42523

Looks like it was done on purpose to avoid a crash on exit but we might want to check that one again.

Tag for searching purposes: Blend4Web