diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-22 07:11:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-22 07:12:19 +0400 |
commit | c1c26c36f62c3bfdb40b01f33004695a09ce2f4d (patch) | |
tree | 21e738fefe0c7d77af7c1129bcdfef65e1a8f655 /source/blender/editors | |
parent | 5eb96d4705b93a7049ecabd0827e0e58b28a2838 (diff) |
Style Cleanup: remove preprocessor indentation (updated wiki style guide too)
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 8 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 20 | ||||
-rw-r--r-- | source/blender/editors/armature/reeb.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 62 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 11 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_scopes.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawanimviz.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawvolume.c | 13 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 20 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 4 |
16 files changed, 93 insertions, 86 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 338ee646b03..57bf6978174 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -215,10 +215,10 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s sel = ACHANNEL_SETFLAG_CLEAR; break; case ANIMTYPE_OBJECT: - #if 0 /* for now, do not take object selection into account, since it gets too annoying */ +#if 0 /* for now, do not take object selection into account, since it gets too annoying */ if (ale->flag & SELECT) sel = ACHANNEL_SETFLAG_CLEAR; - #endif +#endif break; case ANIMTYPE_GROUP: if (ale->flag & AGRP_SELECTED) @@ -286,7 +286,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s } case ANIMTYPE_OBJECT: { - #if 0 /* for now, do not take object selection into account, since it gets too annoying */ +#if 0 /* for now, do not take object selection into account, since it gets too annoying */ Base *base = (Base *)ale->data; Object *ob = base->object; @@ -296,7 +296,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, short datatype, s if (ob->adt) { ACHANNEL_SET_FLAG(ob, sel, ADT_UI_SELECTED); } - #endif +#endif break; } case ANIMTYPE_GROUP: diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 71717284d8e..65669062667 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -445,9 +445,9 @@ static short ok_bezier_frame(KeyframeEditData *ked, BezTriple *bezt) short ok = 0; /* frame is stored in f1 property (this float accuracy check may need to be dropped?) */ - #define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][0], ked->f1) +#define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][0], ked->f1) KEYFRAME_OK_CHECKS(KEY_CHECK_OK); - #undef KEY_CHECK_OK +#undef KEY_CHECK_OK /* return ok flags */ return ok; @@ -458,9 +458,9 @@ static short ok_bezier_framerange(KeyframeEditData *ked, BezTriple *bezt) short ok = 0; /* frame range is stored in float properties */ - #define KEY_CHECK_OK(_index) ((bezt->vec[_index][0] > ked->f1) && (bezt->vec[_index][0] < ked->f2)) +#define KEY_CHECK_OK(_index) ((bezt->vec[_index][0] > ked->f1) && (bezt->vec[_index][0] < ked->f2)) KEYFRAME_OK_CHECKS(KEY_CHECK_OK); - #undef KEY_CHECK_OK +#undef KEY_CHECK_OK /* return ok flags */ return ok; @@ -485,9 +485,9 @@ static short ok_bezier_value(KeyframeEditData *ked, BezTriple *bezt) * - this float accuracy check may need to be dropped? * - should value be stored in f2 instead so that we won't have conflicts when using f1 for frames too? */ - #define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][1], ked->f1) +#define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][1], ked->f1) KEYFRAME_OK_CHECKS(KEY_CHECK_OK); - #undef KEY_CHECK_OK +#undef KEY_CHECK_OK /* return ok flags */ return ok; @@ -498,9 +498,9 @@ static short ok_bezier_valuerange(KeyframeEditData *ked, BezTriple *bezt) short ok = 0; /* value range is stored in float properties */ - #define KEY_CHECK_OK(_index) ((bezt->vec[_index][1] > ked->f1) && (bezt->vec[_index][1] < ked->f2)) +#define KEY_CHECK_OK(_index) ((bezt->vec[_index][1] > ked->f1) && (bezt->vec[_index][1] < ked->f2)) KEYFRAME_OK_CHECKS(KEY_CHECK_OK); - #undef KEY_CHECK_OK +#undef KEY_CHECK_OK /* return ok flags */ return ok; @@ -512,9 +512,9 @@ static short ok_bezier_region(KeyframeEditData *ked, BezTriple *bezt) if (ked->data) { short ok = 0; - #define KEY_CHECK_OK(_index) BLI_rctf_isect_pt_v(ked->data, bezt->vec[_index]) +#define KEY_CHECK_OK(_index) BLI_rctf_isect_pt_v(ked->data, bezt->vec[_index]) KEYFRAME_OK_CHECKS(KEY_CHECK_OK); - #undef KEY_CHECK_OK +#undef KEY_CHECK_OK /* return ok flags */ return ok; diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 3a09f531d44..d521de54576 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -1789,7 +1789,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) arc = nextArc; } - #endif +#endif return value; } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index f44595d6af6..9ea1d147328 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -5594,7 +5594,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) RNA_string_set(&ptr_props, "doc_new", RNA_property_description(but->rnaprop)); uiItemFullO(layout, "WM_OT_doc_edit", "Submit Description", ICON_NONE, ptr_props.data, WM_OP_INVOKE_DEFAULT, 0); - #endif +#endif } else if (but->optype) { WM_operator_py_idname(buf, but->optype->idname); diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 102bad26e28..64175c133ea 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -228,7 +228,7 @@ static bool knife_verts_edge_in_face(KnifeVert *v1, KnifeVert *v2, BMFace *f); static void knife_update_header(bContext *C, KnifeTool_OpData *kcd) { - #define HEADER_LENGTH 256 +#define HEADER_LENGTH 256 char header[HEADER_LENGTH]; BLI_snprintf(header, HEADER_LENGTH, IFACE_("LMB: define cut lines, Return/Spacebar: confirm, Esc or RMB: cancel, " @@ -238,8 +238,8 @@ static void knife_update_header(bContext *C, KnifeTool_OpData *kcd) WM_bool_as_string(kcd->ignore_edge_snapping), WM_bool_as_string(kcd->angle_snapping), WM_bool_as_string(kcd->cut_through)); - ED_area_headerprint(CTX_wm_area(C), header); +#undef HEADER_LENGTH } static void knife_project_v2(const KnifeTool_OpData *kcd, const float co[3], float sco[2]) diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 8f4454eb2da..78af1bea8bc 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -197,7 +197,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima pool = BKE_image_pool_new(); - #pragma omp parallel for schedule(static) +#pragma omp parallel for schedule(static) for (j = 0; j < size; j++) { int i; float y; @@ -371,7 +371,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) curvemapping_initialize(br->curve); - #pragma omp parallel for schedule(static) +#pragma omp parallel for schedule(static) for (j = 0; j < size; j++) { int i; float y; diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index a116cb59de8..1b6f3509b88 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -111,7 +111,7 @@ static int mask_flood_fill_exec(bContext *C, wmOperator *op) sculpt_undo_push_begin("Mask flood fill"); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (i = 0; i < totnode; i++) { PBVHVertexIter vi; @@ -235,7 +235,7 @@ int do_sculpt_mask_box_select(ViewContext *vc, rcti *rect, bool select, bool UNU BKE_pbvh_search_gather(pbvh, BKE_pbvh_node_planes_contain_AABB, clip_planes_final, &nodes, &totnode); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (i = 0; i < totnode; i++) { PBVHVertexIter vi; bool any_masked = false; @@ -382,7 +382,7 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op) /* gather nodes inside lasso's enclosing rectangle (should greatly help with bigger meshes) */ BKE_pbvh_search_gather(pbvh, BKE_pbvh_node_planes_contain_AABB, clip_planes_final, &nodes, &totnode); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (i = 0; i < totnode; i++) { PBVHVertexIter vi; bool any_masked = false; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 884a09a56e3..0507cfcf37d 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -457,7 +457,7 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob) * entries might be inserted by sculpt_undo_push_node() into the * GHash used internally by BM_log_original_vert_co() by a * different thread. [#33787] */ - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP && !ss->bm) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP && !ss->bm) for (n = 0; n < totnode; n++) { SculptUndoNode *unode; SculptUndoType type = (brush->sculpt_tool == SCULPT_TOOL_MASK ? @@ -1089,7 +1089,7 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod zero_v3(an); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -1130,7 +1130,7 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod BKE_pbvh_vertex_iter_end; } - #pragma omp critical +#pragma omp critical { add_v3_v3(an, private_an); add_v3_v3(out_flip, private_out_flip); @@ -1697,7 +1697,7 @@ static void smooth(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, for (iteration = 0; iteration <= count; ++iteration) { float strength = (iteration != count) ? 1.0f : last; - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { switch (type) { case PBVH_GRIDS: @@ -1733,7 +1733,7 @@ static void do_mask_brush_draw(Sculpt *sd, Object *ob, PBVHNode **nodes, int tot int n; /* threaded loop over nodes */ - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -1786,7 +1786,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) mul_v3_fl(offset, bstrength); /* threaded loop over nodes */ - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -1842,7 +1842,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod if (brush->sculpt_tool == SCULPT_TOOL_BLOB) flippedbstrength *= -1.0f; /* threaded loop over nodes */ - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -1886,7 +1886,7 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode float bstrength = ss->cache->bstrength; int n; - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -1934,7 +1934,7 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) add_v3_v3(grab_delta, ss->cache->sculpt_normal_symm); } - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -1983,7 +1983,7 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode cross_v3_v3v3(tmp, ss->cache->sculpt_normal_symm, grab_delta); cross_v3_v3v3(cono, tmp, ss->cache->sculpt_normal_symm); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2032,7 +2032,7 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to add_v3_v3(grab_delta, ss->cache->sculpt_normal_symm); } - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2073,7 +2073,7 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode cross_v3_v3v3(tmp, ss->cache->sculpt_normal_symm, grab_delta); cross_v3_v3v3(cono, tmp, ss->cache->sculpt_normal_symm); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2117,7 +2117,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod static const int flip[8] = { 1, -1, -1, 1, -1, 1, 1, -1 }; float angle = ss->cache->vertex_rotation * flip[ss->cache->mirror_symmetry_pass]; - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2171,7 +2171,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode mul_v3_v3v3(offset, ss->cache->scale, ss->cache->sculpt_normal_symm); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2182,7 +2182,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode sculpt_orig_vert_data_init(&orig_data, ob, nodes[n]); - #pragma omp critical +#pragma omp critical { layer_disp = BKE_pbvh_node_layer_disp_get(ss->pbvh, nodes[n]); } @@ -2235,7 +2235,7 @@ static void do_inflate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno float bstrength = ss->cache->bstrength; int n; - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2281,7 +2281,7 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to zero_v3(fc); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2347,7 +2347,7 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to BKE_pbvh_vertex_iter_end; } - #pragma omp critical +#pragma omp critical { add_v3_v3(fc, private_fc); add_v3_v3(fc_flip, private_fc_flip); @@ -2388,7 +2388,7 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob, /* for flatten center */ zero_v3(fc); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2464,7 +2464,7 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob, BKE_pbvh_vertex_iter_end; } - #pragma omp critical +#pragma omp critical { /* for area normal */ add_v3_v3(an, private_an); @@ -2640,7 +2640,7 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno mul_v3_fl(temp, displace); add_v3_v3(fc, temp); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2712,7 +2712,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) /* add_v3_v3v3(p, ss->cache->location, an); */ - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2814,7 +2814,7 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t mul_m4_m4m4(tmat, mat, scale); invert_m4_m4(mat, tmat); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2878,7 +2878,7 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) mul_v3_fl(temp, displace); add_v3_v3(fc, temp); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2942,7 +2942,7 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod mul_v3_fl(temp, displace); add_v3_v3(fc, temp); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -2996,7 +2996,7 @@ static void do_gravity(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, fl mul_v3_fl(offset, bstrength); /* threaded loop over nodes */ - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; SculptBrushTest test; @@ -3166,7 +3166,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush) if (totnode) { float location[3]; - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { sculpt_undo_push_node(ob, nodes[n], brush->sculpt_tool == SCULPT_TOOL_MASK ? @@ -3299,7 +3299,7 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob) const bool use_orco = ELEM3(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; PBVHProxyNode *proxies; @@ -3392,7 +3392,7 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob) BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; @@ -4156,7 +4156,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, sculpt_update_brush_delta(ups, ob, brush); if (brush->sculpt_tool == SCULPT_TOOL_ROTATE) { - #define PIXEL_INPUT_THRESHHOLD 5 +#define PIXEL_INPUT_THRESHHOLD 5 const float dx = cache->mouse[0] - cache->initial_mouse[0]; const float dy = cache->mouse[1] - cache->initial_mouse[1]; @@ -4194,7 +4194,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, cache->vertex_rotation = -(mouse_angle + 2.0f * (float)M_PI * cache->num_vertex_turns) * cache->bstrength; - #undef PIXEL_INPUT_THRESHHOLD +#undef PIXEL_INPUT_THRESHHOLD } ups->draw_anchored = true; diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index e011e0f3c77..6fa5c8fbf5a 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -284,17 +284,18 @@ static void sculpt_undo_bmesh_restore_generic(bContext *C, int i, totnode; PBVHNode **nodes; - #ifdef _OPENMP +#ifdef _OPENMP Sculpt *sd = CTX_data_tool_settings(C)->sculpt; - #else +#else (void)C; - #endif +#endif BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (i = 0; i < totnode; i++) +#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) + for (i = 0; i < totnode; i++) { BKE_pbvh_node_mark_redraw(nodes[i]); + } } else { /* A bit lame, but for now just recreate the PBVH. The alternative diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 3d5f6a6ce7e..76305aaabaa 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -169,15 +169,15 @@ void ED_image_draw_info(Scene *scene, ARegion *ar, int color_manage, int use_def float dx = 6; /* text colors */ /* XXX colored text not allowed in Blender UI */ - #if 0 +#if 0 unsigned char red[3] = {255, 50, 50}; unsigned char green[3] = {0, 255, 0}; unsigned char blue[3] = {100, 100, 255}; - #else +#else unsigned char red[3] = {255, 255, 255}; unsigned char green[3] = {255, 255, 255}; unsigned char blue[3] = {255, 255, 255}; - #endif +#endif float hue = 0, sat = 0, val = 0, lum = 0, u = 0, v = 0; float col[4], finalcol[4]; diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 79b50f2d3ae..9199c6de343 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -461,7 +461,7 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf) memset(bins, 0, sizeof(bins)); - #pragma omp parallel for shared(bins, src, ibuf) private(x, y) if (ibuf->y >= 256) +#pragma omp parallel for shared(bins, src, ibuf) private(x, y) if (ibuf->y >= 256) for (y = 0; y < ibuf->y; y++) { unsigned int cur_bins[3][HIS_STEPS]; @@ -475,7 +475,7 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf) cur_bins[2][pixel[2]]++; } - #pragma omp critical +#pragma omp critical { int i; for (i = 0; i < HIS_STEPS; i++) { @@ -538,7 +538,7 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf) memset(bins, 0, sizeof(bins)); - #pragma omp parallel for shared(bins, src, ibuf) private(x, y) if (ibuf->y >= 256) +#pragma omp parallel for shared(bins, src, ibuf) private(x, y) if (ibuf->y >= 256) for (y = 0; y < ibuf->y; y++) { unsigned int cur_bins[3][HIS_STEPS]; @@ -552,7 +552,7 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf) cur_bins[2][get_bin_float(pixel[2])]++; } - #pragma omp critical +#pragma omp critical { int i; for (i = 0; i < HIS_STEPS; i++) { diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c index 902a9976f48..82e85e3a449 100644 --- a/source/blender/editors/space_view3d/drawanimviz.c +++ b/source/blender/editors/space_view3d/drawanimviz.c @@ -147,7 +147,7 @@ void draw_motion_path_instance(Scene *scene, * - black for before current frame, green for current frame, blue for after current frame * - intensity decreases as distance from current frame increases */ - #define SET_INTENSITY(A, B, C, min, max) (((1.0f - ((C - B) / (C - A))) * (max - min)) + min) +#define SET_INTENSITY(A, B, C, min, max) (((1.0f - ((C - B) / (C - A))) * (max - min)) + min) if (frame < CFRA) { /* black - before cfra */ if (sel) { @@ -182,7 +182,8 @@ void draw_motion_path_instance(Scene *scene, } UI_ThemeColorBlendShade(TH_CFRAME, TH_BACK, intensity, 10); } - +#undef SET_INTENSITY + /* draw a vertex with this color */ glVertex3fv(mpv->co); } diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index eb4493a9d1a..32e21a0fbbe 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -244,10 +244,10 @@ void draw_smoke_volume(SmokeDomainSettings *sds, Object *ob, #endif /* generate flame spectrum texture */ - #define SPEC_WIDTH 256 - #define FIRE_THRESH 7 - #define MAX_FIRE_ALPHA 0.06f - #define FULL_ON_FIRE 100 +#define SPEC_WIDTH 256 +#define FIRE_THRESH 7 +#define MAX_FIRE_ALPHA 0.06f +#define FULL_ON_FIRE 100 spec_data = malloc(SPEC_WIDTH * 4 * sizeof(unsigned char)); flame_get_spectrum(spec_data, SPEC_WIDTH, 1500, 3000); spec_pixels = malloc(SPEC_WIDTH * 4 * 16 * 16 * sizeof(float)); @@ -271,6 +271,11 @@ void draw_smoke_volume(SmokeDomainSettings *sds, Object *ob, tex_spec = GPU_texture_create_1D(SPEC_WIDTH, spec_pixels, NULL); +#undef SPEC_WIDTH +#undef FIRE_THRESH +#undef MAX_FIRE_ALPHA +#undef FULL_ON_FIRE + sub_v3_v3v3(size, max, min); /* maxx, maxy, maxz */ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 36c6df75461..ab9a222b96a 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3440,14 +3440,14 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) rv3d->lpersp = rv3d->persp; } - #if 0 +#if 0 if (G.qual == LR_ALTKEY) { if (oldcamera && is_an_active_object(oldcamera)) { v3d->camera = oldcamera; } handle_view3d_lock(); } - #endif +#endif /* first get the default camera for the view lock type */ if (v3d->scenelock) { diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index e5c3510db4b..34c44185026 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -52,24 +52,24 @@ /* Utils */ #if 0 - #define param_assert(condition) - #define param_warning(message) - #define param_test_equals_ptr(condition) - #define param_test_equals_int(condition) +# define param_assert(condition) +# define param_warning(message) +# define param_test_equals_ptr(condition) +# define param_test_equals_int(condition) #else - #define param_assert(condition) \ +# define param_assert(condition) \ if (!(condition)) \ { /*printf("Assertion %s:%d\n", __FILE__, __LINE__); abort();*/ } (void)0 - #define param_warning(message) \ +# define param_warning(message) \ { /*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/ } (void)0 -#if 0 - #define param_test_equals_ptr(str, a, b) \ +# if 0 +# define param_test_equals_ptr(str, a, b) \ if (a != b) \ { /*printf("Equals %s => %p != %p\n", str, a, b);*/ } (void)0 - #define param_test_equals_int(str, a, b) \ +# define param_test_equals_int(str, a, b) \ if (a != b) \ { /*printf("Equals %s => %d != %d\n", str, a, b);*/ } (void)0 -#endif +# endif #endif typedef enum PBool { P_TRUE = 1, diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 60747450661..c931c843a23 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1529,11 +1529,11 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); UI_ThemeColor4(TH_STITCH_PREVIEW_EDGE); glDrawArrays(GL_POLYGON, index, stitch_preview->uvs_per_polygon[i]); - #if 0 +#if 0 glPolygonMode(GL_FRONT_AND_BACK, GL_POINT); UI_ThemeColor4(TH_STITCH_PREVIEW_VERT); glDrawArrays(GL_POLYGON, index, stitch_preview->uvs_per_polygon[i]); - #endif +#endif index += stitch_preview->uvs_per_polygon[i]; } |