From 617557b08ea94e2b65a1697ddf0b79651204d92b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Apr 2014 11:34:00 +1100 Subject: Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define --- source/blender/makesrna/intern/makesrna.c | 16 ++++----- source/blender/makesrna/intern/rna_ID.c | 4 +-- source/blender/makesrna/intern/rna_access.c | 8 ++--- source/blender/makesrna/intern/rna_action.c | 4 +-- source/blender/makesrna/intern/rna_animation.c | 2 +- source/blender/makesrna/intern/rna_armature_api.c | 2 +- source/blender/makesrna/intern/rna_color.c | 10 +++--- source/blender/makesrna/intern/rna_curve.c | 2 +- source/blender/makesrna/intern/rna_define.c | 10 +++--- source/blender/makesrna/intern/rna_dynamicpaint.c | 4 +-- source/blender/makesrna/intern/rna_fcurve.c | 4 +-- source/blender/makesrna/intern/rna_image.c | 2 +- source/blender/makesrna/intern/rna_linestyle.c | 34 +++++++++---------- source/blender/makesrna/intern/rna_main.c | 2 +- source/blender/makesrna/intern/rna_main_api.c | 2 +- source/blender/makesrna/intern/rna_mask.c | 2 +- source/blender/makesrna/intern/rna_meta.c | 2 +- source/blender/makesrna/intern/rna_nodetree.c | 40 +++++++++++------------ source/blender/makesrna/intern/rna_object.c | 8 ++--- source/blender/makesrna/intern/rna_object_api.c | 4 +-- source/blender/makesrna/intern/rna_pose.c | 8 ++--- source/blender/makesrna/intern/rna_rigidbody.c | 4 +-- source/blender/makesrna/intern/rna_rna.c | 16 ++++----- source/blender/makesrna/intern/rna_scene.c | 6 ++-- source/blender/makesrna/intern/rna_scene_api.c | 4 +-- source/blender/makesrna/intern/rna_screen.c | 2 +- source/blender/makesrna/intern/rna_sequencer.c | 4 +-- source/blender/makesrna/intern/rna_space.c | 10 +++--- source/blender/makesrna/intern/rna_tracking.c | 6 ++-- source/blender/makesrna/intern/rna_ui.c | 8 ++--- source/blender/makesrna/intern/rna_userdef.c | 4 +-- source/blender/makesrna/intern/rna_vfont.c | 4 +-- source/blender/makesrna/intern/rna_wm.c | 8 ++--- source/blender/makesrna/intern/rna_wm_api.c | 6 ++-- 34 files changed, 126 insertions(+), 126 deletions(-) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index f1ecb8ddf1e..189e75935d1 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1768,12 +1768,12 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property if (cprop->item_type) fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s, %s, %s, %s, %s)", collection_funcs, (const char *)cprop->item_type, srna->identifier, - rna_safe_id(prop->identifier), (cprop->length ? "TRUE" : "FALSE"), - (cprop->lookupint ? "TRUE" : "FALSE"), (cprop->lookupstring ? "TRUE" : "FALSE")); + rna_safe_id(prop->identifier), (cprop->length ? "true" : "false"), + (cprop->lookupint ? "true" : "false"), (cprop->lookupstring ? "true" : "false")); else fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s, %s, %s, %s, %s)", collection_funcs, "UnknownType", srna->identifier, - rna_safe_id(prop->identifier), (cprop->length ? "TRUE" : "FALSE"), - (cprop->lookupint ? "TRUE" : "FALSE"), (cprop->lookupstring ? "TRUE" : "FALSE")); + rna_safe_id(prop->identifier), (cprop->length ? "true" : "false"), + (cprop->lookupint ? "true" : "false"), (cprop->lookupstring ? "true" : "false")); break; } } @@ -1949,12 +1949,12 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe if (cprop->type) fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s, %s, %s, %s)", (const char *)cprop->type, srna->identifier, - prop->identifier, (cprop->length ? "TRUE" : "FALSE"), - (cprop->lookupint ? "TRUE" : "FALSE"), (cprop->lookupstring ? "TRUE" : "FALSE")); + prop->identifier, (cprop->length ? "true" : "false"), + (cprop->lookupint ? "true" : "false"), (cprop->lookupstring ? "true" : "false")); else fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s, %s, %s, %s)", "UnknownType", srna->identifier, - prop->identifier, (cprop->length ? "TRUE" : "FALSE"), - (cprop->lookupint ? "TRUE" : "FALSE"), (cprop->lookupstring ? "TRUE" : "FALSE")); + prop->identifier, (cprop->length ? "true" : "false"), + (cprop->lookupint ? "true" : "false"), (cprop->lookupstring ? "true" : "false")); #endif break; } diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index c5af85a45fa..7959e60da33 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -115,10 +115,10 @@ static int rna_ID_name_editable(PointerRNA *ptr) if (GS(id->name) == ID_VF) { VFont *vfont = (VFont *)id; if (BKE_vfont_is_builtin(vfont)) - return FALSE; + return false; } - return TRUE; + return true; } short RNA_type_to_ID_code(StructRNA *type) diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 43de4b374b4..ae8280e9ec4 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4414,7 +4414,7 @@ static char *rna_path_from_ID_to_idpgroup(PointerRNA *ptr) * of an armature or object */ RNA_id_pointer_create(ptr->id.data, &id_ptr); - haystack = RNA_struct_idprops(&id_ptr, FALSE); + haystack = RNA_struct_idprops(&id_ptr, false); if (haystack) { /* can fail when called on bones */ needle = ptr->data; return rna_idp_path(&id_ptr, haystack, needle, NULL); @@ -4568,7 +4568,7 @@ char *RNA_path_full_property_py(PointerRNA *ptr, PropertyRNA *prop, int index) data_path = RNA_path_from_ID_to_property(ptr, prop); - if ((index == -1) || (RNA_property_array_check(prop) == FALSE)) { + if ((index == -1) || (RNA_property_array_check(prop) == false)) { ret = BLI_sprintfN("%s.%s", id_path, data_path); } @@ -4610,7 +4610,7 @@ char *RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index) } } - if ((index == -1) || (RNA_property_array_check(prop) == FALSE)) { + if ((index == -1) || (RNA_property_array_check(prop) == false)) { ret = BLI_sprintfN("%s", data_path); } @@ -4634,7 +4634,7 @@ char *RNA_path_property_py(PointerRNA *UNUSED(ptr), PropertyRNA *prop, int index { char *ret; - if ((index == -1) || (RNA_property_array_check(prop) == FALSE)) { + if ((index == -1) || (RNA_property_array_check(prop) == false)) { ret = BLI_sprintfN("%s", RNA_property_identifier(prop)); } diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 0f39846aa97..de12839dc01 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -80,7 +80,7 @@ static void rna_Action_groups_remove(bAction *act, ReportList *reports, PointerR FCurve *fcu, *fcn; /* try to remove the F-Curve from the action */ - if (BLI_remlink_safe(&act->groups, agrp) == FALSE) { + if (BLI_remlink_safe(&act->groups, agrp) == false) { BKE_reportf(reports, RPT_ERROR, "Action group '%s' not found in action '%s'", agrp->name, act->id.name + 2); return; } @@ -205,7 +205,7 @@ static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, static void rna_Action_frame_range_get(PointerRNA *ptr, float *values) { /* don't include modifiers because they too easily can have very large * ranges: MINAFRAMEF to MAXFRAMEF. */ - calc_action_range(ptr->id.data, values, values + 1, FALSE); + calc_action_range(ptr->id.data, values, values + 1, false); } diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 18c3f107876..f2881bf2541 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -460,7 +460,7 @@ static void rna_KeyingSet_paths_remove(KeyingSet *keyingset, ReportList *reports KS_Path *ksp = ksp_ptr->data; /* if data is valid, call the API function for this */ - if ((keyingset && ksp) == FALSE) { + if ((keyingset && ksp) == false) { BKE_report(reports, RPT_ERROR, "Keying set path could not be removed"); return; } diff --git a/source/blender/makesrna/intern/rna_armature_api.c b/source/blender/makesrna/intern/rna_armature_api.c index 96c5350e5b7..1a4a9492543 100644 --- a/source/blender/makesrna/intern/rna_armature_api.c +++ b/source/blender/makesrna/intern/rna_armature_api.c @@ -46,7 +46,7 @@ static void rna_EditBone_align_roll(EditBone *ebo, float no[3]) { - ebo->roll = ED_rollBoneToVector(ebo, no, FALSE); + ebo->roll = ED_rollBoneToVector(ebo, no, false); } static float rna_Bone_do_envelope(Bone *bone, float *vec) diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index a55be8e285f..df9a08480cb 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -90,7 +90,7 @@ static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value) if (value) cumap->flag |= CUMA_DO_CLIP; else cumap->flag &= ~CUMA_DO_CLIP; - curvemapping_changed(cumap, FALSE); + curvemapping_changed(cumap, false); } static void rna_CurveMapping_black_level_set(PointerRNA *ptr, const float *values) @@ -370,7 +370,7 @@ static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *repo { CBData *element = element_ptr->data; int index = (int)(element - coba->data); - if (colorband_element_remove(coba, index) == FALSE) { + if (colorband_element_remove(coba, index) == false) { BKE_report(reports, RPT_ERROR, "Element not found in element collection or last element"); return; } @@ -381,7 +381,7 @@ static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *repo void rna_CurveMap_remove_point(CurveMap *cuma, ReportList *reports, PointerRNA *point_ptr) { CurveMapPoint *point = point_ptr->data; - if (curvemap_remove_point(cuma, point) == FALSE) { + if (curvemap_remove_point(cuma, point) == false) { BKE_report(reports, RPT_ERROR, "Unable to remove curve point"); return; } @@ -596,13 +596,13 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain) if (scene->ed) { ColorManagedColorspaceSettings *colorspace_settings = (ColorManagedColorspaceSettings *) ptr->data; Sequence *seq; - int seq_found = FALSE; + bool seq_found = false; if (&scene->sequencer_colorspace_settings != colorspace_settings) { SEQ_BEGIN(scene->ed, seq); { if (seq->strip && &seq->strip->colorspace_settings == colorspace_settings) { - seq_found = TRUE; + seq_found = true; break; } } diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 43e50ed6c3d..f720a695ef1 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -628,7 +628,7 @@ static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, PointerRNA * Nurb *nu = nu_ptr->data; ListBase *nurbs = BKE_curve_nurbs_get(cu); - if (BLI_remlink_safe(nurbs, nu) == FALSE) { + if (BLI_remlink_safe(nurbs, nu) == false) { BKE_reportf(reports, RPT_ERROR, "Curve '%s' does not contain spline given", cu->id.name + 2); return; } diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index ce55a452d3e..7c6198d2c05 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -382,7 +382,7 @@ static int rna_find_sdna_member(SDNA *sdna, const char *structname, const char * return 0; } -static int rna_validate_identifier(const char *identifier, char *error, int property) +static int rna_validate_identifier(const char *identifier, char *error, bool property) { int a = 0; @@ -706,7 +706,7 @@ StructRNA *RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRN if (DefRNA.preprocess) { char error[512]; - if (rna_validate_identifier(identifier, error, FALSE) == 0) { + if (rna_validate_identifier(identifier, error, false) == 0) { fprintf(stderr, "%s: struct identifier \"%s\" error - %s\n", __func__, identifier, error); DefRNA.error = 1; } @@ -1000,7 +1000,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier if (DefRNA.preprocess) { char error[512]; - if (rna_validate_identifier(identifier, error, TRUE) == 0) { + if (rna_validate_identifier(identifier, error, true) == 0) { fprintf(stderr, "%s: property identifier \"%s.%s\" - %s\n", __func__, CONTAINER_RNA_ID(cont), identifier, error); DefRNA.error = 1; @@ -1020,7 +1020,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier else { #ifdef DEBUG char error[512]; - if (rna_validate_identifier(identifier, error, TRUE) == 0) { + if (rna_validate_identifier(identifier, error, true) == 0) { fprintf(stderr, "%s: runtime property identifier \"%s.%s\" - %s\n", __func__, CONTAINER_RNA_ID(cont), identifier, error); DefRNA.error = 1; @@ -2990,7 +2990,7 @@ static FunctionRNA *rna_def_function(StructRNA *srna, const char *identifier) if (DefRNA.preprocess) { char error[512]; - if (rna_validate_identifier(identifier, error, FALSE) == 0) { + if (rna_validate_identifier(identifier, error, false) == 0) { fprintf(stderr, "%s: function identifier \"%s\" - %s\n", __func__, identifier, error); DefRNA.error = 1; } diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index f37925a6ff5..4288bf2dddb 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -736,12 +736,12 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); /* whether this surface has preview data for 3D view */ - RNA_define_verify_sdna(FALSE); + RNA_define_verify_sdna(false); prop = RNA_def_property(srna, "use_color_preview", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_DynamicPaint_use_color_preview_get", NULL); RNA_def_property_ui_text(prop, "Use Color Preview", "Whether this surface has some color preview for 3D view"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); - RNA_define_verify_sdna(TRUE); + RNA_define_verify_sdna(true); } static void rna_def_dynamic_paint_canvas_settings(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index eca50b84d25..55e60047194 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -440,7 +440,7 @@ static void rna_FCurve_group_set(PointerRNA *ptr, PointerRNA value) /* calculate time extents of F-Curve */ static void rna_FCurve_range(FCurve *fcu, float range[2]) { - calc_fcurve_range(fcu, range, range + 1, FALSE, FALSE); + calc_fcurve_range(fcu, range, range + 1, false, false); } @@ -448,7 +448,7 @@ static void rna_FCurve_range(FCurve *fcu, float range[2]) static void rna_FCurve_update_data_ex(FCurve *fcu) { sort_time_fcurve(fcu); - testhandles_fcurve(fcu, TRUE); + testhandles_fcurve(fcu, true); } /* RNA update callback for F-Curves after curve shape changes */ diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 99f427a9ab6..0b129bab524 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -388,7 +388,7 @@ static int rna_Image_is_float_get(PointerRNA *ptr) Image *im = (Image *)ptr->data; ImBuf *ibuf; void *lock; - int is_float = FALSE; + bool is_float = false; ibuf = BKE_image_acquire_ibuf(im, NULL, &lock); if (ibuf) diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index 81387bdd1c3..0619bb0352a 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -310,25 +310,25 @@ static void rna_def_modifier_type_common(StructRNA *srna, EnumPropertyItem *modi static void rna_def_color_modifier(StructRNA *srna) { rna_def_modifier_type_common(srna, linestyle_color_modifier_type_items, - "rna_LineStyleColorModifier_name_set", TRUE, TRUE); + "rna_LineStyleColorModifier_name_set", true, true); } static void rna_def_alpha_modifier(StructRNA *srna) { rna_def_modifier_type_common(srna, linestyle_alpha_modifier_type_items, - "rna_LineStyleAlphaModifier_name_set", TRUE, FALSE); + "rna_LineStyleAlphaModifier_name_set", true, false); } static void rna_def_thickness_modifier(StructRNA *srna) { rna_def_modifier_type_common(srna, linestyle_thickness_modifier_type_items, - "rna_LineStyleThicknessModifier_name_set", TRUE, FALSE); + "rna_LineStyleThicknessModifier_name_set", true, false); } static void rna_def_geometry_modifier(StructRNA *srna) { rna_def_modifier_type_common(srna, linestyle_geometry_modifier_type_items, - "rna_LineStyleGeometryModifier_name_set", FALSE, FALSE); + "rna_LineStyleGeometryModifier_name_set", false, false); } static void rna_def_modifier_color_ramp_common(StructRNA *srna, int range) @@ -354,7 +354,7 @@ static void rna_def_modifier_color_ramp_common(StructRNA *srna, int range) } } -static void rna_def_modifier_curve_common(StructRNA *srna, int range, int value) +static void rna_def_modifier_curve_common(StructRNA *srna, bool range, bool value) { PropertyRNA *prop; @@ -467,17 +467,17 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) srna = RNA_def_struct(brna, "LineStyleColorModifier_AlongStroke", "LineStyleColorModifier"); RNA_def_struct_ui_text(srna, "Along Stroke", "Change line color along stroke"); rna_def_color_modifier(srna); - rna_def_modifier_color_ramp_common(srna, FALSE); + rna_def_modifier_color_ramp_common(srna, false); srna = RNA_def_struct(brna, "LineStyleColorModifier_DistanceFromCamera", "LineStyleColorModifier"); RNA_def_struct_ui_text(srna, "Distance from Camera", "Change line color based on the distance from the camera"); rna_def_color_modifier(srna); - rna_def_modifier_color_ramp_common(srna, TRUE); + rna_def_modifier_color_ramp_common(srna, true); srna = RNA_def_struct(brna, "LineStyleColorModifier_DistanceFromObject", "LineStyleColorModifier"); RNA_def_struct_ui_text(srna, "Distance from Object", "Change line color based on the distance from an object"); rna_def_color_modifier(srna); - rna_def_modifier_color_ramp_common(srna, TRUE); + rna_def_modifier_color_ramp_common(srna, true); prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "target"); @@ -490,7 +490,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Material", "Change line color based on a material attribute"); rna_def_color_modifier(srna); rna_def_modifier_material_common(srna); - rna_def_modifier_color_ramp_common(srna, FALSE); + rna_def_modifier_color_ramp_common(srna, false); prop = RNA_def_property(srna, "use_ramp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_MODIFIER_USE_RAMP); @@ -508,19 +508,19 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) srna = RNA_def_struct(brna, "LineStyleAlphaModifier_AlongStroke", "LineStyleAlphaModifier"); RNA_def_struct_ui_text(srna, "Along Stroke", "Change alpha transparency along stroke"); rna_def_alpha_modifier(srna); - rna_def_modifier_curve_common(srna, FALSE, FALSE); + rna_def_modifier_curve_common(srna, false, false); srna = RNA_def_struct(brna, "LineStyleAlphaModifier_DistanceFromCamera", "LineStyleAlphaModifier"); RNA_def_struct_ui_text(srna, "Distance from Camera", "Change alpha transparency based on the distance from the camera"); rna_def_alpha_modifier(srna); - rna_def_modifier_curve_common(srna, TRUE, FALSE); + rna_def_modifier_curve_common(srna, true, false); srna = RNA_def_struct(brna, "LineStyleAlphaModifier_DistanceFromObject", "LineStyleAlphaModifier"); RNA_def_struct_ui_text(srna, "Distance from Object", "Change alpha transparency based on the distance from an object"); rna_def_alpha_modifier(srna); - rna_def_modifier_curve_common(srna, TRUE, FALSE); + rna_def_modifier_curve_common(srna, true, false); prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "target"); @@ -533,7 +533,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Material", "Change alpha transparency based on a material attribute"); rna_def_alpha_modifier(srna); rna_def_modifier_material_common(srna); - rna_def_modifier_curve_common(srna, FALSE, FALSE); + rna_def_modifier_curve_common(srna, false, false); /* line thickness modifiers */ @@ -546,17 +546,17 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) srna = RNA_def_struct(brna, "LineStyleThicknessModifier_AlongStroke", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Along Stroke", "Change line thickness along stroke"); rna_def_thickness_modifier(srna); - rna_def_modifier_curve_common(srna, FALSE, TRUE); + rna_def_modifier_curve_common(srna, false, true); srna = RNA_def_struct(brna, "LineStyleThicknessModifier_DistanceFromCamera", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Distance from Camera", "Change line thickness based on the distance from the camera"); rna_def_thickness_modifier(srna); - rna_def_modifier_curve_common(srna, TRUE, TRUE); + rna_def_modifier_curve_common(srna, true, true); srna = RNA_def_struct(brna, "LineStyleThicknessModifier_DistanceFromObject", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Distance from Object", "Change line thickness based on the distance from an object"); rna_def_thickness_modifier(srna); - rna_def_modifier_curve_common(srna, TRUE, TRUE); + rna_def_modifier_curve_common(srna, true, true); prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "target"); @@ -569,7 +569,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Material", "Change line thickness based on a material attribute"); rna_def_thickness_modifier(srna); rna_def_modifier_material_common(srna); - rna_def_modifier_curve_common(srna, FALSE, TRUE); + rna_def_modifier_curve_common(srna, false, true); srna = RNA_def_struct(brna, "LineStyleThicknessModifier_Calligraphy", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Calligraphy", diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index b7b793ebeaf..f163808c61b 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -72,7 +72,7 @@ static int rna_Main_is_dirty_get(PointerRNA *ptr) return !wm->file_saved; } - return TRUE; + return true; } static void rna_Main_filepath_get(PointerRNA *ptr, char *value) diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 5fedc233ff9..f7080375902 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -310,7 +310,7 @@ Mesh *rna_Main_meshes_new_from_object( int uv_from_orco; /* copies object and modifiers (but not the data) */ - tmpobj = BKE_object_copy_ex(bmain, ob, TRUE); + tmpobj = BKE_object_copy_ex(bmain, ob, true); tmpcu = (Curve *)tmpobj->data; tmpcu->id.us--; diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index eb94da6c87b..afd149a755a 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -440,7 +440,7 @@ static void rna_MaskLayer_spline_remove(ID *id, MaskLayer *mask_layer, ReportLis Mask *mask = (Mask *) id; MaskSpline *spline = spline_ptr->data; - if (BKE_mask_spline_remove(mask_layer, spline) == FALSE) { + if (BKE_mask_spline_remove(mask_layer, spline) == false) { BKE_reportf(reports, RPT_ERROR, "Mask layer '%s' does not contain spline given", mask_layer->name); return; } diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 2627e628538..5f4a7706c0e 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -132,7 +132,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Poin { MetaElem *ml = ml_ptr->data; - if (BLI_remlink_safe(&mb->elems, ml) == FALSE) { + if (BLI_remlink_safe(&mb->elems, ml) == false) { BKE_reportf(reports, RPT_ERROR, "Metaball '%s' does not contain spline given", mb->id.name + 2); return; } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index c6fa87c7d96..0664ecf0d34 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1393,7 +1393,7 @@ static bNodeType *rna_Node_register_base(Main *bmain, ReportList *reports, Struc func = RNA_def_function_runtime(nt->ext.srna, "is_registered_node_type", rna_Node_is_registered_node_type_runtime); RNA_def_function_ui_description(func, "True if a registered node type"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_SELF_TYPE); - parm = RNA_def_boolean(func, "result", FALSE, "Result", ""); + parm = RNA_def_boolean(func, "result", false, "Result", ""); RNA_def_function_return(func, parm); /* XXX bad level call! needed to initialize the basic draw functions ... */ @@ -1532,13 +1532,13 @@ static int rna_Node_parent_poll(PointerRNA *ptr, PointerRNA value) * in the future should have a poll function or so to test possible attachment. */ if (parent->type != NODE_FRAME) - return FALSE; + return false; /* make sure parent is not attached to the node */ if (nodeAttachNodeCheck(parent, node)) - return FALSE; + return false; - return TRUE; + return true; } static void rna_Node_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -2414,7 +2414,7 @@ static StructRNA *rna_NodeCustomGroup_register( static void rna_CompositorNode_tag_need_exec(bNode *node) { - node->need_exec = TRUE; + node->need_exec = true; } static void rna_Node_tex_image_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -2482,7 +2482,7 @@ static StructRNA *rna_NodeGroup_interface_typef(PointerRNA *ptr) bNodeTree *ngroup = (bNodeTree *)node->id; if (ngroup) { - StructRNA *srna = ntreeInterfaceTypeGet(ngroup, TRUE); + StructRNA *srna = ntreeInterfaceTypeGet(ngroup, true); if (srna) return srna; } @@ -2494,7 +2494,7 @@ static StructRNA *rna_NodeGroupInputOutput_interface_typef(PointerRNA *ptr) bNodeTree *ntree = ptr->id.data; if (ntree) { - StructRNA *srna = ntreeInterfaceTypeGet(ntree, TRUE); + StructRNA *srna = ntreeInterfaceTypeGet(ntree, true); if (srna) return srna; } @@ -3859,7 +3859,7 @@ static void def_sh_script(StructRNA *srna) RNA_def_function_ui_description(func, "Find a socket by name"); parm = RNA_def_string(func, "name", NULL, 0, "Socket name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - /*parm =*/ RNA_def_boolean(func, "is_output", FALSE, "Output", "Whether the socket is an output"); + /*parm =*/ RNA_def_boolean(func, "is_output", false, "Output", "Whether the socket is an output"); parm = RNA_def_pointer(func, "result", "NodeSocket", "", ""); RNA_def_function_return(func, parm); @@ -3870,7 +3870,7 @@ static void def_sh_script(StructRNA *srna) RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - /*parm =*/ RNA_def_boolean(func, "is_output", FALSE, "Output", "Whether the socket is an output"); + /*parm =*/ RNA_def_boolean(func, "is_output", false, "Output", "Whether the socket is an output"); parm = RNA_def_pointer(func, "result", "NodeSocket", "", ""); RNA_def_function_return(func, parm); @@ -5738,19 +5738,19 @@ static void def_cmp_colorcorrection(StructRNA *srna) PropertyRNA *prop; prop = RNA_def_property(srna, "red", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, true); RNA_def_property_ui_text(prop, "Red", "Red channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "green", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 2); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, true); RNA_def_property_ui_text(prop, "Green", "Green channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "blue", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 4); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, true); RNA_def_property_ui_text(prop, "Blue", "Blue channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -6929,13 +6929,13 @@ static void rna_def_internal_node(BlenderRNA *brna) func = RNA_def_function(srna, "poll", "rna_NodeInternal_poll"); RNA_def_function_ui_description(func, "If non-null output is returned, the node type can be added to the tree"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_SELF_TYPE); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", ""); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "poll_instance", "rna_NodeInternal_poll_instance"); RNA_def_function_ui_description(func, "If non-null output is returned, the node can be added to the tree"); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -7161,7 +7161,7 @@ static void rna_def_node(BlenderRNA *brna) func = RNA_def_function(srna, "is_registered_node_type", "rna_Node_is_registered_node_type"); RNA_def_function_ui_description(func, "True if a registered node type"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_SELF_TYPE); - parm = RNA_def_boolean(func, "result", FALSE, "Result", ""); + parm = RNA_def_boolean(func, "result", false, "Result", ""); RNA_def_function_return(func, parm); /* registration */ @@ -7223,14 +7223,14 @@ static void rna_def_node(BlenderRNA *brna) func = RNA_def_function(srna, "poll", NULL); RNA_def_function_ui_description(func, "If non-null output is returned, the node type can be added to the tree"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", ""); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "poll_instance", NULL); RNA_def_function_ui_description(func, "If non-null output is returned, the node can be added to the tree"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -7394,7 +7394,7 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); parm = RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - RNA_def_boolean(func, "verify_limits", TRUE, "Verify Limits", "Remove existing links if connection limit is exceeded"); + RNA_def_boolean(func, "verify_limits", true, "Verify Limits", "Remove existing links if connection limit is exceeded"); /* return */ parm = RNA_def_pointer(func, "link", "NodeLink", "", "New node link"); RNA_def_function_return(func, parm); @@ -7571,7 +7571,7 @@ static void rna_def_nodetree(BlenderRNA *brna) RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); /* update */ func = RNA_def_function(srna, "update", NULL); @@ -7676,7 +7676,7 @@ static StructRNA *define_specific_node(BlenderRNA *brna, const char *struct_name func = RNA_def_function(srna, "is_registered_node_type", "rna_Node_is_registered_node_type"); RNA_def_function_ui_description(func, "True if a registered node type"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_SELF_TYPE); - parm = RNA_def_boolean(func, "result", FALSE, "Result", ""); + parm = RNA_def_boolean(func, "result", false, "Result", ""); RNA_def_function_return(func, parm); /* Exposes the socket template type lists in RNA for use in scripts diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index b46b1e71c32..193d7baad33 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -213,7 +213,7 @@ static void rna_Object_internal_update(Main *UNUSED(bmain), Scene *UNUSED(scene) static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) { /* don't use compat so we get predictable rotation */ - BKE_object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, FALSE, TRUE); + BKE_object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, false, true); rna_Object_internal_update(bmain, scene, ptr); } @@ -245,7 +245,7 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16]) } /* don't use compat so we get predictable rotation */ - BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, false, false); } static void rna_Object_matrix_basis_get(PointerRNA *ptr, float values[16]) @@ -257,7 +257,7 @@ static void rna_Object_matrix_basis_get(PointerRNA *ptr, float values[16]) static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16]) { Object *ob = ptr->id.data; - BKE_object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE); + BKE_object_apply_mat4(ob, (float(*)[4])values, false, false); } void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -1335,7 +1335,7 @@ static ModifierData *rna_Object_modifier_new(Object *object, bContext *C, Report static void rna_Object_modifier_remove(Object *object, bContext *C, ReportList *reports, PointerRNA *md_ptr) { ModifierData *md = md_ptr->data; - if (ED_object_modifier_remove(reports, CTX_data_main(C), object, md) == FALSE) { + if (ED_object_modifier_remove(reports, CTX_data_main(C), object, md) == false) { /* error is already set */ return; } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index e672a7ef2a7..0b6d6b36e7c 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -382,7 +382,7 @@ static int rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings) void rna_Object_dm_info(struct Object *ob, int type, char *result) { DerivedMesh *dm = NULL; - int dm_release = FALSE; + bool dm_release = false; char *ret = NULL; result[0] = '\0'; @@ -392,7 +392,7 @@ void rna_Object_dm_info(struct Object *ob, int type, char *result) if (ob->type == OB_MESH) { dm = CDDM_from_mesh(ob->data); ret = DM_debug_info(dm); - dm_release = TRUE; + dm_release = true; } break; case 1: diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 4050b9b2df3..a7be3daea20 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -605,10 +605,10 @@ static int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, Pointer bPoseChannel *pchan = BKE_pose_channel_find_name(pose, key); if (pchan) { RNA_pointer_create(ptr->id.data, &RNA_PoseBone, pchan, r_ptr); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -621,7 +621,7 @@ static void rna_PoseChannel_matrix_basis_get(PointerRNA *ptr, float *values) static void rna_PoseChannel_matrix_basis_set(PointerRNA *ptr, const float *values) { bPoseChannel *pchan = (bPoseChannel *)ptr->data; - BKE_pchan_apply_mat4(pchan, (float (*)[4])values, FALSE); /* no compat for predictable result */ + BKE_pchan_apply_mat4(pchan, (float (*)[4])values, false); /* no compat for predictable result */ } static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values) @@ -632,7 +632,7 @@ static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values) BKE_armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat); - BKE_pchan_apply_mat4(pchan, tmat, FALSE); /* no compat for predictable result */ + BKE_pchan_apply_mat4(pchan, tmat, false); /* no compat for predictable result */ } #else diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index 6e24397d066..78cd8d4bad4 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -825,7 +825,7 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) /* Dynamics Parameters - Deactivation */ prop = RNA_def_property(srna, "use_deactivation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", RBO_FLAG_USE_DEACTIVATION); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, true); RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyOb_activation_state_set"); RNA_def_property_ui_text(prop, "Enable Deactivation", "Enable deactivation of resting rigid bodies (increases performance and stability " @@ -897,7 +897,7 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) /* Collision Parameters - Sensitivity */ prop = RNA_def_property(srna, "use_margin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", RBO_FLAG_USE_MARGIN); - RNA_def_property_boolean_default(prop, FALSE); + RNA_def_property_boolean_default(prop, false); RNA_def_property_ui_text(prop, "Collision Margin", "Use custom collision margin (some shapes will have a visible gap around them)"); RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_shape_reset"); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index ae0841b4e28..8d448f26bbe 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -381,7 +381,7 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point propptr.data = prop; *r_ptr = propptr; - return TRUE; + return true; } } else { @@ -391,7 +391,7 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point propptr.data = prop; *r_ptr = propptr; - return TRUE; + return true; } } } @@ -413,13 +413,13 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point propptr.data = idp; *r_ptr = propptr; - return TRUE; + return true; } } } } #endif - return FALSE; + return false; } PointerRNA rna_builtin_type_get(PointerRNA *ptr) @@ -992,10 +992,10 @@ static int rna_BlenderRNA_structs_lookup_int(PointerRNA *ptr, int index, Pointer if (srna) { RNA_pointer_create(NULL, &RNA_Struct, srna, r_ptr); - return TRUE; + return true; } else { - return FALSE; + return false; } } static int rna_BlenderRNA_structs_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr) @@ -1004,11 +1004,11 @@ static int rna_BlenderRNA_structs_lookup_string(PointerRNA *ptr, const char *key for (; srna; srna = srna->cont.next) { if (key[0] == srna->identifier[0] && strcmp(key, srna->identifier) == 0) { RNA_pointer_create(NULL, &RNA_Struct, srna, r_ptr); - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d15e9dc3441..95425440eac 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -348,11 +348,11 @@ static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key for (base = scene->base.first; base; base = base->next) { if (strncmp(base->object->id.name + 2, key, sizeof(base->object->id.name) - 2) == 0) { *r_ptr = rna_pointer_inherit_refine(ptr, &RNA_ObjectBase, base); - return TRUE; + return true; } } - return FALSE; + return false; } static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter) @@ -1408,7 +1408,7 @@ static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[], int frame) static void rna_TimeLine_remove(Scene *scene, ReportList *reports, PointerRNA *marker_ptr) { TimeMarker *marker = marker_ptr->data; - if (BLI_remlink_safe(&scene->markers, marker) == FALSE) { + if (BLI_remlink_safe(&scene->markers, marker) == false) { BKE_reportf(reports, RPT_ERROR, "Timeline marker '%s' not found in scene '%s'", marker->name, scene->id.name + 2); return; diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index c51ee901370..84134e7cd3a 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -108,8 +108,8 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name if (BKE_imtype_is_movie(rd->im_format.imtype)) BKE_movie_filepath_get(name, rd); else - BKE_makepicstring(name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, &rd->im_format, - rd->scemode & R_EXTENSION, TRUE); + BKE_makepicstring(name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, + &rd->im_format, (rd->scemode & R_EXTENSION) != 0, true); } static void rna_Scene_ray_cast(Scene *scene, float ray_start[3], float ray_end[3], diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index adea1f641a9..1d9464ab7c5 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -157,7 +157,7 @@ static void rna_Area_type_update(bContext *C, PointerRNA *ptr) /* It is possible that new layers becomes visible. */ if (sa->spacetype == SPACE_VIEW3D) { - DAG_on_visible_update(CTX_data_main(C), FALSE); + DAG_on_visible_update(CTX_data_main(C), false); } CTX_wm_window_set(C, prevwin); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 1ac43e426de..9d8d360c6f1 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -1000,9 +1000,9 @@ static int rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA v Sequence *cur = (Sequence *) value.data; if (seq == cur) - return FALSE; + return false; - return TRUE; + return true; } static SequenceModifierData *rna_Sequence_modifier_new(Sequence *seq, bContext *C, ReportList *reports, const char *name, int type) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0356d871e0e..8fe5376322e 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -396,7 +396,7 @@ static void rna_SpaceView3D_layer_set(PointerRNA *ptr, const int *values) static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { - DAG_on_visible_update(bmain, FALSE); + DAG_on_visible_update(bmain, false); } static void rna_SpaceView3D_viewport_shade_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -508,10 +508,10 @@ static void rna_RegionView3D_quadview_update(Main *UNUSED(main), Scene *UNUSED(s rna_area_region_from_regiondata(ptr, &sa, &ar); if (sa && ar && ar->alignment == RGN_ALIGN_QSPLIT) - ED_view3d_quadview_update(sa, ar, FALSE); + ED_view3d_quadview_update(sa, ar, false); } -/* same as above but call clip==TRUE */ +/* same as above but call clip==true */ static void rna_RegionView3D_quadview_clip_update(Main *UNUSED(main), Scene *UNUSED(scene), PointerRNA *ptr) { ScrArea *sa; @@ -519,7 +519,7 @@ static void rna_RegionView3D_quadview_clip_update(Main *UNUSED(main), Scene *UNU rna_area_region_from_regiondata(ptr, &sa, &ar); if (sa && ar && ar->alignment == RGN_ALIGN_QSPLIT) - ED_view3d_quadview_update(sa, ar, TRUE); + ED_view3d_quadview_update(sa, ar, true); } static void rna_RegionView3D_view_location_get(PointerRNA *ptr, float *values) @@ -1195,7 +1195,7 @@ static int rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type) if (type->poll) return type->poll(C, type); else - return TRUE; + return true; } static EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index df8c68676b3..847efa2fad5 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -599,7 +599,7 @@ static MovieTrackingObject *rna_trackingObject_new(MovieTracking *tracking, cons static void rna_trackingObject_remove(MovieTracking *tracking, ReportList *reports, PointerRNA *object_ptr) { MovieTrackingObject *object = object_ptr->data; - if (BKE_tracking_object_delete(tracking, object) == FALSE) { + if (BKE_tracking_object_delete(tracking, object) == false) { BKE_reportf(reports, RPT_ERROR, "MovieTracking '%s' cannot be removed", object->name); return; } @@ -1168,7 +1168,7 @@ static void rna_def_trackingMarkers(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to find marker for", MINFRAME, MAXFRAME); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_boolean(func, "exact", TRUE, "Exact", + RNA_def_boolean(func, "exact", true, "Exact", "Get marker at exact frame number rather than get estimated marker"); parm = RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Marker for specified frame"); RNA_def_function_return(func, parm); @@ -1466,7 +1466,7 @@ static void rna_def_trackingPlaneMarkers(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to find marker for", MINFRAME, MAXFRAME); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_boolean(func, "exact", TRUE, "Exact", + RNA_def_boolean(func, "exact", true, "Exact", "Get plane marker at exact frame number rather than get estimated marker"); parm = RNA_def_pointer(func, "plane_marker", "MovieTrackingPlaneMarker", "", "Plane marker for specified frame"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index ed526d00741..f14fadfa722 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -483,7 +483,7 @@ static StructRNA *rna_UIList_register(Main *bmain, ReportList *reports, void *da } /* check if we have registered this uilist type before, and remove it */ - ult = WM_uilisttype_find(dummyult.idname, TRUE); + ult = WM_uilisttype_find(dummyult.idname, true); if (ult && ult->ext.srna) rna_UIList_unregister(bmain, ult->ext.srna); @@ -708,7 +708,7 @@ static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data } /* check if we have registered this menu type before, and remove it */ - mt = WM_menutype_find(dummymt.idname, TRUE); + mt = WM_menutype_find(dummymt.idname, true); if (mt && mt->ext.srna) rna_Menu_unregister(bmain, mt->ext.srna); @@ -983,7 +983,7 @@ static void rna_def_panel(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "type->translation_context"); RNA_def_property_string_default(prop, BLF_I18NCONTEXT_DEFAULT_BPYRNA); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); - RNA_define_verify_sdna(TRUE); + RNA_define_verify_sdna(true); prop = RNA_def_property(srna, "bl_category", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->category"); @@ -1218,7 +1218,7 @@ static void rna_def_menu(BlenderRNA *brna) parm = RNA_def_pointer(func, "context", "Context", "", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_define_verify_sdna(FALSE); /* not in sdna */ + RNA_define_verify_sdna(false); /* not in sdna */ prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "layout"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index fd8d8aede87..7271d35086e 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -540,7 +540,7 @@ static IDProperty *rna_AddonPref_idprops(PointerRNA *ptr, bool create) static PointerRNA rna_Addon_preferences_get(PointerRNA *ptr) { bAddon *addon = (bAddon *)ptr->data; - bAddonPrefType *apt = BKE_addon_pref_type_find(addon->module, TRUE); + bAddonPrefType *apt = BKE_addon_pref_type_find(addon->module, true); if (apt) { if (addon->prop == NULL) { IDPropertyTemplate val = {0}; @@ -592,7 +592,7 @@ static StructRNA *rna_AddonPref_register(Main *bmain, ReportList *reports, void } /* check if we have registered this header type before, and remove it */ - apt = BKE_addon_pref_type_find(dummyaddon.module, TRUE); + apt = BKE_addon_pref_type_find(dummyaddon.module, true); if (apt) { if (apt->ext.srna) { rna_AddonPref_unregister(bmain, apt->ext.srna); diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c index ff9469550d9..f24f94282b6 100644 --- a/source/blender/makesrna/intern/rna_vfont.c +++ b/source/blender/makesrna/intern/rna_vfont.c @@ -48,9 +48,9 @@ static int rna_VectorFont_filepath_editable(PointerRNA *ptr) { VFont *vfont = ptr->id.data; if (BKE_vfont_is_builtin(vfont)) { - return FALSE; + return false; } - return TRUE; + return true; } static void rna_VectorFont_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 3cad1df83f4..23b6d1e41ae 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -519,7 +519,7 @@ static PointerRNA rna_Operator_properties_get(PointerRNA *ptr) static PointerRNA rna_OperatorMacro_properties_get(PointerRNA *ptr) { wmOperatorTypeMacro *otmacro = (wmOperatorTypeMacro *)ptr->data; - wmOperatorType *ot = WM_operatortype_find(otmacro->idname, TRUE); + wmOperatorType *ot = WM_operatortype_find(otmacro->idname, true); return rna_pointer_inherit_refine(ptr, ot->srna, otmacro->properties); } @@ -862,7 +862,7 @@ static int rna_wmClipboard_length(PointerRNA *UNUSED(ptr)) static void rna_wmClipboard_set(PointerRNA *UNUSED(ptr), const char *value) { - WM_clipboard_text_set((void *) value, FALSE); + WM_clipboard_text_set((void *) value, false); } #ifdef WITH_PYTHON @@ -1157,7 +1157,7 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void * /* check if we have registered this operator type before, and remove it */ { - wmOperatorType *ot = WM_operatortype_find(dummyot.idname, TRUE); + wmOperatorType *ot = WM_operatortype_find(dummyot.idname, true); if (ot && ot->ext.srna) rna_Operator_unregister(bmain, ot->ext.srna); } @@ -1249,7 +1249,7 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v /* check if we have registered this operator type before, and remove it */ { - wmOperatorType *ot = WM_operatortype_find(dummyot.idname, TRUE); + wmOperatorType *ot = WM_operatortype_find(dummyot.idname, true); if (ot && ot->ext.srna) rna_Operator_unregister(bmain, ot->ext.srna); } diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index ea13cff442a..9b288903aa2 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -235,7 +235,7 @@ static void rna_KeyMap_item_remove(wmKeyMap *km, ReportList *reports, PointerRNA { wmKeyMapItem *kmi = kmi_ptr->data; - if (WM_keymap_remove_item(km, kmi) == FALSE) { + if (WM_keymap_remove_item(km, kmi) == false) { BKE_reportf(reports, RPT_ERROR, "KeyMapItem '%s' cannot be removed from '%s'", kmi->idname, km->idname); return; } @@ -272,7 +272,7 @@ static void rna_KeyMap_remove(wmKeyConfig *keyconfig, ReportList *reports, Point { wmKeyMap *keymap = keymap_ptr->data; - if (WM_keymap_remove(keyconfig, keymap) == FALSE) { + if (WM_keymap_remove(keyconfig, keymap) == false) { BKE_reportf(reports, RPT_ERROR, "KeyConfig '%s' cannot be removed", keymap->idname); return; } @@ -284,7 +284,7 @@ static void rna_KeyConfig_remove(wmWindowManager *wm, ReportList *reports, Point { wmKeyConfig *keyconf = keyconf_ptr->data; - if (WM_keyconfig_remove(wm, keyconf) == FALSE) { + if (WM_keyconfig_remove(wm, keyconf) == false) { BKE_reportf(reports, RPT_ERROR, "KeyConfig '%s' cannot be removed", keyconf->idname); return; } -- cgit v1.2.3