Merge branch 'blender-v3.3-release'
This commit is contained in:
commit
13b2716e1c
|
@ -97,10 +97,8 @@ static Image *create_placeholder_image(Main *bmain, const std::string &path)
|
|||
|
||||
static Image *load_texture_image(Main *bmain,
|
||||
const tex_map_XX &tex_map,
|
||||
bNode *r_node,
|
||||
bool relative_paths)
|
||||
{
|
||||
BLI_assert(r_node && r_node->type == SH_NODE_TEX_IMAGE);
|
||||
Image *image = nullptr;
|
||||
|
||||
/* First try treating texture path as relative. */
|
||||
|
@ -371,7 +369,8 @@ void ShaderNodetreeWrap::add_image_textures(Main *bmain, Material *mat, bool rel
|
|||
}
|
||||
|
||||
bNode *image_texture = add_node_to_tree(SH_NODE_TEX_IMAGE);
|
||||
Image *image = load_texture_image(bmain, texture_map.value, image_texture, relative_paths);
|
||||
BLI_assert(image_texture);
|
||||
Image *image = load_texture_image(bmain, texture_map.value, relative_paths);
|
||||
if (image == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1267,6 +1267,20 @@ static void rna_NodeTree_active_node_set(PointerRNA *ptr,
|
|||
|
||||
if (node && BLI_findindex(&ntree->nodes, node) != -1) {
|
||||
nodeSetActive(ntree, node);
|
||||
|
||||
/* Handle NODE_DO_OUTPUT as well. */
|
||||
if (node->typeinfo->nclass == NODE_CLASS_OUTPUT && node->type != CMP_NODE_OUTPUT_FILE) {
|
||||
/* If this node becomes the active output, the others of the same type can't be the active
|
||||
* output anymore. */
|
||||
LISTBASE_FOREACH (bNode *, other_node, &ntree->nodes) {
|
||||
if (other_node->type == node->type) {
|
||||
other_node->flag &= ~NODE_DO_OUTPUT;
|
||||
}
|
||||
}
|
||||
node->flag |= NODE_DO_OUTPUT;
|
||||
ntreeSetOutput(ntree);
|
||||
BKE_ntree_update_tag_active_output_changed(ntree);
|
||||
}
|
||||
}
|
||||
else {
|
||||
nodeClearActive(ntree);
|
||||
|
@ -12400,7 +12414,7 @@ static void rna_def_nodetree_nodes_api(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
prop, "rna_NodeTree_active_node_get", "rna_NodeTree_active_node_set", NULL, NULL);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
|
||||
RNA_def_property_ui_text(prop, "Active Node", "Active node in this tree");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, "rna_NodeTree_update");
|
||||
}
|
||||
|
||||
static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
|
|
Loading…
Reference in New Issue