Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-05-25 11:07:10 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-05-25 11:07:10 +0300
commit41bb0548b0c1ac62d30cf14fca371b220e40f72e (patch)
treea7842ef640ec36ba74649711eb893106ee0a57ff /source/blender/blenkernel/intern
parent9b9f84b317feff9454f124330bd3aa774493c003 (diff)
Fix T76897: Lamp Power Not Updating from Driver
Lamps were not tagged with `ID_RECALC_SHADING` when they were updated from drivers. As a result, Cycles considered the lamp as unchanged. This is resolved by having a (seemingly non-functional) callback in a new `LIGHT_UPDATE` depsgraph node. This patch unconditionally adds the `LIGHT_UPDATE` node + the relation from the lamp's PARAMETERS node. Differential Revision: https://developer.blender.org/D7822 Reviewed by: brecht
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/light.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/light.c b/source/blender/blenkernel/intern/light.c
index 3d0503b2e70..58d50787c9f 100644
--- a/source/blender/blenkernel/intern/light.c
+++ b/source/blender/blenkernel/intern/light.c
@@ -47,6 +47,8 @@
#include "BLT_translation.h"
+#include "DEG_depsgraph.h"
+
static void light_init_data(ID *id)
{
Light *la = (Light *)id;
@@ -167,3 +169,8 @@ Light *BKE_light_localize(Light *la)
return lan;
}
+
+void BKE_light_eval(struct Depsgraph *depsgraph, Light *la)
+{
+ DEG_debug_print_eval(depsgraph, __func__, la->id.name, la);
+}