[Bf-blender-cvs] [607a32fc4b9] soc-2021-curves: Removed Extrude internal functionality

Dilith Jayakody noreply at git.blender.org
Sat Mar 5 16:40:04 CET 2022


Commit: 607a32fc4b9c51ab710f5808f2c600e72f892764
Author: Dilith Jayakody
Date:   Fri Feb 25 22:41:19 2022 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB607a32fc4b9c51ab710f5808f2c600e72f892764

Removed Extrude internal functionality

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

M	release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
M	source/blender/editors/curve/editcurve_pen.c

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

diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index c39307afcaa..f910366707c 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1211,7 +1211,6 @@ class _defs_edit_curve:
             layout.prop(props, "sel_dist_mul")
             layout.prop(props, "close_spline")
             layout.prop(props, "extrude_handle")
-            layout.prop(props, "extrude_center")
         return dict(
             idname="builtin.pen",
             label="Curve Pen",
diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index e64469fb7e1..cac33a8dd45 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -1062,15 +1062,12 @@ static bool is_last_bezt(const Nurb *nu, const BezTriple *bezt)
 static void extrude_points_from_selected_vertices(const ViewContext *vc,
                                                   Object *obedit,
                                                   const wmEvent *event,
-                                                  const bool extrude_center,
                                                   const int extrude_handle)
 {
   Curve *cu = vc->obedit->data;
   ListBase *nurbs = BKE_curve_editNurbs_get(cu);
   float center[3] = {0.0f, 0.0f, 0.0f};
-  if (!extrude_center) {
-    deselect_all_center_vertices(nurbs);
-  }
+  deselect_all_center_vertices(nurbs);
   bool sel_exists = get_selected_center(nurbs, center, true, false);
 
   float location[3];
@@ -1086,7 +1083,7 @@ static void extrude_points_from_selected_vertices(const ViewContext *vc,
   update_location_for_2d_curve(vc, location);
   EditNurb *editnurb = cu->editnurb;
 
-  if (!extrude_center && sel_exists) {
+  if (sel_exists) {
     float disp_3d[3];
     sub_v3_v3v3(disp_3d, location, center);
     /* Reimplemenented due to unexpected behavior for extrusion of 2-point spline. */
@@ -1466,7 +1463,6 @@ static int curve_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
   const float mval_fl[2] = {UNPACK2(event->mval)};
 
   const bool extrude_point = RNA_boolean_get(op->ptr, "extrude_point");
-  const bool extrude_center = RNA_boolean_get(op->ptr, "extrude_center");
   const bool delete_point = RNA_boolean_get(op->ptr, "delete_point");
   const bool insert_point = RNA_boolean_get(op->ptr, "insert_point");
   const bool move_seg = RNA_boolean_get(op->ptr, "move_segment");
@@ -1596,8 +1592,7 @@ static int curve_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
           }
         }
         else if (extrude_point) {
-          extrude_points_from_selected_vertices(
-              &vc, obedit, event, extrude_center, extrude_handle);
+          extrude_points_from_selected_vertices(&vc, obedit, event, extrude_handle);
           cpd->new_point = cpd->acted = cpd->link_handles = true;
         }
       }
@@ -1626,8 +1621,7 @@ static int curve_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
           cpd->acted = true;
         }
         else if (extrude_point) {
-          extrude_points_from_selected_vertices(
-              &vc, obedit, event, extrude_center, extrude_handle);
+          extrude_points_from_selected_vertices(&vc, obedit, event, extrude_handle);
           cpd->acted = true;
         }
       }
@@ -1761,11 +1755,6 @@ void CURVE_OT_pen(wmOperatorType *ot)
                          false,
                          "Extrude Point",
                          "Add a point connected to the last selected point");
-  prop = RNA_def_boolean(ot->srna,
-                         "extrude_center",
-                         false,
-                         "Extrude Internal",
-                         "Allow extruding points from internal points");
   prop = RNA_def_enum(ot->srna,
                       "extrude_handle",
                       prop_handle_types,



More information about the Bf-blender-cvs mailing list