Commit: 7df5d7c7a70963f72a71e2f19507218b51d0f188
Author: Hans Goudey
Date:   Tue Jan 17 09:15:33 2023 -0600
Branches: master
https://developer.blender.org/rB7df5d7c7a70963f72a71e2f19507218b51d0f188

Cleanup: Curves selection boolean to float comparison

The conversion from float to boolean is now handled by
the attribute API.

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

M       source/blender/draw/intern/draw_cache_impl_curves.cc

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

diff --git a/source/blender/draw/intern/draw_cache_impl_curves.cc 
b/source/blender/draw/intern/draw_cache_impl_curves.cc
index 751fb95ce74..ba47ea576e0 100644
--- a/source/blender/draw/intern/draw_cache_impl_curves.cc
+++ b/source/blender/draw/intern/draw_cache_impl_curves.cc
@@ -339,13 +339,13 @@ static void 
curves_batch_cache_ensure_edit_points_data(const Curves &curves_id,
   switch (curves_id.selection_domain) {
     case ATTR_DOMAIN_POINT:
       for (const int point_i : selection.index_range()) {
-        const float point_selection = (selection[point_i] > 0.0f) ? 1.0f : 
0.0f;
+        const float point_selection = selection[point_i] ? 1.0f : 0.0f;
         GPU_vertbuf_attr_set(cache.edit_points_data, color, point_i, 
&point_selection);
       }
       break;
     case ATTR_DOMAIN_CURVE:
       for (const int curve_i : curves.curves_range()) {
-        const float curve_selection = (selection[curve_i] > 0.0f) ? 1.0f : 
0.0f;
+        const float curve_selection = selection[curve_i] ? 1.0f : 0.0f;
         const IndexRange points = curves.points_for_curve(curve_i);
         for (const int point_i : points) {
           GPU_vertbuf_attr_set(cache.edit_points_data, color, point_i, 
&curve_selection);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to