diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-01 04:34:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-01 08:22:28 +0400 |
commit | 617557b08ea94e2b65a1697ddf0b79651204d92b (patch) | |
tree | 50b24bab075b42fa20456140c9a9681cfb01325b /source/blender/editors/gpencil | |
parent | 2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff) |
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_buttons.c | 36 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 16 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 18 |
4 files changed, 36 insertions, 36 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index c10f081b4fa..a4597b6bf6c 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -782,7 +782,7 @@ void draw_gpencil_view3d(Scene *scene, View3D *v3d, ARegion *ar, bool only3d) * deal with the camera border, otherwise map the coords to the camera border. */ if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) { rctf rectf; - ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, TRUE); /* no shift */ + ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, true); /* no shift */ offsx = iroundf(rectf.xmin); offsy = iroundf(rectf.ymin); diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 5f829a1cb27..481323992d0 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -134,14 +134,14 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* get layout-row + UI-block for header */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_EXPAND); block = uiLayoutGetBlock(row); /* err... */ uiBlockSetEmboss(block, UI_EMBOSSN); /* left-align ............................... */ - sub = uiLayoutRow(row, FALSE); + sub = uiLayoutRow(row, false); /* active */ block = uiLayoutGetBlock(sub); @@ -172,7 +172,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* delete button (only if hidden but not locked!) */ if ((gpl->flag & GP_LAYER_HIDE) && !(gpl->flag & GP_LAYER_LOCKED)) { /* right-align ............................... */ - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT); block = uiLayoutGetBlock(sub); /* XXX... err... */ @@ -216,7 +216,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* delete 'button' */ uiBlockSetEmboss(block, UI_EMBOSSN); /* right-align ............................... */ - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT); block = uiLayoutGetBlock(sub); /* XXX... err... */ @@ -227,14 +227,14 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* new backdrop ----------------------------------- */ box = uiLayoutBox(layout); - split = uiLayoutSplit(box, 0.5f, FALSE); + split = uiLayoutSplit(box, 0.5f, false); /* draw settings ---------------------------------- */ /* left column ..................... */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); /* color */ - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiItemR(sub, &ptr, "color", 0, "", ICON_NONE); uiItemR(sub, &ptr, "alpha", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -247,10 +247,10 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons } /* right column ................... */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); /* onion-skinning */ - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiItemR(sub, &ptr, "use_onion_skinning", 0, NULL, ICON_NONE); uiItemR(sub, &ptr, "ghost_range_max", 0, IFACE_("Frames"), ICON_NONE); @@ -273,14 +273,14 @@ static void draw_gpencil_space_specials(const bContext *C, uiLayout *layout) uiLayout *col, *row; SpaceClip *sc = CTX_wm_space_clip(C); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); if (sc) { bScreen *screen = CTX_wm_screen(C); PointerRNA sc_ptr; RNA_pointer_create(&screen->id, &RNA_SpaceClipEditor, sc, &sc_ptr); - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemR(row, &sc_ptr, "grease_pencil_source", UI_ITEM_R_EXPAND, NULL, ICON_NONE); } } @@ -299,7 +299,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin RNA_id_pointer_create((ID *)gpd, &gpd_ptr); /* draw gpd settings first ------------------------------------- */ - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); /* current Grease Pencil block */ /* TODO: show some info about who owns this? */ @@ -307,7 +307,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin /* add new layer button - can be used even when no data, since it can add a new block too */ uiItemO(col, IFACE_("New Layer"), ICON_NONE, "GPENCIL_OT_layer_add"); - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemO(row, IFACE_("Delete Frame"), ICON_NONE, "GPENCIL_OT_active_frame_delete"); uiItemO(row, IFACE_("Convert"), ICON_NONE, "GPENCIL_OT_convert"); @@ -317,12 +317,12 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin /* draw each layer --------------------------------------------- */ for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); gp_drawui_layer(col, gpd, gpl, is_v3d); } /* draw gpd drawing settings first ------------------------------------- */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); /* label */ uiItemL(col, IFACE_("Drawing Settings:"), ICON_NONE); @@ -335,17 +335,17 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin } /* drawing space options */ - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "VIEW", NULL, ICON_NONE); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "CURSOR", NULL, ICON_NONE); if (sc == NULL) { - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiLayoutSetActive(row, v3d_stroke_opts); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "SURFACE", NULL, ICON_NONE); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "STROKE", NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiLayoutSetActive(row, v3d_stroke_opts == STROKE_OPTS_V3D_ON); uiItemR(row, &gpd_ptr, "use_stroke_endpoints", 0, NULL, ICON_NONE); } diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 94400682f9e..092951be3da 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -757,8 +757,8 @@ static void gp_stroke_path_animation(bContext *C, ReportList *reports, Curve *cu prop = RNA_struct_find_property(&ptr, "eval_time"); /* Ensure we have an F-Curve to add keyframes to */ - act = verify_adt_action((ID *)cu, TRUE); - fcu = verify_fcurve(act, NULL, &ptr, "eval_time", 0, TRUE); + act = verify_adt_action((ID *)cu, true); + fcu = verify_fcurve(act, NULL, &ptr, "eval_time", 0, true); if (G.debug & G_DEBUG) { printf("%s: tot len: %f\t\ttot time: %f\n", __func__, gtd->tot_dist, gtd->tot_time); @@ -1392,7 +1392,7 @@ static int gp_camera_view_subrect(bContext *C, rctf *subrect) /* for camera view set the subrect */ if (rv3d->persp == RV3D_CAMOB) { Scene *scene = CTX_data_scene(C); - ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, subrect, TRUE); /* no shift */ + ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, subrect, true); /* no shift */ return 1; } } @@ -1673,7 +1673,7 @@ static bool gp_convert_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) /* Never show this prop */ if (strcmp(prop_id, "use_timing_data") == 0) - return FALSE; + return false; if (link_strokes) { /* Only show when link_stroke is true */ @@ -1749,11 +1749,11 @@ void GPENCIL_OT_convert(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", prop_gpencil_convertmodes, 0, "Type", "Which type of curve to convert to"); - RNA_def_boolean(ot->srna, "use_normalize_weights", TRUE, "Normalize Weight", + RNA_def_boolean(ot->srna, "use_normalize_weights", true, "Normalize Weight", "Normalize weight (set from stroke width)"); RNA_def_float(ot->srna, "radius_multiplier", 1.0f, 0.0f, 1000.0f, "Radius Fac", "Multiplier for the points' radii (set from stroke width)", 0.0f, 10.0f); - RNA_def_boolean(ot->srna, "use_link_strokes", TRUE, "Link Strokes", + RNA_def_boolean(ot->srna, "use_link_strokes", true, "Link Strokes", "Whether to link strokes with zero-radius sections of curves"); prop = RNA_def_enum(ot->srna, "timing_mode", prop_gpencil_convert_timingmodes, GP_STROKECONVERT_TIMING_FULL, @@ -1764,7 +1764,7 @@ void GPENCIL_OT_convert(wmOperatorType *ot) "The duration of evaluation of the path control curve", 1, 1000); RNA_def_int(ot->srna, "start_frame", 1, 1, 100000, "Start Frame", "The start frame of the path control curve", 1, 100000); - RNA_def_boolean(ot->srna, "use_realtime", FALSE, "Realtime", + RNA_def_boolean(ot->srna, "use_realtime", false, "Realtime", "Whether the path control curve reproduces the drawing in realtime, starting from Start Frame"); prop = RNA_def_int(ot->srna, "end_frame", 250, 1, 100000, "End Frame", "The end frame of the path control curve (if Realtime is not set)", 1, 100000); @@ -1779,7 +1779,7 @@ void GPENCIL_OT_convert(wmOperatorType *ot) "Custom Gap mode: Random generator seed", 0, 100); /* Note: Internal use, this one will always be hidden by UI code... */ - prop = RNA_def_boolean(ot->srna, "use_timing_data", FALSE, "Has Valid Timing", + prop = RNA_def_boolean(ot->srna, "use_timing_data", false, "Has Valid Timing", "Whether the converted Grease Pencil layer has valid timing data (internal use)"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 05d56458a3f..65f205c2f2f 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -668,16 +668,16 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) 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))) { - interp_depth = TRUE; + interp_depth = true; } else { - found_depth = TRUE; + found_depth = true; } copy_v2_v2_int(mval_prev, mval); } - if (found_depth == FALSE) { + if (found_depth == false) { /* eeh... not much we can do.. :/, ignore depth in this case, use the 3D cursor */ for (i = gpd->sbuffer_size - 1; i >= 0; i--) depth_arr[i] = 0.9999f; @@ -704,7 +704,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) for (i = first_valid + 1; i < last_valid; i++) depth_arr[i] = FLT_MAX; - interp_depth = TRUE; + interp_depth = true; } if (interp_depth) { @@ -886,11 +886,11 @@ static short gp_stroke_eraser_strokeinside(const int mval[2], const int UNUSED(m const float screen_co_b[2] = {x1, y1}; if (edge_inside_circle(mval_fl, rad, screen_co_a, screen_co_b)) { - return TRUE; + return true; } /* not inside */ - return FALSE; + return false; } static void gp_point_to_xy(ARegion *ar, View2D *v2d, rctf *subrect, bGPDstroke *gps, bGPDspoint *pt, @@ -1280,7 +1280,7 @@ static void gp_paint_initstroke(tGPsdata *p, short paintmode) /* for camera view set the subrect */ if (rv3d->persp == RV3D_CAMOB) { - ED_view3d_calc_camera_border(p->scene, p->ar, v3d, rv3d, &p->subrect_data, TRUE); /* no shift */ + ED_view3d_calc_camera_border(p->scene, p->ar, v3d, rv3d, &p->subrect_data, true); /* no shift */ p->subrect = &p->subrect_data; } } @@ -1438,7 +1438,7 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op) /* check size of buffer before cleanup, to determine if anything happened here */ if (p->paintmode == GP_PAINTMODE_ERASER) { /* turn off radial brush cursor */ - gpencil_draw_toggle_eraser_cursor(C, p, FALSE); + gpencil_draw_toggle_eraser_cursor(C, p, false); /* if successful, store the new eraser size to be used again next time */ if (p->status == GP_STATUS_DONE) @@ -1758,7 +1758,7 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event /* if eraser is on, draw radial aid */ if (p->paintmode == GP_PAINTMODE_ERASER) { - gpencil_draw_toggle_eraser_cursor(C, p, TRUE); + gpencil_draw_toggle_eraser_cursor(C, p, true); } /* set cursor */ |