Merge branch 'blender-v5.0-release'
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user