[Bf-blender-cvs] [3694bee22df] soc-2021-curves: Fix modifying hidden vertices

Dilith Jayakody noreply at git.blender.org
Sun Apr 3 17:34:20 CEST 2022


Commit: 3694bee22dfdefd8b3de60d9d8c783e8d3e58d7d
Author: Dilith Jayakody
Date:   Fri Mar 25 23:49:08 2022 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB3694bee22dfdefd8b3de60d9d8c783e8d3e58d7d

Fix modifying hidden vertices

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

M	source/blender/editors/curve/editcurve_pen.c

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

diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index a4b258f90a5..e1237a38d46 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -52,7 +52,7 @@
     if (nu->type == CU_BEZIER) { \
       for (int i = 0; i < nu->pntsu; i++) { \
         BezTriple *bezt = nu->bezt + i; \
-        if (BEZT_ISSEL_ANY(bezt)) {
+        if (BEZT_ISSEL_ANY(bezt) && (bezt->hide == 0)) {
 
 #define FOREACH_SELECTED_BEZT_END \
   } \
@@ -320,6 +320,9 @@ static bool get_selected_center(const ListBase *nurbs,
     if (nu->type == CU_BEZIER) {
       for (int i = 0; i < nu->pntsu; i++) {
         BezTriple *bezt = nu->bezt + i;
+        if (bezt->hide == 1) {
+          continue;
+        }
         if (mid_only) {
           if (BEZT_ISSEL_ANY(bezt)) {
             add_v3_v3(r_center, bezt->vec[1]);
@@ -344,7 +347,7 @@ static bool get_selected_center(const ListBase *nurbs,
     }
     else if (!bezt_only) {
       for (int i = 0; i < nu->pntsu; i++) {
-        if ((nu->bp + i)->f1 & SELECT) {
+        if ((nu->bp->hide == 0) && (nu->bp + i)->f1 & SELECT) {
           add_v3_v3(r_center, (nu->bp + i)->vec);
           end_count++;
         }
@@ -386,6 +389,9 @@ static void move_all_selected_points(const ViewContext *vc,
     if (nu->type == CU_BEZIER) {
       for (int i = 0; i < nu->pntsu; i++) {
         BezTriple *bezt = nu->bezt + i;
+        if (bezt->hide == 1) {
+          continue;
+        }
         if (BEZT_ISSEL_IDX(bezt, 1) || (move_entire && BEZT_ISSEL_ANY(bezt))) {
           move_bezt_handle_or_vertex_by_displacement(vc, bezt, 1, disp_2d, 0.0f, false, false);
         }
@@ -407,7 +413,7 @@ static void move_all_selected_points(const ViewContext *vc,
     else if (!bezt_only) {
       for (int i = 0; i < nu->pntsu; i++) {
         BPoint *bp = nu->bp + i;
-        if (bp->f1 & SELECT) {
+        if ((bp->hide == 0) && (bp->f1 & SELECT)) {
           float pos[2], dst[2];
           worldspace_to_screenspace(vc, bp->vec, pos);
           add_v2_v2v2(dst, pos, disp_2d);



More information about the Bf-blender-cvs mailing list