GPUOpen-LibrariesAndSDKs / BlenderUSDHydraAddon

This add-on allows you to assemble and compose USD data with Blender data and render it all using various renderers via Hydra.
Apache License 2.0
367 stars 38 forks source link

RPRBLND-1990: path_tracer_shade.h:41: '' : syntax error, unexpected IDENTIFIER #187

Closed VascoPi closed 2 years ago

VascoPi commented 2 years ago

PURPOSE

Fix an error with parsing MaterialX when input and output types of connected node's sockets.

EFFECT OF CHANGE

Node's link in MaterialX nodetree editor now becomes invalid when types of output and input node's sockets are different. Fixed switch to MaterialX nodetree editor if secondary window of blender are opened.

TECHNICAL STEPS

Added update_links() method to MxNodeTree. It is used when Blender calls update() of MxNodeTree and depsgraph_update of ui/material.py. In depsgraph_update now iterates throught all context.window_manager.windows.

NOTES FOR REVIEWERS

In MaterialX node editor now links become red/invalid and nodes aren't calculated. To have the correct render result, the user needs to define all socket types properly before rendering.