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-09-20 02:54:03 +0300
committerHans Goudey <h.goudey@me.com>2021-09-20 02:54:03 +0300
commit25aa943e8cb8d5a33beb906207255e5d0ea08544 (patch)
tree3afc05c069b180369de4315f1110908349d59a07 /source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
parent276eebb274744d819dcdab8a95770dd7382c0664 (diff)
Cleanup: Fix/improve variable names and comments
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.cc18
1 files changed, 9 insertions, 9 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 623f2da8f11..1e66b340f5c 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
@@ -46,7 +46,7 @@ static void geo_node_curve_to_points_init(bNodeTree *UNUSED(tree), bNode *node)
NodeGeometryCurveToPoints *data = (NodeGeometryCurveToPoints *)MEM_callocN(
sizeof(NodeGeometryCurveToPoints), __func__);
- data->mode = GEO_NODE_CURVE_SAMPLE_COUNT;
+ data->mode = GEO_NODE_CURVE_RESAMPLE_COUNT;
node->storage = data;
}
@@ -58,8 +58,8 @@ static void geo_node_curve_to_points_update(bNodeTree *UNUSED(ntree), bNode *nod
bNodeSocket *count_socket = ((bNodeSocket *)node->inputs.first)->next;
bNodeSocket *length_socket = count_socket->next;
- nodeSetSocketAvailability(count_socket, mode == GEO_NODE_CURVE_SAMPLE_COUNT);
- nodeSetSocketAvailability(length_socket, mode == GEO_NODE_CURVE_SAMPLE_LENGTH);
+ nodeSetSocketAvailability(count_socket, mode == GEO_NODE_CURVE_RESAMPLE_COUNT);
+ nodeSetSocketAvailability(length_socket, mode == GEO_NODE_CURVE_RESAMPLE_LENGTH);
}
/**
@@ -83,7 +83,7 @@ static Array<int> calculate_spline_point_offsets(GeoNodeExecParams &params,
{
const int size = curve.splines().size();
switch (mode) {
- case GEO_NODE_CURVE_SAMPLE_COUNT: {
+ case GEO_NODE_CURVE_RESAMPLE_COUNT: {
const int count = params.extract_input<int>("Count");
if (count < 1) {
return {0};
@@ -94,7 +94,7 @@ static Array<int> calculate_spline_point_offsets(GeoNodeExecParams &params,
}
return offsets;
}
- case GEO_NODE_CURVE_SAMPLE_LENGTH: {
+ case GEO_NODE_CURVE_RESAMPLE_LENGTH: {
/* Don't allow asymptotic count increase for low resolution values. */
const float resolution = std::max(params.extract_input<float>("Length"), 0.0001f);
Array<int> offsets(size + 1);
@@ -106,7 +106,7 @@ static Array<int> calculate_spline_point_offsets(GeoNodeExecParams &params,
offsets.last() = offset;
return offsets;
}
- case GEO_NODE_CURVE_SAMPLE_EVALUATED: {
+ case GEO_NODE_CURVE_RESAMPLE_EVALUATED: {
return curve.evaluated_point_offsets();
}
}
@@ -331,11 +331,11 @@ static void geo_node_curve_to_points_exec(GeoNodeExecParams params)
CurveToPointsResults new_attributes = curve_to_points_create_result_attributes(point_component,
curve);
switch (mode) {
- case GEO_NODE_CURVE_SAMPLE_COUNT:
- case GEO_NODE_CURVE_SAMPLE_LENGTH:
+ case GEO_NODE_CURVE_RESAMPLE_COUNT:
+ case GEO_NODE_CURVE_RESAMPLE_LENGTH:
copy_uniform_sample_point_attributes(splines, offsets, new_attributes);
break;
- case GEO_NODE_CURVE_SAMPLE_EVALUATED:
+ case GEO_NODE_CURVE_RESAMPLE_EVALUATED:
copy_evaluated_point_attributes(splines, offsets, new_attributes);
break;
}