Merge branch 'blender-v5.0-release'

This commit is contained in:
Omar Emara
2025-10-09 18:28:30 +03:00
4 changed files with 26 additions and 2 deletions

View File

@@ -302,7 +302,6 @@ class NODE_MT_compositor_node_vector_base(node_add_menu.NodeMenu):
ops.value = "'VECTOR'"
self.node_operator(layout, "ShaderNodeSeparateXYZ")
layout.separator()
self.node_operator(layout, "ShaderNodeRadialTiling")
self.node_operator(layout, "ShaderNodeVectorCurve")
self.node_operator_with_searchable_enum(context, layout, "ShaderNodeVectorMath", "operation")
self.node_operator(layout, "ShaderNodeVectorRotate")

View File

@@ -38,6 +38,17 @@ bool sh_node_poll_default(const blender::bke::bNodeType * /*ntype*/,
return true;
}
static bool sh_geo_poll_default(const blender::bke::bNodeType * /*ntype*/,
const bNodeTree *ntree,
const char **r_disabled_hint)
{
if (!STR_ELEM(ntree->idname, "ShaderNodeTree", "GeometryNodeTree")) {
*r_disabled_hint = RPT_("Not a shader or geometry node tree");
return false;
}
return true;
}
static bool common_poll_default(const blender::bke::bNodeType * /*ntype*/,
const bNodeTree *ntree,
const char **r_disabled_hint)
@@ -60,6 +71,17 @@ void sh_node_type_base(blender::bke::bNodeType *ntype,
ntype->gather_link_search_ops = blender::nodes::search_link_ops_for_basic_node;
}
void sh_geo_node_type_base(blender::bke::bNodeType *ntype,
std::string idname,
const std::optional<int16_t> legacy_type)
{
blender::bke::node_type_base(*ntype, idname, legacy_type);
ntype->poll = sh_geo_poll_default;
ntype->insert_link = node_insert_link_default;
ntype->gather_link_search_ops = blender::nodes::search_link_ops_for_basic_node;
}
void common_node_type_base(blender::bke::bNodeType *ntype,
std::string idname,
const std::optional<int16_t> legacy_type)

View File

@@ -46,6 +46,9 @@ bool sh_node_poll_default(const blender::bke::bNodeType *ntype,
void sh_node_type_base(blender::bke::bNodeType *ntype,
std::string idname,
std::optional<int16_t> legacy_type = std::nullopt);
void sh_geo_node_type_base(blender::bke::bNodeType *ntype,
std::string idname,
std::optional<int16_t> legacy_type = std::nullopt);
void common_node_type_base(blender::bke::bNodeType *ntype,
std::string idname,
std::optional<int16_t> legacy_type = std::nullopt);

View File

@@ -209,7 +209,7 @@ void register_node_type_sh_radial_tiling()
static blender::bke::bNodeType ntype;
common_node_type_base(&ntype, "ShaderNodeRadialTiling");
sh_geo_node_type_base(&ntype, "ShaderNodeRadialTiling");
ntype.ui_name = "Radial Tiling";
ntype.ui_description = "Transform Coordinate System for Radial Tiling";
ntype.nclass = NODE_CLASS_OP_VECTOR;