Page MenuHome

Fix: Shaders not visible after socket builder refactoring
AbandonedPublic

Authored by Aaron Carlisle (Blendify) on Jan 8 2022, 6:10 PM.

Details

Summary

In the "Material Properties" of the selected object, the list of shaders is blank in Surface and Volume drop-downs.
While iterating over the list socket_type is always set to -1 for SOCK_SHADER in node_templates

if (!ui_compatible_sockets(item.socket_type, sock->type)) {
  continue;
}

The patch only fixes the shader type but this might apply to other types too.

Diff Detail

Repository
rB Blender

Event Timeline

Ahmet Goral (agoral) requested review of this revision.Jan 8 2022, 6:10 PM
Ahmet Goral (agoral) created this revision.
Ahmet Goral (agoral) edited the summary of this revision. (Show Details)Jan 8 2022, 8:37 PM
Aaron Carlisle (Blendify) retitled this revision from Shaders not visible after socket builder refactoring to Fix: Shaders not visible after socket builder refactoring .Jan 8 2022, 8:59 PM
Aaron Carlisle (Blendify) edited the summary of this revision. (Show Details)

Thanks for looking into this, I think a better solution might be to fix this for all socket types.

I made a patch for this here: D13778

Great! I think including other types is the correct way to fix this too though I wasn't sure what I could break without knowing the extent of the impact of such a change.