diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-20 03:17:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-20 03:17:44 +0400 |
commit | e7c15beaf68217b2dad2143c17ba88024e3de49f (patch) | |
tree | bd391a09f5d629be2f0ac7ae3163895adf58fa8e /source/blender/editors/gpencil/gpencil_edit.c | |
parent | cb11af8b0651ba0106b5f66f3be061cb8f24154c (diff) |
code cleanup: use booleans for mesh and selection code.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 671adfb8d1e..a4d3c5e1ee5 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1526,7 +1526,7 @@ static int gp_convert_layer_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int gp_convert_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) +static bool gp_convert_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) { const char *prop_id = RNA_property_identifier(prop); int link_strokes = RNA_boolean_get(ptr, "use_link_strokes"); @@ -1542,7 +1542,7 @@ static int gp_convert_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) strcmp(prop_id, "radius_multiplier") == 0 || strcmp(prop_id, "use_link_strokes") == 0) { - return TRUE; + return true; } /* Never show this prop */ @@ -1550,44 +1550,44 @@ static int gp_convert_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) return FALSE; if (link_strokes) { - /* Only show when link_stroke is TRUE */ + /* Only show when link_stroke is true */ if (strcmp(prop_id, "timing_mode") == 0) - return TRUE; + return true; if (timing_mode != GP_STROKECONVERT_TIMING_NONE) { - /* Only show when link_stroke is TRUE and stroke timing is enabled */ + /* Only show when link_stroke is true and stroke timing is enabled */ if (strcmp(prop_id, "frame_range") == 0 || strcmp(prop_id, "start_frame") == 0) { - return TRUE; + return true; } /* Only show if we have valid timing data! */ if (valid_timing && strcmp(prop_id, "use_realtime") == 0) - return TRUE; + return true; /* Only show if realtime or valid_timing is FALSE! */ if ((!realtime || !valid_timing) && strcmp(prop_id, "end_frame") == 0) - return TRUE; + return true; if (valid_timing && timing_mode == GP_STROKECONVERT_TIMING_CUSTOMGAP) { /* Only show for custom gaps! */ if (strcmp(prop_id, "gap_duration") == 0) - return TRUE; + return true; /* Only show randomness for non-null custom gaps! */ if (strcmp(prop_id, "gap_randomness") == 0 && (gap_duration > 0.0f)) - return TRUE; + return true; /* Only show seed for randomize action! */ if (strcmp(prop_id, "seed") == 0 && (gap_duration > 0.0f) && (gap_randomness > 0.0f)) - return TRUE; + return true; } } } /* Else, hidden! */ - return FALSE; + return false; } static void gp_convert_ui(bContext *C, wmOperator *op) |