[Bf-blender-cvs] [3e081fba86c] sculpt-dev: Sculpt-dev: update doc comments for sculpt_intern.h

Joseph Eagar noreply at git.blender.org
Sun Jan 23 21:56:57 CET 2022


Commit: 3e081fba86c24054b9f8cb1a89e18ee42506d4e1
Author: Joseph Eagar
Date:   Wed Jan 19 16:18:18 2022 -0800
Branches: sculpt-dev
https://developer.blender.org/rB3e081fba86c24054b9f8cb1a89e18ee42506d4e1

Sculpt-dev: update doc comments for sculpt_intern.h

Also fixed a few warnings

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

M	source/blender/editors/sculpt_paint/sculpt_detail.c
M	source/blender/editors/sculpt_paint/sculpt_expand.c
M	source/blender/editors/sculpt_paint/sculpt_face_set_topology.c
M	source/blender/editors/sculpt_paint/sculpt_filter_mask.c
M	source/blender/editors/sculpt_paint/sculpt_intern.h

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.c b/source/blender/editors/sculpt_paint/sculpt_detail.c
index bc696fc554b..8a21dfc4296 100644
--- a/source/blender/editors/sculpt_paint/sculpt_detail.c
+++ b/source/blender/editors/sculpt_paint/sculpt_detail.c
@@ -75,7 +75,7 @@ typedef struct {
 static bool sculpt_and_constant_or_manual_detail_poll(bContext *C)
 {
   Object *ob = CTX_data_active_object(C);
-  Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
+  //Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
 
   /*checking for constant/manual mode isn't necassary since we do this on the python side
     in the ui scripts*/
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index e3f642afd8f..52b9ff17d89 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -804,10 +804,6 @@ static float *sculpt_expand_poly_loop_falloff_create(Object *ob, const SculptVer
       continue;
     }
 
-    const SculptVertRef symm_vertex = sculpt_expand_get_vertex_index_for_symmetry_pass(
-        ob, symm_it, v);
-    // const int symm_vertex_i = BKE_pbvh_vertex_index_to_table(ss->pbvh, symm_vertex);
-
     BLI_bitmap *poly_loop = sculpt_poly_loop_from_cursor(ob);
 
     for (int i = 0; i < ss->totfaces; i++) {
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set_topology.c b/source/blender/editors/sculpt_paint/sculpt_face_set_topology.c
index 40e8e73ab23..2516a360dd3 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set_topology.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set_topology.c
@@ -75,7 +75,7 @@
 typedef enum eSculptFaceSetByTopologyMode {
   SCULPT_FACE_SET_TOPOLOGY_LOOSE_PART = 0,
   SCULPT_FACE_SET_TOPOLOGY_POLY_LOOP = 1,
-};
+} eSculptFaceSetByTopologyMode;
 
 static EnumPropertyItem prop_sculpt_face_set_by_topology[] = {
     {
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
index 5e2dd282df6..9d0bf72a3a6 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
@@ -1045,6 +1045,10 @@ static FilterCache *sculpt_ipmask_filter_cache_init(Object *ob,
       filter_cache->mask_filter_step_forward = sculpt_ipmask_vertex_contrast_increase_cb;
       filter_cache->mask_filter_step_backward = sculpt_ipmask_vertex_contrast_decrease_cb;
       break;
+    case IPMASK_FILTER_ADD_SUBSTRACT:
+    case IPMASK_FILTER_INVERT:
+    case IPMASK_FILTER_QUANTIZE:
+      break;
   }
 
   return filter_cache;
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index a22f529fc23..931e7a68466 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -53,8 +53,6 @@ struct TaskParallelTLS;
 
 enum ePaintSymmetryFlags;
 
-void SCULPT_clear_scl_pointers(SculptSession *ss);
-
 /*
 maximum symmetry passes returned by SCULPT_get_symmetry_pass.
 enough for about ~30 radial symmetry passes, which seems like plenty
@@ -63,18 +61,13 @@ used by various code that needs to statically store per-pass state.
 */
 #define SCULPT_MAX_SYMMETRY_PASSES 255
 
-bool SCULPT_mode_poll(struct bContext *C);
-bool SCULPT_mode_poll_view3d(struct bContext *C);
-/**
- * Checks for a brush, not just sculpt mode.
- */
-bool SCULPT_poll(struct bContext *C);
-bool SCULPT_poll_view3d(struct bContext *C);
+/* Updates */
 
-bool SCULPT_vertex_colors_poll(struct bContext *C);
-bool SCULPT_vertex_colors_poll_no_bmesh(struct bContext *C);
+/* -------------------------------------------------------------------- */
+/** \name Sculpt Types
+ * \{ */
 
-/* Updates */
+enum { SCULPT_SHARP_SIMPLE, SCULPT_SHARP_PLANE };
 
 typedef enum SculptUpdateType {
   SCULPT_UPDATE_COORDS = 1 << 0,
@@ -83,21 +76,6 @@ typedef enum SculptUpdateType {
   SCULPT_UPDATE_COLOR = 1 << 3,
 } SculptUpdateType;
 
-void SCULPT_flush_update_step(struct bContext *C, SculptUpdateType update_flags);
-void SCULPT_flush_update_done(const struct bContext *C, Object *ob, SculptUpdateType update_flags);
-
-/**
- * Flush displacement from deformed PBVH to original layer.
- */
-void SCULPT_flush_stroke_deform(struct Sculpt *sd, Object *ob, bool is_proxy_used);
-
-/**
- * Should be used after modifying the mask or Face Sets IDs.
- */
-void SCULPT_tag_update_overlays(struct bContext *C);
-
-/* Stroke */
-
 typedef struct SculptCursorGeometryInfo {
   float location[3];
   float back_location[3];
@@ -105,74 +83,6 @@ typedef struct SculptCursorGeometryInfo {
   float active_vertex_co[3];
 } SculptCursorGeometryInfo;
 
-/**
- * Do a ray-cast in the tree to find the 3d brush location
- * (This allows us to ignore the GL depth buffer)
- * Returns 0 if the ray doesn't hit the mesh, non-zero otherwise.
- */
-bool SCULPT_stroke_get_location(struct bContext *C, float out[3], const float mouse[2]);
-/**
- * Gets the normal, location and active vertex location of the geometry under the cursor. This also
- * updates the active vertex and cursor related data of the SculptSession using the mouse position
- */
-bool SCULPT_cursor_geometry_info_update(bContext *C,
-                                        SculptCursorGeometryInfo *out,
-                                        const float mouse[2],
-                                        bool use_sampled_normal,
-                                        bool use_back_depth);
-void SCULPT_geometry_preview_lines_update(bContext *C, struct SculptSession *ss, float radius);
-
-void SCULPT_stroke_modifiers_check(const bContext *C, Object *ob, const Brush *brush);
-float SCULPT_raycast_init(struct ViewContext *vc,
-                          const float mouse[2],
-                          float ray_start[3],
-                          float ray_end[3],
-                          float ray_normal[3],
-                          bool original);
-
-/* Symmetry */
-char SCULPT_mesh_symmetry_xyz_get(Object *object);
-
-/* Sculpt PBVH abstraction API */
-
-void SCULPT_vertex_random_access_ensure(struct SculptSession *ss);
-void SCULPT_face_random_access_ensure(struct SculptSession *ss);
-
-int SCULPT_vertex_valence_get(const struct SculptSession *ss, SculptVertRef vertex);
-int SCULPT_vertex_count_get(const struct SculptSession *ss);
-
-bool SCULPT_vertex_color_get(const SculptSession *ss, SculptVertRef vertex, float out[4]);
-void SCULPT_vertex_color_set(const SculptSession *ss, SculptVertRef vertex, float color[4]);
-bool SCULPT_has_colors(const SculptSession *ss);
-
-const float *SCULPT_vertex_co_get(struct SculptSession *ss, SculptVertRef index);
-void SCULPT_vertex_normal_get(SculptSession *ss, SculptVertRef index, float no[3]);
-float SCULPT_vertex_mask_get(struct SculptSession *ss, SculptVertRef index);
-
-const float *SCULPT_vertex_persistent_co_get(SculptSession *ss, SculptVertRef index);
-void SCULPT_vertex_persistent_normal_get(SculptSession *ss, SculptVertRef index, float no[3]);
-
-bool SCULPT_has_persistent_base(SculptSession *ss);
-
-/**
- * Coordinates used for manipulating the base mesh when Grab Active Vertex is enabled.
- */
-const float *SCULPT_vertex_co_for_grab_active_get(SculptSession *ss, SculptVertRef index);
-
-/**
- * Returns the info of the limit surface when multi-res is available,
- * otherwise it returns the current coordinate of the vertex.
- */
-void SCULPT_vertex_limit_surface_get(SculptSession *ss, SculptVertRef index, float r_co[3]);
-
-/**
- * Returns the pointer to the coordinates that should be edited from a brush tool iterator
- * depending on the given deformation target.
- */
-float *SCULPT_brush_deform_target_vertex_co_get(SculptSession *ss,
-                                                int deform_target,
-                                                PBVHVertexIter *iter);
-
 struct _SculptNeighborRef {
   SculptVertRef vertex;
   SculptEdgeRef edge;
@@ -203,78 +113,6 @@ typedef struct SculptVertexNeighborIter {
   bool no_free;
 } SculptVertexNeighborIter;
 
-void SCULPT_vertex_neighbors_get(const struct SculptSession *ss,
-                                 const SculptVertRef vref,
-                                 const bool include_duplicates,
-                                 SculptVertexNeighborIter *iter);
-
-/* Iterator over neighboring vertices. */
-#define SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN(ss, v_index, neighbor_iterator) \
-  SCULPT_vertex_neighbors_get(ss, v_index, false, &neighbor_iterator); \
-  for (neighbor_iterator.i = 0; neighbor_iterator.i < neighbor_iterator.size; \
-       neighbor_iterator.i++) { \
-    neighbor_iterator.has_edge = neighbor_iterator.neighbors[neighbor_iterator.i].edge.i != \
-                                 SCULPT_REF_NONE; \
-    neighbor_iterator.vertex = neighbor_iterator.neighbors[neighbor_iterator.i].vertex; \
-    neighbor_iterator.edge = neighbor_iterator.neighbors[neighbor_iterator.i].edge; \
-    neighbor_iterator.index = neighbor_iterator.neighbor_indices[neighbor_iterator.i];
-
-/* Iterate over neighboring and duplicate vertices (for PBVH_GRIDS). Duplicates come
- * first since they are nearest for floodfill. */
-#define SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN(ss, v_index, neighbor_iterator) \
-  SCULPT_vertex_neighbors_get(ss, v_index, true, &neighbor_iterator); \
-  for (neighbor_iterator.i = neighbor_iterator.size - 1; neighbor_iterator.i >= 0; \
-       neighbor_iterator.i--) { \
-    neighbor_iterator.has_edge = neighbor_iterator.neighbors[neighbor_iterator.i].edge.i != \
-                                 SCULPT_REF_NONE; \
-    neighbor_iterator.vertex = neighbor_iterator.neighbors[neighbor_iterator.i].vertex; \
-    neighbor_iterator.edge = neighbor_iterator.neighbors[neighbor_iterator.i].edge; \
-    neighbor_iterator.index = neighbor_iterator.neighbor_indices[neighbor_iterator.i]; \
-    neighbor_iterator.is_duplicate = (neighbor_iterator.i >= \
-                                      neighbor_iterator.size - neighbor_iterator.num_duplicates);
-
-#define SCULPT_VERTEX_NEIGHBORS_ITER_END(neighbor_iterator) \
-  } \
-  if (!neighbor_iterator.no_free && \


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list