MaterialX Realtime results update in viewport render #42

Closed
Vasyl Pidhirskyi wants to merge 1 commits from Vasyl-Pidhirskyi/blender_bn:BLEN-412 into hydra-render

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

View File

@ -5,6 +5,7 @@
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"
#include "DNA_scene_types.h" #include "DNA_scene_types.h"
#include "DNA_node_types.h"
#include "blender_scene_delegate.h" #include "blender_scene_delegate.h"
@ -399,6 +400,15 @@ void BlenderSceneDelegate::check_updates()
} }
} break; } 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: { case ID_WO: {
if (id->recalc & ID_RECALC_SHADING) { if (id->recalc & ID_RECALC_SHADING) {
do_update_world = true; do_update_world = true;