From 1fb9fcb333a03a3151b352e9cb8e3cd0cd10b2b4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 31 Oct 2018 14:43:25 +1100 Subject: Cleanup: indentation --- source/blender/draw/engines/gpencil/gpencil_draw_utils.c | 6 +++--- source/blender/draw/engines/workbench/workbench_forward.c | 2 +- source/blender/editors/animation/keyframes_draw.c | 8 ++++---- source/blender/editors/curve/editcurve.c | 2 +- source/blender/editors/gpencil/drawgpencil.c | 4 ++-- source/blender/editors/gpencil/gpencil_paint.c | 2 +- source/blender/editors/include/ED_gpencil.h | 2 +- source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c | 9 +++++---- source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c | 2 +- source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c | 9 +++++---- source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c | 9 +++++---- source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c | 2 +- source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c | 9 +++++---- source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c | 9 +++++---- source/blender/makesrna/intern/rna_ID.c | 2 +- source/blender/makesrna/intern/rna_action.c | 4 ++-- source/blender/makesrna/intern/rna_object.c | 8 ++++---- 17 files changed, 47 insertions(+), 42 deletions(-) (limited to 'source/blender') diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index e0e69e0de91..54a2cf4b960 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -1311,9 +1311,9 @@ void DRW_gpencil_populate_datablock( } /* fade no active layers */ if ((overlay) && (draw_ctx->object_mode == OB_MODE_GPENCIL_PAINT) && - (v3d->gp_flag & V3D_GP_FADE_NOACTIVE_LAYERS) && - (draw_ctx->obact) && (draw_ctx->obact == ob) && - (gpl != gpl_active)) + (v3d->gp_flag & V3D_GP_FADE_NOACTIVE_LAYERS) && + (draw_ctx->obact) && (draw_ctx->obact == ob) && + (gpl != gpl_active)) { opacity = opacity * v3d->overlay.gpencil_fade_layer; } diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index d8de253c8eb..09d9a068b7d 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -368,7 +368,7 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata) if (DRW_state_is_image_render()) { /* TODO: Should be based on the number of samples used for render. */ - noise_offset = fmodf(noise_offset + 1.0f/8.0f, 1.0f); + noise_offset = fmodf(noise_offset + 1.0f / 8.0f, 1.0f); } if (wpd->shading.flag & XRAY_FLAG(wpd)) { diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 008160e2459..3eb73b9eef2 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -181,7 +181,7 @@ static eKeyframeExtremeDrawOpts bezt_extreme_type(BezTripleChain *chain) /* Comparator callback used for ActKeyColumns and BezTripleChain */ static short compare_ak_bezt(void *node, void *data) { - BezTripleChain *chain = (BezTripleChain*)data; + BezTripleChain *chain = data; return compare_ak_cfraPtr(node, &chain->cur->vec[1][0]); } @@ -190,7 +190,7 @@ static short compare_ak_bezt(void *node, void *data) static DLRBT_Node *nalloc_ak_bezt(void *data) { ActKeyColumn *ak = MEM_callocN(sizeof(ActKeyColumn), "ActKeyColumn"); - BezTripleChain *chain = (BezTripleChain*)data; + BezTripleChain *chain = data; BezTriple *bezt = chain->cur; /* store settings based on state of BezTriple */ @@ -209,8 +209,8 @@ static DLRBT_Node *nalloc_ak_bezt(void *data) /* Node updater callback used for building ActKeyColumns from BezTripleChain */ static void nupdate_ak_bezt(void *node, void *data) { - ActKeyColumn *ak = (ActKeyColumn *)node; - BezTripleChain *chain = (BezTripleChain*)data; + ActKeyColumn *ak = node; + BezTripleChain *chain = data; BezTriple *bezt = chain->cur; /* set selection status and 'touched' status */ diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 89d1575c650..dac61aefb4b 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -5213,7 +5213,7 @@ static int curve_extrude_exec(bContext *C, wmOperator *UNUSED(op)) Nurb *nu; for (nu = editnurb->nurbs.first; nu; nu = nu->next) { if ((nu->pntsv == 1) && - (ED_curve_nurb_select_count(v3d, nu) == 1)) + (ED_curve_nurb_select_count(v3d, nu) == 1)) { as_curve = true; break; diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 5b1b8d8a884..e160c7e05a1 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -1674,8 +1674,8 @@ static void gp_draw_data(RegionView3D *rv3d, /* if we have strokes for scenes (3d view)/clips (movie clip editor) * and objects/tracks, multiple data blocks have to be drawn */ static void gp_draw_data_all( - ViewLayer *view_layer, RegionView3D *rv3d, Scene *scene, bGPdata *gpd, - int offsx, int offsy, int winx, int winy, + ViewLayer *view_layer, RegionView3D *rv3d, Scene *scene, bGPdata *gpd, + int offsx, int offsy, int winx, int winy, int cfra, int dflag, const char UNUSED(spacetype)) { bGPdata *gpd_source = NULL; diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index a812b7377c3..837b18d1e52 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1877,7 +1877,7 @@ static bool gp_session_initdata(bContext *C, wmOperator *op, tGPsdata *p) /* lock axis (in some modes, disable) */ if (((*p->align_flag & GP_PROJECT_DEPTH_VIEW) == 0) && - ((*p->align_flag & GP_PROJECT_DEPTH_STROKE) == 0)) + ((*p->align_flag & GP_PROJECT_DEPTH_STROKE) == 0)) { p->lock_axis = ts->gp_sculpt.lock_axis; } diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 0b69ebeb758..5d93c2e3065 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -163,7 +163,7 @@ void ED_gpencil_draw_view3d_object( bool only3d); void ED_gpencil_draw_ex( struct ViewLayer *view_layer, struct RegionView3D *rv3d, struct Scene *scene, - struct bGPdata *gpd, int winx, int winy, + struct bGPdata *gpd, int winx, int winy, const int cfra, const char spacetype); /* ----------- Grease-Pencil AnimEdit API ------------------ */ diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c index 86892ad44fd..43af4b94c15 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c @@ -77,10 +77,11 @@ static void deformStroke( float mat[4][4]; float loc[3], rot[3], scale[3]; - if (!is_stroke_affected_by_modifier(ob, - mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps, - mmd->flag & GP_OFFSET_INVERT_LAYER, mmd->flag & GP_OFFSET_INVERT_PASS, - mmd->flag & GP_OFFSET_INVERT_LAYERPASS)) + if (!is_stroke_affected_by_modifier( + ob, + mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps, + mmd->flag & GP_OFFSET_INVERT_LAYER, mmd->flag & GP_OFFSET_INVERT_PASS, + mmd->flag & GP_OFFSET_INVERT_LAYERPASS)) { return; } diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c index 9c38198a240..b89c3792455 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c @@ -81,7 +81,7 @@ static void deformStroke( ob, mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps, mmd->flag & GP_OPACITY_INVERT_LAYER, mmd->flag & GP_OPACITY_INVERT_PASS, - mmd->flag & GP_OPACITY_INVERT_LAYERPASS)) + mmd->flag & GP_OPACITY_INVERT_LAYERPASS)) { return; } diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c index 0dde238d205..2d0b90e6de7 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c @@ -66,10 +66,11 @@ static void deformStroke( { SimplifyGpencilModifierData *mmd = (SimplifyGpencilModifierData *)md; - if (!is_stroke_affected_by_modifier(ob, - mmd->layername, mmd->pass_index, mmd->layer_pass, 4, gpl, gps, - mmd->flag & GP_SIMPLIFY_INVERT_LAYER, mmd->flag & GP_SIMPLIFY_INVERT_PASS, - mmd->flag & GP_SIMPLIFY_INVERT_LAYERPASS)) + if (!is_stroke_affected_by_modifier( + ob, + mmd->layername, mmd->pass_index, mmd->layer_pass, 4, gpl, gps, + mmd->flag & GP_SIMPLIFY_INVERT_LAYER, mmd->flag & GP_SIMPLIFY_INVERT_PASS, + mmd->flag & GP_SIMPLIFY_INVERT_LAYERPASS)) { return; } diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c index 0e2750ec58d..8d93980a9d0 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c @@ -69,10 +69,11 @@ static void deformStroke( SmoothGpencilModifierData *mmd = (SmoothGpencilModifierData *)md; const int def_nr = defgroup_name_index(ob, mmd->vgname); - if (!is_stroke_affected_by_modifier(ob, - mmd->layername, mmd->pass_index, mmd->layer_pass, 3, gpl, gps, - mmd->flag & GP_SMOOTH_INVERT_LAYER, mmd->flag & GP_SMOOTH_INVERT_PASS, - mmd->flag & GP_SMOOTH_INVERT_LAYERPASS)) + if (!is_stroke_affected_by_modifier( + ob, + mmd->layername, mmd->pass_index, mmd->layer_pass, 3, gpl, gps, + mmd->flag & GP_SMOOTH_INVERT_LAYER, mmd->flag & GP_SMOOTH_INVERT_PASS, + mmd->flag & GP_SMOOTH_INVERT_LAYERPASS)) { return; } diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c index 0c6adcb128b..38aa4159632 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c @@ -74,7 +74,7 @@ static void deformStroke( ob, mmd->layername, mmd->pass_index, mmd->layer_pass, 3, gpl, gps, mmd->flag & GP_SUBDIV_INVERT_LAYER, mmd->flag & GP_SUBDIV_INVERT_PASS, - mmd->flag & GP_SUBDIV_INVERT_LAYERPASS)) + mmd->flag & GP_SUBDIV_INVERT_LAYERPASS)) { return; } diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c index 2dc4e84cef8..4c44559f36e 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c @@ -94,10 +94,11 @@ static void deformStroke( ThickGpencilModifierData *mmd = (ThickGpencilModifierData *)md; const int def_nr = defgroup_name_index(ob, mmd->vgname); - if (!is_stroke_affected_by_modifier(ob, - mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps, - mmd->flag & GP_THICK_INVERT_LAYER, mmd->flag & GP_THICK_INVERT_PASS, - mmd->flag & GP_THICK_INVERT_LAYERPASS)) + if (!is_stroke_affected_by_modifier( + ob, + mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps, + mmd->flag & GP_THICK_INVERT_LAYER, mmd->flag & GP_THICK_INVERT_PASS, + mmd->flag & GP_THICK_INVERT_LAYERPASS)) { return; } diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c index b1eea14d90c..ba3b2d84861 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c @@ -75,10 +75,11 @@ static void deformStroke( { TintGpencilModifierData *mmd = (TintGpencilModifierData *)md; - if (!is_stroke_affected_by_modifier(ob, - mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps, - mmd->flag & GP_TINT_INVERT_LAYER, mmd->flag & GP_TINT_INVERT_PASS, - mmd->flag & GP_TINT_INVERT_LAYERPASS)) + if (!is_stroke_affected_by_modifier( + ob, + mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps, + mmd->flag & GP_TINT_INVERT_LAYER, mmd->flag & GP_TINT_INVERT_PASS, + mmd->flag & GP_TINT_INVERT_LAYERPASS)) { return; } diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 92d744dc191..dba4226e4e9 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -1173,7 +1173,7 @@ static void rna_def_ID(BlenderRNA *brna) prop = RNA_def_property(srna, "use_fake_user", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_FAKEUSER); RNA_def_property_ui_text(prop, "Fake User", "Save this data-block even if it has no users"); - RNA_def_property_ui_icon(prop, ICON_FAKE_USER_OFF, true); + RNA_def_property_ui_icon(prop, ICON_FAKE_USER_OFF, true); RNA_def_property_boolean_funcs(prop, NULL, "rna_ID_fake_user_set"); prop = RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 68912a90a2a..f3d3327da78 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -414,7 +414,7 @@ static void rna_def_dopesheet(BlenderRNA *brna) prop = RNA_def_property(srna, "show_cameras", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCAM); RNA_def_property_ui_text(prop, "Display Camera", "Include visualization of camera related animation data"); - RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_CAMERA, 0); + RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_CAMERA, 0); RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); prop = RNA_def_property(srna, "show_materials", PROP_BOOLEAN, PROP_NONE); @@ -486,7 +486,7 @@ static void rna_def_dopesheet(BlenderRNA *brna) prop = RNA_def_property(srna, "show_speakers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSPK); RNA_def_property_ui_text(prop, "Display Speaker", "Include visualization of speaker related animation data"); - RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_SPEAKER, 0); + RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_SPEAKER, 0); RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); prop = RNA_def_property(srna, "show_gpencil", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index e5bb19cdf29..f2df147e90f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -111,10 +111,10 @@ const EnumPropertyItem rna_enum_object_empty_drawtype_items[] = { }; const EnumPropertyItem rna_enum_object_gpencil_type_items[] = { - { GP_EMPTY, "EMPTY", ICON_GP_EMPTY, "Blank", "Create an empty grease pencil object" }, - { GP_STROKE, "STROKE", ICON_GP_STROKE, "Stroke", "Create a simple stroke with basic colors" }, - { GP_MONKEY, "MONKEY", ICON_MONKEY, "Monkey", "Construct a Suzanne grease pencil object" }, - { 0, NULL, 0, NULL, NULL } + {GP_EMPTY, "EMPTY", ICON_GP_EMPTY, "Blank", "Create an empty grease pencil object"}, + {GP_STROKE, "STROKE", ICON_GP_STROKE, "Stroke", "Create a simple stroke with basic colors"}, + {GP_MONKEY, "MONKEY", ICON_MONKEY, "Monkey", "Construct a Suzanne grease pencil object"}, + {0, NULL, 0, NULL, NULL } }; static const EnumPropertyItem parent_type_items[] = { -- cgit v1.2.3