[Bf-blender-cvs] [20df402adc8] master: Cleanup: move docs to definition

Campbell Barton noreply at git.blender.org
Tue Jan 18 05:05:18 CET 2022


Commit: 20df402adc871a76cd98f7de116c48bebd151ce3
Author: Campbell Barton
Date:   Tue Jan 18 13:05:07 2022 +1100
Branches: master
https://developer.blender.org/rB20df402adc871a76cd98f7de116c48bebd151ce3

Cleanup: move docs to definition

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

M	source/blender/blenkernel/BKE_subdiv_modifier.h
M	source/blender/blenkernel/BKE_volume.h
M	source/blender/blenkernel/BKE_volume_to_mesh.hh
M	source/blender/blenkernel/intern/subdiv_modifier.c
M	source/blender/blenkernel/intern/volume.cc
M	source/blender/blenkernel/intern/volume_to_mesh.cc
M	source/blender/render/RE_texture_margin.h
M	source/blender/render/intern/texture_margin.cc

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

diff --git a/source/blender/blenkernel/BKE_subdiv_modifier.h b/source/blender/blenkernel/BKE_subdiv_modifier.h
index e8672b6baa8..8a179206dd7 100644
--- a/source/blender/blenkernel/BKE_subdiv_modifier.h
+++ b/source/blender/blenkernel/BKE_subdiv_modifier.h
@@ -40,8 +40,10 @@ void BKE_subsurf_modifier_subdiv_settings_init(struct SubdivSettings *settings,
                                                const struct SubsurfModifierData *smd,
                                                bool use_render_params);
 
-/* If skip_check_is_last is true, we assume that the modifier passed is the last enabled modifier
- * in the stack. */
+/**
+ * \param skip_check_is_last: When true, we assume that the modifier passed is the last enabled
+ * modifier in the stack.
+ */
 bool BKE_subsurf_modifier_can_do_gpu_subdiv_ex(const struct Scene *scene,
                                                const struct Object *ob,
                                                const struct SubsurfModifierData *smd,
@@ -54,6 +56,10 @@ bool BKE_subsurf_modifier_can_do_gpu_subdiv(const struct Scene *scene,
 
 extern void (*BKE_subsurf_modifier_free_gpu_cache_cb)(struct Subdiv *subdiv);
 
+/**
+ * Main goal of this function is to give usable subdivision surface descriptor
+ * which matches settings and topology.
+ */
 struct Subdiv *BKE_subsurf_modifier_subdiv_descriptor_ensure(
     const struct SubsurfModifierData *smd,
     const struct SubdivSettings *subdiv_settings,
@@ -62,8 +68,10 @@ struct Subdiv *BKE_subsurf_modifier_subdiv_descriptor_ensure(
 
 struct SubsurfRuntimeData *BKE_subsurf_modifier_ensure_runtime(struct SubsurfModifierData *smd);
 
-/* Return the #ModifierMode required for the evaluation of the subsurf modifier, which should be
- * used to check if the modifier is enabled. */
+/**
+ * Return the #ModifierMode required for the evaluation of the subsurf modifier,
+ * which should be used to check if the modifier is enabled.
+ */
 int BKE_subsurf_modifier_eval_required_mode(bool is_final_render, bool is_edit_mode);
 
 #ifdef __cplusplus
diff --git a/source/blender/blenkernel/BKE_volume.h b/source/blender/blenkernel/BKE_volume.h
index b40facc3572..8b42de7303d 100644
--- a/source/blender/blenkernel/BKE_volume.h
+++ b/source/blender/blenkernel/BKE_volume.h
@@ -181,6 +181,11 @@ bool BKE_volume_grid_bounds(openvdb::GridBase::ConstPtr grid,
                             blender::float3 &r_min,
                             blender::float3 &r_max);
 
+/**
+ * Return a new grid pointer with only the metadata and transform changed.
+ * This is useful for instances, where there is a separate transform on top of the original
+ * grid transform that must be applied for some operations that only take a grid argument.
+ */
 openvdb::GridBase::ConstPtr BKE_volume_grid_shallow_transform(openvdb::GridBase::ConstPtr grid,
                                                               const blender::float4x4 &transform);
 
diff --git a/source/blender/blenkernel/BKE_volume_to_mesh.hh b/source/blender/blenkernel/BKE_volume_to_mesh.hh
index b99ae625042..123cb33f24f 100644
--- a/source/blender/blenkernel/BKE_volume_to_mesh.hh
+++ b/source/blender/blenkernel/BKE_volume_to_mesh.hh
@@ -56,11 +56,20 @@ struct Mesh *volume_to_mesh(const openvdb::GridBase &grid,
                             float threshold,
                             float adaptivity);
 
+/**
+ * Convert an OpenVDB volume grid to corresponding mesh data: vertex positions and quad and
+ * triangle indices.
+ */
 struct OpenVDBMeshData volume_to_mesh_data(const openvdb::GridBase &grid,
                                            const VolumeToMeshResolution &resolution,
                                            float threshold,
                                            float adaptivity);
 
+/**
+ * Convert mesh data from the format provided by OpenVDB into Blender's #Mesh data structure.
+ * This can be used to add mesh data from a grid into an existing mesh rather than merging multiple
+ * meshes later on.
+ */
 void fill_mesh_from_openvdb_data(const Span<openvdb::Vec3s> vdb_verts,
                                  const Span<openvdb::Vec3I> vdb_tris,
                                  const Span<openvdb::Vec4I> vdb_quads,
diff --git a/source/blender/blenkernel/intern/subdiv_modifier.c b/source/blender/blenkernel/intern/subdiv_modifier.c
index bafcb631f59..65809782f8f 100644
--- a/source/blender/blenkernel/intern/subdiv_modifier.c
+++ b/source/blender/blenkernel/intern/subdiv_modifier.c
@@ -124,8 +124,6 @@ bool BKE_subsurf_modifier_can_do_gpu_subdiv(const Scene *scene,
 
 void (*BKE_subsurf_modifier_free_gpu_cache_cb)(Subdiv *subdiv) = NULL;
 
-/* Main goal of this function is to give usable subdivision surface descriptor
- * which matches settings and topology. */
 Subdiv *BKE_subsurf_modifier_subdiv_descriptor_ensure(const SubsurfModifierData *smd,
                                                       const SubdivSettings *subdiv_settings,
                                                       const Mesh *mesh,
diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
index 579526a051f..39a7725bfa3 100644
--- a/source/blender/blenkernel/intern/volume.cc
+++ b/source/blender/blenkernel/intern/volume.cc
@@ -1556,11 +1556,6 @@ bool BKE_volume_grid_bounds(openvdb::GridBase::ConstPtr grid, float3 &r_min, flo
   return true;
 }
 
-/**
- * Return a new grid pointer with only the metadata and transform changed.
- * This is useful for instances, where there is a separate transform on top of the original
- * grid transform that must be applied for some operations that only take a grid argument.
- */
 openvdb::GridBase::ConstPtr BKE_volume_grid_shallow_transform(openvdb::GridBase::ConstPtr grid,
                                                               const blender::float4x4 &transform)
 {
diff --git a/source/blender/blenkernel/intern/volume_to_mesh.cc b/source/blender/blenkernel/intern/volume_to_mesh.cc
index 733549c0022..336ce724e35 100644
--- a/source/blender/blenkernel/intern/volume_to_mesh.cc
+++ b/source/blender/blenkernel/intern/volume_to_mesh.cc
@@ -121,11 +121,6 @@ struct VolumeToMeshOp {
   }
 };
 
-/**
- * Convert mesh data from the format provided by OpenVDB into Blender's #Mesh data structure.
- * This can be used to add mesh data from a grid into an existing mesh rather than merging multiple
- * meshes later on.
- */
 void fill_mesh_from_openvdb_data(const Span<openvdb::Vec3s> vdb_verts,
                                  const Span<openvdb::Vec3I> vdb_tris,
                                  const Span<openvdb::Vec4I> vdb_quads,
@@ -165,10 +160,6 @@ void fill_mesh_from_openvdb_data(const Span<openvdb::Vec3s> vdb_verts,
   }
 }
 
-/**
- * Convert an OpenVDB volume grid to corresponding mesh data: vertex positions and quad and
- * triangle indices.
- */
 bke::OpenVDBMeshData volume_to_mesh_data(const openvdb::GridBase &grid,
                                          const VolumeToMeshResolution &resolution,
                                          const float threshold,
diff --git a/source/blender/render/RE_texture_margin.h b/source/blender/render/RE_texture_margin.h
index 0533b93a286..3fb151bbedd 100644
--- a/source/blender/render/RE_texture_margin.h
+++ b/source/blender/render/RE_texture_margin.h
@@ -32,6 +32,15 @@ struct MLoopUV;
 struct ImBuf;
 struct DerivedMesh;
 
+/**
+ * Generate a margin around the textures uv islands by copying pixels from the adjacent polygon.
+ *
+ * \param ibuf: the texture image.
+ * \param mask: pixels with a mask value of 1 are not written to.
+ * \param margin: the size of the margin in pixels.
+ * \param me: the mesh to use the polygons of.
+ * \param mloopuv: the uv data to use.
+ */
 void RE_generate_texturemargin_adjacentfaces(
     struct ImBuf *ibuf, char *mask, const int margin, struct Mesh const *me, char const *uv_layer);
 
diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc
index 3798d7dbe87..31aa16ac3f4 100644
--- a/source/blender/render/intern/texture_margin.cc
+++ b/source/blender/render/intern/texture_margin.cc
@@ -544,16 +544,6 @@ static void generate_margin(ImBuf *ibuf,
 
 }  // namespace blender::render::texturemargin
 
-/**
- * Generate a margin around the textures uv islands by copying pixels from the adjacent polygon.
- *
- * \param ibuf: the texture image.
- * \param mask: pixels with a mask value of 1 are not written to.
- * \param margin: the size of the margin in pixels.
- * \param me: the mesh to use the polygons of.
- * \param mloopuv: the uv data to use.
- */
-
 void RE_generate_texturemargin_adjacentfaces(
     ImBuf *ibuf, char *mask, const int margin, const Mesh *me, char const *uv_layer)
 {



More information about the Bf-blender-cvs mailing list