[Bf-blender-cvs] [9dabb342ba5] master: Cleanup: Improve comments
Hans Goudey
noreply at git.blender.org
Sun May 16 01:02:50 CEST 2021
Commit: 9dabb342ba5e3b439fc960b303df8de1ada4a960
Author: Hans Goudey
Date: Sat May 15 18:00:20 2021 -0500
Branches: master
https://developer.blender.org/rB9dabb342ba5e3b439fc960b303df8de1ada4a960
Cleanup: Improve comments
===================================================================
M source/blender/blenkernel/intern/curve_eval.cc
M source/blender/blenkernel/intern/geometry_component_curve.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc
index 86ae70399db..19bbd8178b7 100644
--- a/source/blender/blenkernel/intern/curve_eval.cc
+++ b/source/blender/blenkernel/intern/curve_eval.cc
@@ -235,5 +235,3 @@ std::unique_ptr<CurveEval> curve_eval_from_dna_curve(const Curve &dna_curve)
return curve;
}
-
-/** \} */
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index b0d2d661cd5..44c5cce92dd 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -447,8 +447,8 @@ template<typename T> class VMutableArray_For_SplinePoints final : public VMutabl
/**
* Virtual array implementation specifically for control point positions. This is only needed for
- * Bezier splines, where adjusting the position also needs to adjust handle positions depending on
- * the handle types. We pay a small price for this when other spline types are mixed with Bezier.
+ * Bezier splines, where adjusting the position also requires adjusting handle positions depending
+ * on handle types. We pay a small price for this when other spline types are mixed with Bezier.
*
* \note There is no need to check the handle type to avoid changing auto handles, since
* retrieving write access to the position data will mark them for recomputation anyway.
@@ -534,7 +534,7 @@ class VMutableArray_For_SplinePosition final : public VMutableArray<float3> {
/**
* Provider for any builtin control point attribute that doesn't need
- * special handling such as access to other arrays in the spline.
+ * special handling like access to other arrays in the spline.
*/
template<typename T> class BuiltinPointAttributeProvider : public BuiltinAttributeProvider {
protected:
@@ -630,7 +630,7 @@ template<typename T> class BuiltinPointAttributeProvider : public BuiltinAttribu
};
/**
- * Special attribute provider for the position attribute. Having this separate means we don't
+ * Special attribute provider for the position attribute. Keeping this separate means we don't
* need to make #BuiltinPointAttributeProvider overly generic, and the special handling for the
* positions is more clear.
*/
@@ -653,8 +653,6 @@ class PositionAttributeProvider final : public BuiltinPointAttributeProvider<flo
return {};
}
- /* Changing the positions requires recalculation of cached evaluated data in many cases.
- * This could set more specific flags in the future to avoid unnecessary recomputation. */
bool curve_has_bezier_spline = false;
for (SplinePtr &spline : curve->splines()) {
if (spline->type() == Spline::Type::Bezier) {
@@ -663,12 +661,14 @@ class PositionAttributeProvider final : public BuiltinPointAttributeProvider<flo
}
}
- /* Use the regular position virtual array there are any bezier splines to potentially avoid
- * using the special position virtual array when there are no Bezier splines anyway. */
+ /* Use the regular position virtual array when there aren't any Bezier splines
+ * to avoid the overhead of thecking the spline type for every point. */
if (!curve_has_bezier_spline) {
return BuiltinPointAttributeProvider<float3>::try_get_for_write(component);
}
+ /* Changing the positions requires recalculation of cached evaluated data in many cases.
+ * This could set more specific flags in the future to avoid unnecessary recomputation. */
for (SplinePtr &spline : curve->splines()) {
spline->mark_cache_invalid();
}
@@ -687,8 +687,8 @@ class PositionAttributeProvider final : public BuiltinPointAttributeProvider<flo
* \{ */
/**
- * In this function all the attribute providers for a curve component are created. Most data
- * in this function is statically allocated, because it does not change over time.
+ * In this function all the attribute providers for a curve component are created.
+ * Most data in this function is statically allocated, because it does not change over time.
*/
static ComponentAttributeProviders create_attribute_providers_for_curve()
{
More information about the Bf-blender-cvs
mailing list