Fix #108591: Handle null material adding paint slot #108592
|
@ -6641,7 +6641,7 @@ static void default_paint_slot_color_get(int layer_type, Material *ma, float col
|
|||
if (ma && ma->nodetree) {
|
||||
ma->nodetree->ensure_topology_cache();
|
||||
const blender::Span<bNode *> nodes = ma->nodetree->nodes_by_type("ShaderNodeBsdfPrincipled");
|
||||
nodes.is_empty() ? nullptr : nodes.first();
|
||||
in_node = nodes.is_empty() ? nullptr : nodes.first();
|
||||
ChengduLittleA marked this conversation as resolved
Outdated
|
||||
}
|
||||
if (!in_node) {
|
||||
/* An existing material or Principled BSDF node could not be found.
|
||||
|
|
Loading…
Reference in New Issue
Am I missing something?
nodes.is_empty() ? nullptr : nodes.first();
doesn't seem to do anything