Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-09-02 09:45:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-02 09:49:45 +0300
commit6abb37babc6aad9d7f262b1516b7a0e2972cb8e1 (patch)
tree1e2593349ca7903159cd5dab891e8af38b4b1676 /source
parent83199b643047f8576f27f2ffcffe623c0bfc5656 (diff)
Cleanup: style
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_lattice.h28
-rw-r--r--source/blender/blenkernel/intern/gpencil_modifier.c8
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c4
-rw-r--r--source/blender/editors/armature/armature_skinning.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_armature.c28
-rw-r--r--source/blender/editors/gpencil/gpencil_fill.c14
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c34
-rw-r--r--source/blender/editors/include/ED_gpencil.h5
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c21
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c16
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c13
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c7
13 files changed, 97 insertions, 87 deletions
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index 2ca6a35eec5..2e093ba11a2 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -62,20 +62,24 @@ void end_latt_deform(struct LatticeDeformData *lattice_deform_data);
bool object_deform_mball(struct Object *ob, struct ListBase *dispbase);
void outside_lattice(struct Lattice *lt);
-void curve_deform_verts(struct Object *cuOb, struct Object *target,
+void curve_deform_verts(
+ struct Object *cuOb, struct Object *target,
struct Mesh *mesh, float (*vertexCos)[3],
int numVerts, const char *vgroup, short defaxis);
-void curve_deform_vector(struct Object *cuOb, struct Object *target,
- float orco[3], float vec[3], float mat[3][3], int no_rot_axis);
-
-void lattice_deform_verts(struct Object *laOb, struct Object *target,
- struct Mesh *mesh, float (*vertexCos)[3],
- int numVerts, const char *vgroup, float influence);
-void armature_deform_verts(struct Object *armOb, struct Object *target,
- const struct Mesh *mesh, float (*vertexCos)[3],
- float (*defMats)[3][3], int numVerts, int deformflag,
- float (*prevCos)[3], const char *defgrp_name,
- struct bGPDstroke *gps);
+void curve_deform_vector(
+ struct Object *cuOb, struct Object *target,
+ float orco[3], float vec[3], float mat[3][3], int no_rot_axis);
+
+void lattice_deform_verts(
+ struct Object *laOb, struct Object *target,
+ struct Mesh *mesh, float (*vertexCos)[3],
+ int numVerts, const char *vgroup, float influence);
+void armature_deform_verts(
+ struct Object *armOb, struct Object *target,
+ const struct Mesh *mesh, float (*vertexCos)[3],
+ float (*defMats)[3][3], int numVerts, int deformflag,
+ float (*prevCos)[3], const char *defgrp_name,
+ struct bGPDstroke *gps);
float (*BKE_lattice_vertexcos_get(struct Object *ob, int *r_numVerts))[3];
void BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3]);
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index af82d8fa200..bff71f64871 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -423,10 +423,10 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer *g
/* some modifiers could require a recalc of fill triangulation data */
if (gpd->flag & GP_DATA_STROKE_FORCE_RECALC) {
if (ELEM(md->type,
- eGpencilModifierType_Armature,
- eGpencilModifierType_Hook,
- eGpencilModifierType_Lattice,
- eGpencilModifierType_Offset))
+ eGpencilModifierType_Armature,
+ eGpencilModifierType_Hook,
+ eGpencilModifierType_Lattice,
+ eGpencilModifierType_Offset))
{
gps->flag |= GP_STROKE_RECALC_CACHES;
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 29544a601d5..f1d3ad37e67 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -866,7 +866,7 @@ static void gpencil_draw_strokes(
if ((fillgrp) && (!stl->storage->simplify_fill)) {
gpencil_add_fill_shgroup(
cache, fillgrp, ob, derived_gpf, gps,
- opacity, tintcolor, false, custonion);
+ opacity, tintcolor, false, custonion);
}
/* stroke */
if (strokegrp) {
@@ -1245,7 +1245,7 @@ void DRW_gpencil_populate_datablock(
/* if pose mode, maybe the overlay to fade geometry is enabled */
if ((draw_ctx->obact) && (draw_ctx->object_mode == OB_MODE_POSE) &&
- (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT))
+ (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT))
{
opacity = gpl->opacity * v3d->overlay.bone_select_alpha;
}
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index 63068e61ba3..834be3b69ef 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -104,7 +104,7 @@ static int bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap)
for (a = 0; a < segments; a++) {
**hbone = bone;
- ++*hbone;
+ (*hbone)++;
}
}
return segments;
@@ -180,7 +180,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
for (a = 0; a < segments; a++) {
**hgroup = defgroup;
- ++*hgroup;
+ (*hgroup)++;
}
}
return segments;
diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c
index b55239deadc..3626528414a 100644
--- a/source/blender/editors/gpencil/gpencil_armature.c
+++ b/source/blender/editors/gpencil/gpencil_armature.c
@@ -144,7 +144,7 @@ static int gpencil_bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap
if (!(bone->flag & BONE_HIDDEN_P)) {
if (!(bone->flag & BONE_NO_DEFORM)) {
if (data->heat && data->armob->pose &&
- BKE_pose_channel_find_name(data->armob->pose, bone->name))
+ BKE_pose_channel_find_name(data->armob->pose, bone->name))
{
segments = bone->segments;
}
@@ -157,7 +157,7 @@ static int gpencil_bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap
for (a = 0; a < segments; a++) {
**hbone = bone;
- ++*hbone;
+ (*hbone)++;
}
}
return segments;
@@ -214,7 +214,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
if (!(bone->flag & BONE_HIDDEN_P)) {
if (!(bone->flag & BONE_NO_DEFORM)) {
if (data->heat && data->armob->pose &&
- BKE_pose_channel_find_name(data->armob->pose, bone->name))
+ BKE_pose_channel_find_name(data->armob->pose, bone->name))
{
segments = bone->segments;
}
@@ -237,7 +237,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
for (a = 0; a < segments; a++) {
**hgroup = defgroup;
- ++*hgroup;
+ (*hgroup)++;
}
}
return segments;
@@ -319,7 +319,7 @@ static void gpencil_add_verts_to_dgroups(
bbone = NULL;
if ((ob_arm->pose) &&
- (pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name)))
+ (pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name)))
{
if (bone->segments > 1) {
segments = bone->segments;
@@ -366,7 +366,7 @@ static void gpencil_add_verts_to_dgroups(
for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) {
if ((gpf == gpl->actframe) ||
- ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit)))
+ ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit)))
{
if (gpf == NULL)
@@ -463,8 +463,9 @@ static void gpencil_object_vgroup_calc_from_armature(
/* Traverse the bone list, trying to create empty vertex
* groups corresponding to the bone.
*/
- defbase_add = gpencil_bone_looper(ob, arm->bonebase.first, NULL,
- vgroup_add_unique_bone_cb);
+ defbase_add = gpencil_bone_looper(
+ ob, arm->bonebase.first, NULL,
+ vgroup_add_unique_bone_cb);
if (defbase_add) {
/* its possible there are DWeight's outside the range of the current
@@ -493,11 +494,12 @@ bool ED_gpencil_add_armature_weights(
/* if no armature modifier, add a new one */
GpencilModifierData *md = BKE_gpencil_modifiers_findByType(ob, eGpencilModifierType_Armature);
if (md == NULL) {
- md = ED_object_gpencil_modifier_add(reports, bmain, scene,
- ob, "Armature", eGpencilModifierType_Armature);
+ md = ED_object_gpencil_modifier_add(
+ reports, bmain, scene,
+ ob, "Armature", eGpencilModifierType_Armature);
if (md == NULL) {
BKE_report(reports, RPT_ERROR,
- "Unable to add a new Armature modifier to object");
+ "Unable to add a new Armature modifier to object");
return false;
}
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
@@ -511,7 +513,7 @@ bool ED_gpencil_add_armature_weights(
else {
if (ob_arm != mmd->object) {
BKE_report(reports, RPT_ERROR,
- "The existing Armature modifier is already using a different Armature object");
+ "The existing Armature modifier is already using a different Armature object");
return false;
}
}
@@ -586,7 +588,7 @@ static int gpencil_generate_weights_exec(bContext *C, wmOperator *op)
if (ob_arm == NULL) {
BKE_report(op->reports, RPT_ERROR,
- "No Armature object in the view layer");
+ "No Armature object in the view layer");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 2ff7e45d7a2..6aeaa04f2bd 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -248,7 +248,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, float ink[4])
/* normal strokes */
if ((tgpf->fill_draw_mode == GP_FILL_DMODE_STROKE) ||
- (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
+ (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
{
ED_gp_draw_fill(&tgpw);
@@ -256,7 +256,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, float ink[4])
/* 3D Lines with basic shapes and invisible lines */
if ((tgpf->fill_draw_mode == GP_FILL_DMODE_CONTROL) ||
- (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
+ (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH))
{
gp_draw_basic_stroke(tgpf, gps, tgpw.diff_mat, gps->flag & GP_STROKE_CYCLIC, ink,
tgpf->flag, tgpf->fill_threshold);
@@ -676,7 +676,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf)
int cur_back_offset = -1;
for (int i = 0; i < NEIGHBOR_COUNT; i++) {
if (backtracked_offset[0][0] == offset[i][0] &&
- backtracked_offset[0][1] == offset[i][1])
+ backtracked_offset[0][1] == offset[i][1])
{
/* Finding the bracktracked pixel offset index */
cur_back_offset = i;
@@ -710,7 +710,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf)
}
/* current pixel is equal to starting pixel */
if (boundary_co[0] == start_co[0] &&
- boundary_co[1] == start_co[1])
+ boundary_co[1] == start_co[1])
{
BLI_stack_pop(tgpf->stack, &v);
// boundary_found = true;
@@ -758,9 +758,9 @@ static void gpencil_get_depth_array(tGPDfill *tgpf)
copy_v2_v2_int(mval, &ptc->x);
if ((ED_view3d_autodist_depth(
- tgpf->ar, mval, depth_margin, tgpf->depth_arr + i) == 0) &&
- (i && (ED_view3d_autodist_depth_seg(
- tgpf->ar, mval, mval_prev, depth_margin + 1, tgpf->depth_arr + i) == 0)))
+ tgpf->ar, mval, depth_margin, tgpf->depth_arr + i) == 0) &&
+ (i && (ED_view3d_autodist_depth_seg(
+ tgpf->ar, mval, mval_prev, depth_margin + 1, tgpf->depth_arr + i) == 0)))
{
interp_depth = true;
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index f000eac5f94..807fa94fa8a 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -639,7 +639,7 @@ static short gp_stroke_addpoint(
}
/* apply randomness to pressure */
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) &&
- (brush->gpencil_settings->draw_random_press > 0.0f))
+ (brush->gpencil_settings->draw_random_press > 0.0f))
{
float curvef = curvemapping_evaluateF(brush->gpencil_settings->curve_sensitivity, 0, pressure);
float tmp_pressure = curvef * brush->gpencil_settings->draw_sensitivity;
@@ -668,7 +668,7 @@ static short gp_stroke_addpoint(
/* apply angle of stroke to brush size */
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) &&
- (brush->gpencil_settings->draw_angle_factor > 0.0f))
+ (brush->gpencil_settings->draw_angle_factor > 0.0f))
{
gp_brush_angle(gpd, brush, pt, mval);
}
@@ -687,7 +687,7 @@ static short gp_stroke_addpoint(
/* apply randomness to color strength */
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) &&
- (brush->gpencil_settings->draw_random_strength > 0.0f))
+ (brush->gpencil_settings->draw_random_strength > 0.0f))
{
if (BLI_rng_get_float(p->rng) > 0.5f) {
pt->strength -= pt->strength * brush->gpencil_settings->draw_random_strength * BLI_rng_get_float(p->rng);
@@ -1109,7 +1109,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
copy_v2_v2_int(mval, &ptc->x);
if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) &&
- (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
+ (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
{
interp_depth = true;
}
@@ -1185,7 +1185,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
}
/* apply randomness to stroke */
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) &&
- (brush->gpencil_settings->draw_random_sub > 0.0f))
+ (brush->gpencil_settings->draw_random_sub > 0.0f))
{
gp_randomize_stroke(gps, brush, p->rng);
}
@@ -1195,7 +1195,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
* the original stroke
*/
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) &&
- (brush->gpencil_settings->draw_smoothfac > 0.0f))
+ (brush->gpencil_settings->draw_smoothfac > 0.0f))
{
float reduce = 0.0f;
for (int r = 0; r < brush->gpencil_settings->draw_smoothlvl; r++) {
@@ -1208,7 +1208,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
}
/* smooth thickness */
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) &&
- (brush->gpencil_settings->thick_smoothfac > 0.0f))
+ (brush->gpencil_settings->thick_smoothfac > 0.0f))
{
for (int r = 0; r < brush->gpencil_settings->thick_smoothlvl * 2; r++) {
for (i = 0; i < gps->totpoints; i++) {
@@ -1276,7 +1276,7 @@ static bool gp_stroke_eraser_is_occluded(tGPsdata *p, const bGPDspoint *pt, cons
Object *obact = (Object *)p->ownerPtr.data;
if ((p->sa->spacetype == SPACE_VIEW3D) &&
- (p->flags & GP_PAINTFLAG_V3D_ERASER_DEPTH))
+ (p->flags & GP_PAINTFLAG_V3D_ERASER_DEPTH))
{
RegionView3D *rv3d = p->ar->regiondata;
bGPDlayer *gpl = p->gpl;
@@ -1448,7 +1448,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
/* Check that point segment of the boundbox of the eraser stroke */
if (((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) ||
- ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1])))
+ ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1])))
{
/* Check if point segment of stroke had anything to do with
* eraser region (either within stroke painted, or on its lines)
@@ -1456,7 +1456,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
*/
if (gp_stroke_inside_circle(mval, mvalo, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {
if ((gp_stroke_eraser_is_occluded(p, pt1, pc1[0], pc1[1]) == false) ||
- (gp_stroke_eraser_is_occluded(p, pt2, pc2[0], pc2[1]) == false))
+ (gp_stroke_eraser_is_occluded(p, pt2, pc2[0], pc2[1]) == false))
{
/* Point is affected: */
/* 1) Adjust thickness
@@ -1468,13 +1468,13 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
/* 2) Tag any point with overly low influence for removal in the next pass */
if ((pt1->pressure < cull_thresh) || (p->flags & GP_PAINTFLAG_HARD_ERASER) ||
- (eraser->gpencil_settings->eraser_mode == GP_BRUSH_ERASER_HARD))
+ (eraser->gpencil_settings->eraser_mode == GP_BRUSH_ERASER_HARD))
{
pt1->flag |= GP_SPOINT_TAG;
do_cull = true;
}
if ((pt2->pressure < cull_thresh) || (p->flags & GP_PAINTFLAG_HARD_ERASER) ||
- (eraser->gpencil_settings->eraser_mode == GP_BRUSH_ERASER_HARD))
+ (eraser->gpencil_settings->eraser_mode == GP_BRUSH_ERASER_HARD))
{
pt2->flag |= GP_SPOINT_TAG;
do_cull = true;
@@ -1587,7 +1587,7 @@ static Brush *gp_get_default_eraser(Main *bmain, ToolSettings *ts)
Brush *brush_old = paint->brush;
for (Brush *brush = bmain->brush.first; brush; brush = brush->id.next) {
if ((brush->ob_mode == OB_MODE_GPENCIL_PAINT) &&
- (brush->gpencil_settings->brush_type == GP_BRUSH_TYPE_ERASE))
+ (brush->gpencil_settings->brush_type == GP_BRUSH_TYPE_ERASE))
{
/* save first eraser to use later if no default */
if (brush_dft == NULL) {
@@ -2293,7 +2293,7 @@ static void gpencil_draw_cursor_set(tGPsdata *p)
{
Brush *brush = p->brush;
if ((p->paintmode == GP_PAINTMODE_ERASER) ||
- (brush->gpencil_settings->brush_type == GP_BRUSH_TYPE_ERASE))
+ (brush->gpencil_settings->brush_type == GP_BRUSH_TYPE_ERASE))
{
WM_cursor_modal_set(p->win, BC_CROSSCURSOR); /* XXX need a better cursor */
}
@@ -2436,7 +2436,7 @@ static void gpencil_draw_apply(bContext *C, wmOperator *op, tGPsdata *p, Depsgra
}
}
else if ((p->brush->gpencil_settings->flag & GP_BRUSH_STABILIZE_MOUSE_TEMP) &&
- (gpd->runtime.sbuffer_size > 0))
+ (gpd->runtime.sbuffer_size > 0))
{
pt = (tGPspoint *)gpd->runtime.sbuffer + gpd->runtime.sbuffer_size - 1;
if (p->paintmode != GP_PAINTMODE_ERASER) {
@@ -2942,7 +2942,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
*/
/* if polyline and release shift must cancel */
if ((ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) ||
- ((p->paintmode == GP_PAINTMODE_DRAW_POLY) && (event->shift == 0)))
+ ((p->paintmode == GP_PAINTMODE_DRAW_POLY) && (event->shift == 0)))
{
/* exit() ends the current stroke before cleaning up */
/* printf("\t\tGP - end of paint op + end of stroke\n"); */
@@ -3140,7 +3140,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
/* eraser size */
else if ((p->paintmode == GP_PAINTMODE_ERASER) &&
- ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE, PADPLUSKEY, PADMINUS))
+ ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE, PADPLUSKEY, PADMINUS))
{
/* just resize the brush (local version)
* TODO: fix the hardcoded size jumps (set to make a visible difference) and hardcoded keys
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 25dc6743a33..09095ede556 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -195,8 +195,9 @@ int ED_gpencil_session_active(void);
int ED_undo_gpencil_step(struct bContext *C, int step, const char *name);
/* ------------ Grease-Pencil Armature weights ------------------ */
-bool ED_gpencil_add_armature_weights(const struct bContext *C, struct ReportList *reports,
- struct Object *ob, struct Object *ob_arm, int mode);
+bool ED_gpencil_add_armature_weights(
+ const struct bContext *C, struct ReportList *reports,
+ struct Object *ob, struct Object *ob_arm, int mode);
/* keep this aligned with gpencil_armature enum */
#define GP_PAR_ARMATURE_NAME 0
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 936ab038ec7..37a2fc8edb5 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -2325,11 +2325,11 @@ static int edbm_do_smooth_laplacian_vertex_exec(bContext *C, wmOperator *op)
}
MEM_freeN(objects);
- if (tot_unselected == objects_len){
+ if (tot_unselected == objects_len) {
BKE_report(op->reports, RPT_WARNING, "No selected vertex");
return OPERATOR_CANCELLED;
}
- else if (tot_invalid == objects_len){
+ else if (tot_invalid == objects_len) {
BKE_report(op->reports, RPT_WARNING, "Selected faces must be triangles or quads");
return OPERATOR_CANCELLED;
}
@@ -3076,9 +3076,9 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op)
}
tot_selected_verts_objects++;
- if (shape_propagate(em)){
+ if (shape_propagate(em)) {
tot_shapekeys++;
- };
+ }
EDBM_update_generic(em, false, false);
}
@@ -3088,12 +3088,13 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "No selected vertex");
return OPERATOR_CANCELLED;
}
- else if (tot_shapekeys == 0){
- BKE_report(op->reports,
- RPT_ERROR,
- objects_len > 1 ?
- "Meshes do not have shape keys" :
- "Mesh does not have shape keys");
+ else if (tot_shapekeys == 0) {
+ BKE_report(
+ op->reports,
+ RPT_ERROR,
+ objects_len > 1 ?
+ "Meshes do not have shape keys" :
+ "Mesh does not have shape keys");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index e022d65de63..3e92c736db7 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -803,7 +803,7 @@ bool ED_object_parent_set(ReportList *reports, const bContext *C, Scene *scene,
ED_gpencil_add_armature_weights(C, reports, ob, par, GP_PAR_ARMATURE_NAME);
}
else if ((partype == PAR_ARMATURE_AUTO) ||
- (partype == PAR_ARMATURE_ENVELOPE))
+ (partype == PAR_ARMATURE_ENVELOPE))
{
WM_cursor_wait(1);
ED_gpencil_add_armature_weights(C, reports, ob, par, GP_PAR_ARMATURE_AUTO);
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 36fc23b35c9..c33d71b9775 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -321,11 +321,11 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if ((pchan->bone->flag & BONE_SELECTED) &&
- (PBONE_VISIBLE(arm, pchan->bone)) &&
- /* if the bone has a parent and is connected to the parent,
- * don't do anything - will break chain unless we do auto-ik.
- */
- (pchan->bone->flag & BONE_CONNECTED) == 0)
+ (PBONE_VISIBLE(arm, pchan->bone)) &&
+ /* if the bone has a parent and is connected to the parent,
+ * don't do anything - will break chain unless we do auto-ik.
+ */
+ (pchan->bone->flag & BONE_CONNECTED) == 0)
{
pchan->bone->flag |= BONE_TRANSFORM;
}
@@ -336,9 +336,9 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if ((pchan->bone->flag & BONE_TRANSFORM) &&
- /* check that our parents not transformed (if we have one) */
- ((pchan->bone->parent &&
- BKE_armature_bone_flag_test_recursive(pchan->bone->parent, BONE_TRANSFORM)) == 0))
+ /* check that our parents not transformed (if we have one) */
+ ((pchan->bone->parent &&
+ BKE_armature_bone_flag_test_recursive(pchan->bone->parent, BONE_TRANSFORM)) == 0))
{
/* Get position in pchan (pose) space. */
float cursor_pose[3];
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
index 4ae48e73d0f..5bab95cf6f6 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
@@ -92,12 +92,13 @@ static void gpencil_deform_verts(
}
/* deform verts */
- armature_deform_verts(mmd->object, target, NULL,
- (float(*)[3])all_vert_coords,
- NULL, gps->totpoints,
- mmd->deformflag,
- (float(*)[3])mmd->prevCos,
- mmd->vgname, gps);
+ armature_deform_verts(
+ mmd->object, target, NULL,
+ (float(*)[3])all_vert_coords,
+ NULL, gps->totpoints,
+ mmd->deformflag,
+ (float(*)[3])mmd->prevCos,
+ mmd->vgname, gps);
/* Apply deformed coordinates */
pt = gps->points;
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
index 3ba53250abd..2e91c51d3da 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
@@ -70,9 +70,10 @@ static void deformStroke(
{
SubdivGpencilModifierData *mmd = (SubdivGpencilModifierData *)md;
- if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 3, gpl, gps,
- mmd->flag & GP_SUBDIV_INVERT_LAYER, mmd->flag & GP_SUBDIV_INVERT_PASS))
+ if (!is_stroke_affected_by_modifier(
+ ob,
+ mmd->layername, mmd->pass_index, 3, gpl, gps,
+ mmd->flag & GP_SUBDIV_INVERT_LAYER, mmd->flag & GP_SUBDIV_INVERT_PASS))
{
return;
}