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/depsgraph/intern/node
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/depsgraph/intern/node')
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_operation.cc2
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_operation.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.cc b/source/blender/depsgraph/intern/node/deg_node_operation.cc
index 1e03d51f557..1a73d81d053 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.cc
@@ -173,6 +173,8 @@ const char *operationCodeAsString(OperationCode opcode)
return "SHADING";
case OperationCode::MATERIAL_UPDATE:
return "MATERIAL_UPDATE";
+ case OperationCode::LIGHT_UPDATE:
+ return "LIGHT_UPDATE";
case OperationCode::WORLD_UPDATE:
return "WORLD_UPDATE";
/* Movie clip. */
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.h b/source/blender/depsgraph/intern/node/deg_node_operation.h
index 2faf139ec93..214f5e8b094 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.h
@@ -170,6 +170,7 @@ enum class OperationCode {
/* Shading. ------------------------------------------------------------- */
SHADING,
MATERIAL_UPDATE,
+ LIGHT_UPDATE,
WORLD_UPDATE,
/* Batch caches. -------------------------------------------------------- */