[Bf-blender-cvs] [9ebb65323e5] master: Fix: Use correct default in Curves to CurveEval conversion

Hans Goudey noreply at git.blender.org
Mon Feb 28 23:27:49 CET 2022


Commit: 9ebb65323e57eda953e8a6bd03775318ab7ccb05
Author: Hans Goudey
Date:   Mon Feb 28 17:27:38 2022 -0500
Branches: master
https://developer.blender.org/rB9ebb65323e57eda953e8a6bd03775318ab7ccb05

Fix: Use correct default in Curves to CurveEval conversion

Currently the code expects the radius attribuet to always exist on the
input Curves. This won't be true in the future though, so the correct
default value of one should be used when creating the data on CurveEval,
where the data is not optional.

===================================================================

M	source/blender/blenkernel/intern/curve_eval.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc
index 78dafe34b4f..d6525a11cff 100644
--- a/source/blender/blenkernel/intern/curve_eval.cc
+++ b/source/blender/blenkernel/intern/curve_eval.cc
@@ -432,7 +432,7 @@ std::unique_ptr<CurveEval> curves_to_curve_eval(const Curves &curves)
     }
     spline->positions().fill(float3(0));
     spline->tilts().fill(0.0f);
-    spline->radii().fill(0.0f);
+    spline->radii().fill(1.0f);
     curve_eval->add_spline(std::move(spline));
   }



More information about the Bf-blender-cvs mailing list