Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-11-23 18:55:51 +0300
committerHans Goudey <h.goudey@me.com>2021-11-23 18:55:51 +0300
commitfab39440e94d94b0a6ea8ef7771312adbab98e66 (patch)
tree60cfd6396917cdff6ed5cabf312b91ae76a8f707 /source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
parenta9eb4e6f5905df989eb763749e8adee9e55b897b (diff)
Cleanup: Simplify geometry node function names
With this commit, we no longer use the prefixes for every node type function like `geo_node_translate_instances_`. They just added more places to change when adding a new node, for no real benefit. Differential Revision: https://developer.blender.org/D13337
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
index 41a6646f9f8..1901097c369 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
@@ -42,7 +42,7 @@ void curve_create_default_rotation_attribute(Span<float3> tangents,
namespace blender::nodes::node_geo_curve_to_points_cc {
-static void geo_node_curve_to_points_declare(NodeDeclarationBuilder &b)
+static void node_declare(NodeDeclarationBuilder &b)
{
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
b.add_input<decl::Int>(N_("Count")).default_value(10).min(2).max(100000);
@@ -53,12 +53,12 @@ static void geo_node_curve_to_points_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Vector>(N_("Rotation")).field_source();
}
-static void geo_node_curve_to_points_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "mode", 0, "", ICON_NONE);
}
-static void geo_node_curve_to_points_init(bNodeTree *UNUSED(tree), bNode *node)
+static void node_init(bNodeTree *UNUSED(tree), bNode *node)
{
NodeGeometryCurveToPoints *data = (NodeGeometryCurveToPoints *)MEM_callocN(
sizeof(NodeGeometryCurveToPoints), __func__);
@@ -67,7 +67,7 @@ static void geo_node_curve_to_points_init(bNodeTree *UNUSED(tree), bNode *node)
node->storage = data;
}
-static void geo_node_curve_to_points_update(bNodeTree *ntree, bNode *node)
+static void node_update(bNodeTree *ntree, bNode *node)
{
NodeGeometryCurveToPoints &node_storage = *(NodeGeometryCurveToPoints *)node->storage;
const GeometryNodeCurveResampleMode mode = (GeometryNodeCurveResampleMode)node_storage.mode;
@@ -303,7 +303,7 @@ static void copy_spline_domain_attributes(const CurveEval &curve,
ATTR_DOMAIN_CURVE);
}
-static void geo_node_curve_to_points_exec(GeoNodeExecParams params)
+static void node_geo_exec(GeoNodeExecParams params)
{
NodeGeometryCurveToPoints &node_storage = *(NodeGeometryCurveToPoints *)params.node().storage;
const GeometryNodeCurveResampleMode mode = (GeometryNodeCurveResampleMode)node_storage.mode;
@@ -385,13 +385,13 @@ void register_node_type_geo_curve_to_points()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_CURVE_TO_POINTS, "Curve to Points", NODE_CLASS_GEOMETRY, 0);
- ntype.declare = file_ns::geo_node_curve_to_points_declare;
- ntype.geometry_node_execute = file_ns::geo_node_curve_to_points_exec;
- ntype.draw_buttons = file_ns::geo_node_curve_to_points_layout;
+ ntype.declare = file_ns::node_declare;
+ ntype.geometry_node_execute = file_ns::node_geo_exec;
+ ntype.draw_buttons = file_ns::node_layout;
node_type_storage(
&ntype, "NodeGeometryCurveToPoints", node_free_standard_storage, node_copy_standard_storage);
- node_type_init(&ntype, file_ns::geo_node_curve_to_points_init);
- node_type_update(&ntype, file_ns::geo_node_curve_to_points_update);
+ node_type_init(&ntype, file_ns::node_init);
+ node_type_update(&ntype, file_ns::node_update);
nodeRegisterType(&ntype);
}