[Bf-blender-cvs] [15a428eab0e] master: Cleanup: move public doc-strings into headers for 'gpencil_modifiers'

Campbell Barton noreply at git.blender.org
Thu Dec 9 10:12:36 CET 2021


Commit: 15a428eab0e0a0ca63953d71e8fc719e4a06c612
Author: Campbell Barton
Date:   Thu Dec 9 20:11:29 2021 +1100
Branches: master
https://developer.blender.org/rB15a428eab0e0a0ca63953d71e8fc719e4a06c612

Cleanup: move public doc-strings into headers for 'gpencil_modifiers'

Removed doc-strings for operator definitions as they didn't provide
useful information in addition to the operators own description.

Ref T92709

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

M	source/blender/gpencil_modifiers/MOD_gpencil_lineart.h
M	source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c
M	source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
M	source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
M	source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
M	source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
M	source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M	source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c

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

diff --git a/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h b/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h
index 7d75ed5804e..95028ee959d 100644
--- a/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h
+++ b/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h
@@ -23,6 +23,7 @@
 #include "DNA_windowmanager_types.h"
 
 /* Operator types should be in exposed header. */
+
 void OBJECT_OT_lineart_bake_strokes(struct wmOperatorType *ot);
 void OBJECT_OT_lineart_bake_strokes_all(struct wmOperatorType *ot);
 void OBJECT_OT_lineart_clear(struct wmOperatorType *ot);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c
index ecadf744871..fe78a7e7bcc 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c
@@ -203,9 +203,6 @@ void gpencil_modifier_curve_panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiTemplateCurveMapping(layout, ptr, "curve", 0, false, false, false, false);
 }
 
-/**
- * Draw modifier error message.
- */
 void gpencil_modifier_panel_end(uiLayout *layout, PointerRNA *ptr)
 {
   GpencilModifierData *md = ptr->data;
@@ -360,9 +357,6 @@ static void gpencil_modifier_panel_header(const bContext *UNUSED(C), Panel *pane
 /** \name Modifier Registration Helpers
  * \{ */
 
-/**
- * Create a panel in the context's region
- */
 PanelType *gpencil_modifier_panel_register(ARegionType *region_type,
                                            GpencilModifierType type,
                                            PanelDrawFn draw)
@@ -390,12 +384,6 @@ PanelType *gpencil_modifier_panel_register(ARegionType *region_type,
   return panel_type;
 }
 
-/**
- * Add a child panel to the parent.
- *
- * \note To create the panel type's idname, it appends the \a name argument to the \a parent's
- * idname.
- */
 PanelType *gpencil_modifier_subpanel_register(ARegionType *region_type,
                                               const char *name,
                                               const char *label,
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
index 782b36d47ed..2cccd6e15dd 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
@@ -37,15 +37,27 @@ void gpencil_modifier_masking_panel_draw(Panel *panel, bool use_material, bool u
 void gpencil_modifier_curve_header_draw(const bContext *C, Panel *panel);
 void gpencil_modifier_curve_panel_draw(const bContext *C, Panel *panel);
 
+/**
+ * Draw modifier error message.
+ */
 void gpencil_modifier_panel_end(struct uiLayout *layout, PointerRNA *ptr);
 
 struct PointerRNA *gpencil_modifier_panel_get_property_pointers(struct Panel *panel,
                                                                 struct PointerRNA *r_ob_ptr);
 
+/**
+ * Create a panel in the context's region
+ */
 PanelType *gpencil_modifier_panel_register(struct ARegionType *region_type,
                                            GpencilModifierType type,
                                            PanelDrawFn draw);
 
+/**
+ * Add a child panel to the parent.
+ *
+ * \note To create the panel type's idname, it appends the \a name argument to the \a parent's
+ * idname.
+ */
 struct PanelType *gpencil_modifier_subpanel_register(struct ARegionType *region_type,
                                                      const char *name,
                                                      const char *label,
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
index 9ea146c77f2..d3088c68af5 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
@@ -70,7 +70,6 @@ void gpencil_modifier_type_init(GpencilModifierTypeInfo *types[])
 #undef INIT_GP_TYPE
 }
 
-/* verify if valid layer, material and pass index */
 bool is_stroke_affected_by_modifier(Object *ob,
                                     char *mlayername,
                                     const Material *material,
@@ -147,7 +146,6 @@ bool is_stroke_affected_by_modifier(Object *ob,
   return true;
 }
 
-/* verify if valid vertex group *and return weight */
 float get_modifier_point_weight(MDeformVert *dvert, bool inverse, int def_nr)
 {
   float weight = 1.0f;
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
index 2878ad4c73a..59ed11a02f3 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
@@ -29,6 +29,9 @@ struct Object;
 struct bGPDlayer;
 struct bGPDstroke;
 
+/**
+ * Verify if valid layer, material and pass index.
+ */
 bool is_stroke_affected_by_modifier(struct Object *ob,
                                     char *mlayername,
                                     const struct Material *material,
@@ -42,4 +45,7 @@ bool is_stroke_affected_by_modifier(struct Object *ob,
                                     const bool inv3,
                                     const bool inv4);
 
+/**
+ * Verify if valid vertex group *and return weight.
+ */
 float get_modifier_point_weight(struct MDeformVert *dvert, bool inverse, int def_nr);
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
index 1a96f68971f..2ef72da03fd 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
@@ -649,9 +649,18 @@ void MOD_lineart_destroy_render_data(struct LineartGpencilModifierData *lmd);
 
 void MOD_lineart_chain_feature_lines(LineartRenderBuffer *rb);
 void MOD_lineart_chain_split_for_fixed_occlusion(LineartRenderBuffer *rb);
+/**
+ * This function only connects two different chains. It will not do any clean up or smart chaining.
+ * So no: removing overlapping chains, removal of short isolated segments, and no loop reduction is
+ * implemented yet.
+ */
 void MOD_lineart_chain_connect(LineartRenderBuffer *rb);
 void MOD_lineart_chain_discard_short(LineartRenderBuffer *rb, const float threshold);
 void MOD_lineart_chain_clip_at_border(LineartRenderBuffer *rb);
+/**
+ * This should always be the last stage!, see the end of
+ * #MOD_lineart_chain_split_for_fixed_occlusion().
+ */
 void MOD_lineart_chain_split_angle(LineartRenderBuffer *rb, float angle_threshold_rad);
 void MOD_lineart_smooth_chains(LineartRenderBuffer *rb, float tolerance);
 void MOD_lineart_chain_offset_towards_camera(LineartRenderBuffer *rb,
@@ -661,6 +670,11 @@ void MOD_lineart_chain_offset_towards_camera(LineartRenderBuffer *rb,
 int MOD_lineart_chain_count(const LineartEdgeChain *ec);
 void MOD_lineart_chain_clear_picked_flag(LineartCache *lc);
 
+/**
+ * This is the entry point of all line art calculations.
+ *
+ * \return True when a change is made.
+ */
 bool MOD_lineart_compute_feature_lines(struct Depsgraph *depsgraph,
                                        struct LineartGpencilModifierData *lmd,
                                        struct LineartCache **cached_result,
@@ -668,15 +682,24 @@ bool MOD_lineart_compute_feature_lines(struct Depsgraph *depsgraph,
 
 struct Scene;
 
+/**
+ * This only gets initial "biggest" tile.
+ */
 LineartBoundingArea *MOD_lineart_get_parent_bounding_area(LineartRenderBuffer *rb,
                                                           double x,
                                                           double y);
 
+/**
+ * Wrapper for more convenience.
+ */
 LineartBoundingArea *MOD_lineart_get_bounding_area(LineartRenderBuffer *rb, double x, double y);
 
 struct bGPDframe;
 struct bGPDlayer;
 
+/**
+ * Wrapper for external calls.
+ */
 void MOD_lineart_gpencil_generate(LineartCache *cache,
                                   struct Depsgraph *depsgraph,
                                   struct Object *ob,
@@ -697,6 +720,9 @@ void MOD_lineart_gpencil_generate(LineartCache *cache,
                                   const char *vgname,
                                   int modifier_flags);
 
+/**
+ * Length is in image space.
+ */
 float MOD_lineart_chain_compute_length(LineartEdgeChain *ec);
 
 void ED_operatortypes_lineart(void);
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
index 88dcfb89c25..0deb8b1c335 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
@@ -794,11 +794,6 @@ static LineartChainRegisterEntry *lineart_chain_get_closest_cre(LineartRenderBuf
   return closest_cre;
 }
 
-/**
- * This function only connects two different chains. It will not do any clean up or smart chaining.
- * So no: removing overlapping chains, removal of short isolated segments, and no loop reduction is
- * implemented yet.
- */
 void MOD_lineart_chain_connect(LineartRenderBuffer *rb)
 {
   LineartEdgeChain *ec;
@@ -881,9 +876,6 @@ void MOD_lineart_chain_connect(LineartRenderBuffer *rb)
   }
 }
 
-/**
- * Length is in image space.
- */
 float MOD_lineart_chain_compute_length(LineartEdgeChain *ec)
 {
   LineartEdgeChainItem *eci;
@@ -1072,10 +1064,6 @@ void MOD_lineart_chain_clip_at_border(LineartRenderBuffer *rb)
   }
 }
 
-/**
- * This should always be the last stage!, see the end of
- * #MOD_lineart_chain_split_for_fixed_occlusion().
- */
 void MOD_lineart_chain_split_angle(LineartRenderBuffer *rb, float angle_threshold_rad)
 {
   LineartEdgeChain *ec, *new_ec;
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index f2e6130b947..d9a32711833 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -3759,9 +3759,6 @@ static bool lineart_get_edge_bounding_areas(Linear

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list