From a25ec59378f6cac03b6fc0e35199ee1e1d021776 Mon Sep 17 00:00:00 2001 From: Vasyl-Pidhirskyi Date: Wed, 17 May 2023 13:46:07 +0300 Subject: [PATCH] Added support for NTREE_SHADER update. --- .../hydra/scene_delegate/blender_scene_delegate.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc index 7cc48f1e2b47..9a845273661a 100644 --- a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc +++ b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc @@ -5,6 +5,7 @@ #include "DEG_depsgraph_query.h" #include "DNA_scene_types.h" +#include "DNA_node_types.h" #include "blender_scene_delegate.h" @@ -399,6 +400,15 @@ void BlenderSceneDelegate::check_updates() } } break; + case ID_NT: { + if (((bNodeTree *)id)->type == NTREE_SHADER) { + MaterialData *mat_data = material_data(material_prim_id((Material *)((bNodeTree *)id)->owner_id)); + if (mat_data) { + mat_data->update(); + } + } + } break; + case ID_WO: { if (id->recalc & ID_RECALC_SHADING) { do_update_world = true; -- 2.30.2