[Bf-blender-cvs] [1792c51bdf4] greasepencil-edit-curve: GPencil: Cleanup - Apply clang format

Antonio Vazquez noreply at git.blender.org
Tue Jun 30 16:21:46 CEST 2020


Commit: 1792c51bdf4d492d15dfe77fb7997241f78f2ffc
Author: Antonio Vazquez
Date:   Tue Jun 30 16:21:38 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rB1792c51bdf4d492d15dfe77fb7997241f78f2ffc

GPencil: Cleanup - Apply clang format

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

M	source/blender/blenkernel/intern/gpencil_curve.c
M	source/blender/editors/gpencil/gpencil_intern.h
M	source/blender/editors/transform/transform_convert_gpencil.c

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

diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c
index b0c0e819fa5..0ab6891abdd 100644
--- a/source/blender/blenkernel/intern/gpencil_curve.c
+++ b/source/blender/blenkernel/intern/gpencil_curve.c
@@ -553,7 +553,7 @@ void BKE_gpencil_editcurve_stroke_sync_selection(bGPDstroke *gps, bGPDcurve *gpc
     gpc->flag &= ~GP_CURVE_SELECT;
   }
 
-  for(int i = 0; i < gpc->tot_curve_points; i++) {
+  for (int i = 0; i < gpc->tot_curve_points; i++) {
     bGPDcurve_point *gpc_pt = &gpc->curve_points[i];
     bGPDspoint *pt = &gps->points[gpc_pt->point_index];
     if (pt->flag & GP_SPOINT_SELECT) {
@@ -576,14 +576,14 @@ void BKE_gpencil_stroke_editcurve_sync_selection(bGPDstroke *gps, bGPDcurve *gpc
     gps->flag &= ~GP_STROKE_SELECT;
   }
 
-  for(int i = 0; i < gpc->tot_curve_points; i++) {
+  for (int i = 0; i < gpc->tot_curve_points; i++) {
     bGPDcurve_point *gpc_pt = &gpc->curve_points[i];
     bGPDspoint *pt = &gps->points[gpc_pt->point_index];
 
     if (gpc_pt->flag & GP_CURVE_POINT_SELECT) {
       pt->flag |= GP_SPOINT_SELECT;
       if (i + 1 < gpc->tot_curve_points) {
-        bGPDcurve_point *gpc_pt_next = &gpc->curve_points[i+1];
+        bGPDcurve_point *gpc_pt_next = &gpc->curve_points[i + 1];
         if (gpc_pt_next->flag & GP_CURVE_POINT_SELECT) {
           /* select all the points inbetween */
           for (int j = gpc_pt->point_index + 1; j < gpc_pt_next->point_index; j++) {
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index c5f1f3a3ca4..96c85dae542 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -720,7 +720,7 @@ struct GP_EditableStrokes_Iter {
               continue; \
             if (gps->editcurve == NULL) \
               continue; \
-            bGPDcurve *gpc = gps->editcurve;\
+            bGPDcurve *gpc = gps->editcurve; \
     /* ... Do Stuff With Strokes ...  */
 
 #define GP_EDITABLE_CURVES_END(gpstroke_iter) \
diff --git a/source/blender/editors/transform/transform_convert_gpencil.c b/source/blender/editors/transform/transform_convert_gpencil.c
index 425131c1af0..76de8293fe8 100644
--- a/source/blender/editors/transform/transform_convert_gpencil.c
+++ b/source/blender/editors/transform/transform_convert_gpencil.c
@@ -427,43 +427,43 @@ void createTransGPencil(bContext *C, TransInfo *t)
 
                   /* do point... */
                   if (point_ok) {
-                      copy_v3_v3(td->iloc, &pt->x);
-                      /* Only copy center in local origins.
-                      * This allows get interesting effects also when move
-                      * using proportional editing. */
-                      if ((gps->flag & GP_STROKE_SELECT) &&
-                          (ts->transform_pivot_point == V3D_AROUND_LOCAL_ORIGINS)) {
-                        copy_v3_v3(td->center, center);
-                      }
-                      else {
-                        copy_v3_v3(td->center, &pt->x);
-                      }
+                    copy_v3_v3(td->iloc, &pt->x);
+                    /* Only copy center in local origins.
+                     * This allows get interesting effects also when move
+                     * using proportional editing. */
+                    if ((gps->flag & GP_STROKE_SELECT) &&
+                        (ts->transform_pivot_point == V3D_AROUND_LOCAL_ORIGINS)) {
+                      copy_v3_v3(td->center, center);
+                    }
+                    else {
+                      copy_v3_v3(td->center, &pt->x);
+                    }
 
-                      td->loc = &pt->x;
+                    td->loc = &pt->x;
 
-                      td->flag = 0;
+                    td->flag = 0;
 
-                      if (pt->flag & GP_SPOINT_SELECT) {
-                        td->flag |= TD_SELECTED;
-                      }
+                    if (pt->flag & GP_SPOINT_SELECT) {
+                      td->flag |= TD_SELECTED;
+                    }
 
-                      /* For other transform modes (e.g. shrink-fatten), need to additional data
-                      * but never for mirror.
-                      */
-                      if (t->mode != TFM_MIRROR) {
-                        if (t->mode != TFM_GPENCIL_OPACITY) {
-                          if (is_scale_thickness) {
-                            td->val = &pt->pressure;
-                            td->ival = pt->pressure;
-                          }
-                        }
-                        else {
-                          td->val = &pt->strength;
-                          td->ival = pt->strength;
+                    /* For other transform modes (e.g. shrink-fatten), need to additional data
+                     * but never for mirror.
+                     */
+                    if (t->mode != TFM_MIRROR) {
+                      if (t->mode != TFM_GPENCIL_OPACITY) {
+                        if (is_scale_thickness) {
+                          td->val = &pt->pressure;
+                          td->ival = pt->pressure;
                         }
                       }
+                      else {
+                        td->val = &pt->strength;
+                        td->ival = pt->strength;
+                      }
                     }
-  #if 0
+                  }
+#if 0
                     /* screenspace needs special matrices... */
                     if ((gps->flag & (GP_STROKE_3DSPACE | GP_STROKE_2DSPACE | GP_STROKE_2DIMAGE)) ==
                         0) {
@@ -476,20 +476,20 @@ void createTransGPencil(bContext *C, TransInfo *t)
                         td->protectflag = OB_LOCK_LOCZ | OB_LOCK_ROTZ | OB_LOCK_SCALEZ;
                       }
                     }
-  #endif
-                    /* apply parent transformations */
-                    copy_m3_m4(td->smtx, inverse_diff_mat); /* final position */
-                    copy_m3_m4(td->mtx, diff_mat);          /* display position */
-                    copy_m3_m4(td->axismtx, diff_mat);      /* axis orientation */
+#endif
+                  /* apply parent transformations */
+                  copy_m3_m4(td->smtx, inverse_diff_mat); /* final position */
+                  copy_m3_m4(td->mtx, diff_mat);          /* display position */
+                  copy_m3_m4(td->axismtx, diff_mat);      /* axis orientation */
 
-                    /* Save the stroke for recalc geometry function. */
-                    td->extra = gps;
+                  /* Save the stroke for recalc geometry function. */
+                  td->extra = gps;
 
-                    /* Save pointer to object. */
-                    td->ob = obact;
+                  /* Save pointer to object. */
+                  td->ob = obact;
 
-                    td++;
-                    tail++;
+                  td++;
+                  tail++;
                 }
               }
               /* March over these points, and calculate the proportional editing distances. */
@@ -527,7 +527,8 @@ void recalcData_gpencil_strokes(TransInfo *t)
       BKE_gpencil_stroke_geometry_update(gps);
     }
   }
-  // DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
+  // DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY |
+  // ID_RECALC_COPY_ON_WRITE);
   BLI_ghash_free(strokes, NULL, NULL);
 }



More information about the Bf-blender-cvs mailing list