Commit: 1a208f03260b8b11977b1b2d41ca550711c57257
Author: Campbell Barton
Date:   Wed Jan 2 17:03:45 2019 +1100
Branches: master
https://developer.blender.org/rB1a208f03260b8b11977b1b2d41ca550711c57257

Cleanup: indentation, naming

Use rna naming conventions for unit-settings callbacks.

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

M       source/blender/editors/curve/editcurve.c
M       source/blender/editors/gpencil/gpencil_merge.c
M       source/blender/editors/gpencil/gpencil_paint.c
M       source/blender/editors/object/object_relations.c
M       source/blender/makesrna/intern/rna_brush.c
M       source/blender/makesrna/intern/rna_curve.c
M       source/blender/makesrna/intern/rna_image.c
M       source/blender/makesrna/intern/rna_nodetree.c
M       source/blender/makesrna/intern/rna_object.c
M       source/blender/makesrna/intern/rna_object_force.c
M       source/blender/makesrna/intern/rna_particle.c
M       source/blender/makesrna/intern/rna_rna.c
M       source/blender/makesrna/intern/rna_scene.c
M       source/blender/makesrna/intern/rna_screen.c
M       source/blender/makesrna/intern/rna_userdef.c
M       source/blender/makesrna/intern/rna_wm.c
M       source/blender/python/intern/bpy_rna.c

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

diff --git a/source/blender/editors/curve/editcurve.c 
b/source/blender/editors/curve/editcurve.c
index 8c725dc8b9c..84f8f17d4ee 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -6133,8 +6133,9 @@ static const EnumPropertyItem curve_delete_type_items[] = 
{
        {0, NULL, 0, NULL, NULL}
 };
 
-static const EnumPropertyItem *rna_curve_delete_type_itemf(bContext *C, 
PointerRNA *UNUSED(ptr),
-                                                            PropertyRNA 
*UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *rna_curve_delete_type_itemf(
+        bContext *C, PointerRNA *UNUSED(ptr),
+        PropertyRNA *UNUSED(prop), bool *r_free)
 {
        EnumPropertyItem *item = NULL;
        int totitem = 0;
diff --git a/source/blender/editors/gpencil/gpencil_merge.c 
b/source/blender/editors/gpencil/gpencil_merge.c
index 02f71b19398..3641308ae17 100644
--- a/source/blender/editors/gpencil/gpencil_merge.c
+++ b/source/blender/editors/gpencil/gpencil_merge.c
@@ -208,9 +208,9 @@ static void gpencil_dissolve_points(bContext *C)
  * All the data is saved to be sorted and used later.
  */
 static void gpencil_calc_points_factor(
-                       bContext *C, const int mode, int totpoints,
-                       const bool clear_point, const bool clear_stroke,
-                       tGPencilPointCache *src_array)
+        bContext *C, const int mode, int totpoints,
+        const bool clear_point, const bool clear_stroke,
+        tGPencilPointCache *src_array)
 {
        bGPDspoint *pt;
        int i;
@@ -367,77 +367,77 @@ static void gpencil_get_extremes(
 }
 
 static int gpencil_analyze_strokes(
-               tGPencilPointCache *src_array, int totstrokes, int totpoints,
-               tGPencilPointCache *dst_array)
+        tGPencilPointCache *src_array, int totstrokes, int totpoints,
+        tGPencilPointCache *dst_array)
 {
-               int i;
-               int last = 0;
-               GHash *all_strokes = BLI_ghash_ptr_new(__func__);
-               /* add first stroke to array */
-               tGPencilPointCache *sort_pt = &src_array[0];
-               bGPDstroke *gps = sort_pt->gps;
-               last = gpencil_insert_to_array(src_array, dst_array, totpoints, 
gps, false, last);
-               float start[3];
-               float end[3];
-               float end_prv[3];
-               gpencil_get_extremes(src_array, totpoints, gps, start, end);
-               copy_v3_v3(end_prv, end);
-               BLI_ghash_insert(all_strokes, sort_pt->gps, sort_pt->gps);
-
-               /* look for near stroke */
-               bool loop = (bool)(totstrokes > 1);
-               while (loop) {
-                       bGPDstroke *gps_next = NULL;
-                       GHash *strokes = BLI_ghash_ptr_new(__func__);
-                       float dist_start = 0.0f;
-                       float dist_end = 0.0f;
-                       float dist = FLT_MAX;
-                       bool reverse = false;
-
-                       for (i = 0; i < totpoints; i++) {
-                               sort_pt = &src_array[i];
-                               /* avoid dups */
-                               if (BLI_ghash_haskey(all_strokes, 
sort_pt->gps)) {
-                                       continue;
+       int i;
+       int last = 0;
+       GHash *all_strokes = BLI_ghash_ptr_new(__func__);
+       /* add first stroke to array */
+       tGPencilPointCache *sort_pt = &src_array[0];
+       bGPDstroke *gps = sort_pt->gps;
+       last = gpencil_insert_to_array(src_array, dst_array, totpoints, gps, 
false, last);
+       float start[3];
+       float end[3];
+       float end_prv[3];
+       gpencil_get_extremes(src_array, totpoints, gps, start, end);
+       copy_v3_v3(end_prv, end);
+       BLI_ghash_insert(all_strokes, sort_pt->gps, sort_pt->gps);
+
+       /* look for near stroke */
+       bool loop = (bool)(totstrokes > 1);
+       while (loop) {
+               bGPDstroke *gps_next = NULL;
+               GHash *strokes = BLI_ghash_ptr_new(__func__);
+               float dist_start = 0.0f;
+               float dist_end = 0.0f;
+               float dist = FLT_MAX;
+               bool reverse = false;
+
+               for (i = 0; i < totpoints; i++) {
+                       sort_pt = &src_array[i];
+                       /* avoid dups */
+                       if (BLI_ghash_haskey(all_strokes, sort_pt->gps)) {
+                               continue;
+                       }
+                       if (!BLI_ghash_haskey(strokes, sort_pt->gps)) {
+                               gpencil_get_extremes(src_array, totpoints, 
sort_pt->gps, start, end);
+                               /* distances to previous end */
+                               dist_start = len_v3v3(end_prv, start);
+                               dist_end = len_v3v3(end_prv, end);
+
+                               if (dist > dist_start) {
+                                       gps_next = sort_pt->gps;
+                                       dist = dist_start;
+                                       reverse = false;
                                }
-                               if (!BLI_ghash_haskey(strokes, sort_pt->gps)) {
-                                       gpencil_get_extremes(src_array, 
totpoints, sort_pt->gps, start, end);
-                                       /* distances to previous end */
-                                       dist_start = len_v3v3(end_prv, start);
-                                       dist_end = len_v3v3(end_prv, end);
-
-                                       if (dist > dist_start) {
-                                               gps_next = sort_pt->gps;
-                                               dist = dist_start;
-                                               reverse = false;
-                                       }
-                                       if (dist > dist_end) {
-                                               gps_next = sort_pt->gps;
-                                               dist = dist_end;
-                                               reverse = true;
-                                       }
-                                       BLI_ghash_insert(strokes, sort_pt->gps, 
sort_pt->gps);
+                               if (dist > dist_end) {
+                                       gps_next = sort_pt->gps;
+                                       dist = dist_end;
+                                       reverse = true;
                                }
+                               BLI_ghash_insert(strokes, sort_pt->gps, 
sort_pt->gps);
                        }
-                       BLI_ghash_free(strokes, NULL, NULL);
-
-                       /* add the stroke to array */
-                       if (gps->next != NULL) {
-                               BLI_ghash_insert(all_strokes, gps_next, 
gps_next);
-                               last = gpencil_insert_to_array(src_array, 
dst_array, totpoints, gps_next, reverse, last);
-                               /* replace last end */
-                               sort_pt = &dst_array[last - 1];
-                               copy_v3_v3(end_prv, &sort_pt->x);
-                       }
+               }
+               BLI_ghash_free(strokes, NULL, NULL);
+
+               /* add the stroke to array */
+               if (gps->next != NULL) {
+                       BLI_ghash_insert(all_strokes, gps_next, gps_next);
+                       last = gpencil_insert_to_array(src_array, dst_array, 
totpoints, gps_next, reverse, last);
+                       /* replace last end */
+                       sort_pt = &dst_array[last - 1];
+                       copy_v3_v3(end_prv, &sort_pt->x);
+               }
 
-                       /* loop exit */
-                       if (last >= totpoints) {
-                               loop = false;
-                       }
+               /* loop exit */
+               if (last >= totpoints) {
+                       loop = false;
                }
+       }
 
-               BLI_ghash_free(all_strokes, NULL, NULL);
-               return last;
+       BLI_ghash_free(all_strokes, NULL, NULL);
+       return last;
 }
 
 static bool gp_strokes_merge_poll(bContext *C)
@@ -458,7 +458,7 @@ static bool gp_strokes_merge_poll(bContext *C)
        /* check hidden or locked materials */
        MaterialGPencilStyle *gp_style = ma->gp_style;
        if ((gp_style->flag & GP_STYLE_COLOR_HIDE) ||
-               (gp_style->flag & GP_STYLE_COLOR_LOCKED))
+           (gp_style->flag & GP_STYLE_COLOR_LOCKED))
        {
                return false;
        }
@@ -466,8 +466,8 @@ static bool gp_strokes_merge_poll(bContext *C)
        /* check layer */
        bGPDlayer *gpl = CTX_data_active_gpencil_layer(C);
        if ((gpl == NULL) ||
-               (gpl->flag & GP_LAYER_LOCKED) ||
-               (gpl->flag & GP_LAYER_HIDE))
+           (gpl->flag & GP_LAYER_LOCKED) ||
+           (gpl->flag & GP_LAYER_HIDE))
        {
                return false;
        }
@@ -523,7 +523,7 @@ static int gp_stroke_merge_exec(bContext *C, wmOperator *op)
 
        /* prepare the new stroke */
        bGPDstroke *gps = gpencil_prepare_stroke(C, op, totpoints);
-       
+
        /* copy original points to final stroke */
        gpencil_insert_points_to_stroke(gps, sorted_array, totpoints);
 
diff --git a/source/blender/editors/gpencil/gpencil_paint.c 
b/source/blender/editors/gpencil/gpencil_paint.c
index ff9678550f9..204d6fe267a 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -371,8 +371,8 @@ static void gp_stroke_convertcoords(tGPsdata *p, const 
float mval[2], float out[
 
                /* add small offset to keep stroke over the surface */
                if ((depth) &&
-                       (gpd->zdepth_offset > 0.0f) &&
-                       (*p->align_flag & GP_PROJECT_DEPTH_VIEW))
+                   (gpd->zdepth_offset > 0.0f) &&
+                   (*p->align_flag & GP_PROJECT_DEPTH_VIEW))
                {
                        *depth *= (1.0f - gpd->zdepth_offset);
                }
diff --git a/source/blender/editors/object/object_relations.c 
b/source/blender/editors/object/object_relations.c
index 867b807c908..3dec9d945a1 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -385,8 +385,9 @@ static int make_proxy_exec(bContext *C, wmOperator *op)
 }
 
 /* Generic itemf's for operators that take library args */
-static const EnumPropertyItem *proxy_collection_object_itemf(bContext *C, 
PointerRNA *UNUSED(ptr),
-                                                             PropertyRNA 
*UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *proxy_collection_object_itemf(
+        bContext *C, PointerRNA *UNUSED(ptr),
+        PropertyRNA *UNUSED(prop), bool *r_free)
 {
        EnumPropertyItem item_tmp = {0}, *item = NULL;
        int totitem = 0;
diff --git a/source/blender/makesrna/intern/rna_brush.c 
b/source/blender/makesrna/intern/rna_brush.c
index ccf6f73f284..7ccdf32b44c 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -529,8 +529,9 @@ static void rna_Brush_set_unprojected_radius(PointerRNA 
*ptr, float value)
        brush->unprojected_radius = value;
 }
 
-static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, 
PointerRNA *ptr,
-                                                   PropertyRNA *UNUSED(prop), 
bool *UNUSED(r_free))
+static const EnumPropertyItem *rna_Brush_direction_itemf(
+        bContext *C, PointerRNA *ptr,
+        PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
 {
        ePaintMode mode = BKE_paintmode_get_active_from_context(C);
 
@@ -635,8 +636,9 @@ static const EnumPropertyItem 
*rna_Brush_direction_itemf(bContext *C, PointerRNA
        }
 }
 
-static const EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C, PointerRNA 
*UNUSED(ptr),
-                                                PropertyRNA *UNUSED(prop), 
bool *UNUSED(r_free))
+static const EnumPropertyItem *rna_Brush_stroke_itemf(
+        bContext *C, PointerRNA *UNUSED(ptr),
+        PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
 {
        ePaintMode mode = BKE_paintmode_get_active_from_context(C);
 
diff --git a/source/blender/makesrna/intern/rna_curve.c 
b/source/blender/makesrna/intern/rna_curve.c
index b6bdb91720e..b92d156b674 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -302,8 +302,9 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int 
value)
        BKE_curve_curve_dimension_update(cu);
 }
 
-static const EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), 
PointerRNA *ptr,
-                                                   PropertyRNA *UNUSED(prop), 
bool *UNUSED(r_free))
+static const EnumPropertyItem *rna_Curve_fill_mode_itemf(
+        bContext *UNUSED(C), PointerRNA *ptr,
+    

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to