[Bf-blender-cvs] [a2bc81e5f09] sculpt-dev: sculpt-dev: pre-emptively rename prototype C++ code in sculpt.cc to sculpt_new.cc before merge

Joseph Eagar noreply at git.blender.org
Mon Nov 14 18:48:12 CET 2022


Commit: a2bc81e5f09717bd6c32eb3964d40bb2b1667722
Author: Joseph Eagar
Date:   Thu Nov 10 09:54:21 2022 -0800
Branches: sculpt-dev
https://developer.blender.org/rBa2bc81e5f09717bd6c32eb3964d40bb2b1667722

sculpt-dev: pre-emptively rename prototype C++ code in sculpt.cc to
sculpt_new.cc before merge

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

M	release/scripts/startup/bl_ui/properties_data_mesh.py
M	source/blender/editors/sculpt_paint/CMakeLists.txt
M	source/blender/editors/sculpt_paint/paint_intern.h
M	source/blender/editors/sculpt_paint/paint_stroke.cc
R100	source/blender/editors/sculpt_paint/sculpt.cc	source/blender/editors/sculpt_paint/sculpt_new.cc
R100	source/blender/editors/sculpt_paint/sculpt.hh	source/blender/editors/sculpt_paint/sculpt_new.hh

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

diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 87c565a190d..4196415f041 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -542,8 +542,6 @@ class MESH_UL_attributes(UIList):
             else:
                 flags.append(0)
 
-        print("items!", list(attributes), flags)
-
         return flags, indices
 
     def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index):
diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt
index a24c03d1d9e..b74a6b056b4 100644
--- a/source/blender/editors/sculpt_paint/CMakeLists.txt
+++ b/source/blender/editors/sculpt_paint/CMakeLists.txt
@@ -95,8 +95,8 @@ set(SRC
   sculpt_undo.c
   sculpt_uv.c
 
-  sculpt.cc
-  sculpt.hh
+  sculpt_new.cc
+  sculpt_new.hh
 
   sculpt_brush_machine.c
 
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 8fbf2ff1804..ec610ff44c9 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -121,7 +121,7 @@ typedef struct PaintStroke {
   float mouse_cubic[4][2];
   float world_cubic[4][3];
 
-  bool has_cubic_stroke;
+  bool need_roll_mapping;
 
   bool stroke_over_mesh;
 
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.cc b/source/blender/editors/sculpt_paint/paint_stroke.cc
index 31a8443d3dd..77a98a05741 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.cc
+++ b/source/blender/editors/sculpt_paint/paint_stroke.cc
@@ -62,7 +62,7 @@ static void paint_stroke_add_sample(
 
 static int paint_stroke_max_points(const Paint *paint, PaintStroke *stroke)
 {
-  if (!stroke->has_cubic_stroke) {
+  if (!stroke->need_roll_mapping) {
     return 1;
   }
 
@@ -71,7 +71,7 @@ static int paint_stroke_max_points(const Paint *paint, PaintStroke *stroke)
   int tot = (int)ceilf(1.0f / s) + 2;
   tot = max_ii(tot, 5);
 
-  // return stroke->has_cubic_stroke ? 8.0 : 1;
+  // return stroke->need_roll_mapping ? 8.0 : 1;
   return tot;
 }
 
@@ -956,12 +956,12 @@ static void paint_brush_stroke_add_step(
                              stroke->pen_flip,
                              stroke->x_tilt,
                              stroke->y_tilt);
-      if (stroke->has_cubic_stroke) {
+      if (stroke->need_roll_mapping) {
         paint_brush_make_cubic(C, stroke);
       }
     }
 
-    if (stroke->has_cubic_stroke) {
+    if (stroke->need_roll_mapping) {
       // paint_brush_make_cubic(stroke);
 
       if (stroke->spline->segments.size() < paint_stroke_max_points(paint, stroke)) {
@@ -998,7 +998,7 @@ static void paint_brush_stroke_add_step(
     RNA_float_set(&itemptr, "x_tilt", point->x_tilt);
     RNA_float_set(&itemptr, "y_tilt", point->y_tilt);
 
-    if (stroke->has_cubic_stroke) {
+    if (stroke->need_roll_mapping) {
       RNA_float_set_array(&itemptr, "mouse_cubic", (float *)stroke->mouse_cubic);
     }
 
@@ -1347,7 +1347,7 @@ static int paint_space_stroke(bContext *C,
       ups->overlap_factor = paint_stroke_integrate_overlap(stroke->brush,
                                                            spacing / no_pressure_spacing);
       float real_spacing = spacing;
-      if (stroke->has_cubic_stroke) {
+      if (stroke->need_roll_mapping) {
         // paint_brush_make_cubic(stroke);
         // real_spacing = bezier3_arclength_v2(stroke->mouse_cubic);
       }
@@ -1426,7 +1426,7 @@ PaintStroke *paint_stroke_new(bContext *C,
   get_imapaint_zoom(C, &zoomx, &zoomy);
   stroke->zoom_2d = max_ff(zoomx, zoomy);
 
-  stroke->has_cubic_stroke = ELEM(
+  stroke->need_roll_mapping = ELEM(
       MTEX_MAP_MODE_ROLL, br->mtex.brush_map_mode, br->mask_mtex.brush_map_mode);
   stroke->stroke_sample_index = 0;
 
@@ -1675,7 +1675,7 @@ struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf)
 
 bool paint_stroke_has_cubic(const PaintStroke *stroke)
 {
-  return stroke->has_cubic_stroke;
+  return stroke->need_roll_mapping;
 }
 
 static void paint_stroke_add_sample(
@@ -1985,7 +1985,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintS
     stroke->last_tablet_event_pressure = pressure;
   }
 
-  if (!stroke->has_cubic_stroke) {
+  if (!stroke->need_roll_mapping) {
     paint_stroke_add_sample(p, stroke, event->mval[0], event->mval[1], pressure);
     paint_stroke_sample_average(stroke, &sample_average);
   }
diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt_new.cc
similarity index 100%
rename from source/blender/editors/sculpt_paint/sculpt.cc
rename to source/blender/editors/sculpt_paint/sculpt_new.cc
diff --git a/source/blender/editors/sculpt_paint/sculpt.hh b/source/blender/editors/sculpt_paint/sculpt_new.hh
similarity index 100%
rename from source/blender/editors/sculpt_paint/sculpt.hh
rename to source/blender/editors/sculpt_paint/sculpt_new.hh



More information about the Bf-blender-cvs mailing list