[Bf-blender-cvs] [e9eae1b8577] master: Curves: Avoid optimization to avoid storing selection for now

Hans Goudey noreply at git.blender.org
Wed Jun 1 11:57:58 CEST 2022


Commit: e9eae1b8577b38f2d17763e230a8313a3881d7c5
Author: Hans Goudey
Date:   Wed Jun 1 11:57:38 2022 +0200
Branches: master
https://developer.blender.org/rBe9eae1b8577b38f2d17763e230a8313a3881d7c5

Curves: Avoid optimization to avoid storing selection for now

This optimization should be restored when there is proper vizualization
for the selection attributes.

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

M	source/blender/editors/curves/intern/curves_ops.cc

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

diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc
index 0e12257be58..85214e1608d 100644
--- a/source/blender/editors/curves/intern/curves_ops.cc
+++ b/source/blender/editors/curves/intern/curves_ops.cc
@@ -848,10 +848,21 @@ static int select_all_exec(bContext *C, wmOperator *op)
 
   for (Curves *curves_id : unique_curves) {
     if (action == SEL_SELECT) {
+      /* The optimization to avoid storing the selection when everything is selected causes too
+       * many problems at the moment, since there is no proper visualization yet. Keep the code but
+       * disable it for now. */
+#if 0
       CurveComponent component;
       component.replace(curves_id, GeometryOwnershipType::Editable);
       component.attribute_try_delete(".selection_point_float");
       component.attribute_try_delete(".selection_curve_float");
+#else
+      CurvesGeometry &curves = CurvesGeometry::wrap(curves_id->geometry);
+      MutableSpan<float> selection = curves_id->selection_domain == ATTR_DOMAIN_POINT ?
+                                         curves.selection_point_float_for_write() :
+                                         curves.selection_curve_float_for_write();
+      selection.fill(1.0f);
+#endif
     }
     else {
       CurvesGeometry &curves = CurvesGeometry::wrap(curves_id->geometry);



More information about the Bf-blender-cvs mailing list