diff options
Diffstat (limited to 'source')
41 files changed, 214 insertions, 214 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 142e84bd661..6335869ca43 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -239,7 +239,7 @@ IDProperty *rna_ID_idprops(PointerRNA *ptr, bool create) return IDP_GetProperties(ptr->data, create); } -void rna_ID_fake_user_set(PointerRNA *ptr, int value) +void rna_ID_fake_user_set(PointerRNA *ptr, bool value) { ID *id = (ID *)ptr->data; @@ -647,7 +647,7 @@ static void rna_ImagePreview_pixels_float_set(PointerRNA *ptr, const float *valu } -static void rna_ImagePreview_is_image_custom_set(PointerRNA *ptr, int value) +static void rna_ImagePreview_is_image_custom_set(PointerRNA *ptr, bool value) { rna_ImagePreview_is_custom_set(ptr, value, ICON_SIZE_PREVIEW); } @@ -693,7 +693,7 @@ static void rna_ImagePreview_image_pixels_float_set(PointerRNA *ptr, const float } -static void rna_ImagePreview_is_icon_custom_set(PointerRNA *ptr, int value) +static void rna_ImagePreview_is_icon_custom_set(PointerRNA *ptr, bool value) { rna_ImagePreview_is_custom_set(ptr, value, ICON_SIZE_ICON); } diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 562e225303d..6f0ff9aa556 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -329,7 +329,7 @@ static void rna_ConstraintActuator_spring_set(struct PointerRNA *ptr, float valu } /* ConstraintActuator uses the same property for Material and Property. * Therefore we need to clear the property when "use_material_detect" mode changes */ -static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr, int value) +static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr, bool value) { bActuator *act = (bActuator *)ptr->data; bConstraintActuator *ca = act->data; @@ -342,12 +342,12 @@ static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr, } } -static void rna_ActionActuator_add_set(struct PointerRNA *ptr, int value) +static void rna_ActionActuator_add_set(struct PointerRNA *ptr, bool value) { bActuator *act = (bActuator *)ptr->data; bActionActuator *aa = act->data; - if (value == 1) { + if (value) { aa->flag &= ~ACT_IPOFORCE; aa->flag |= ACT_IPOADD; } @@ -356,12 +356,12 @@ static void rna_ActionActuator_add_set(struct PointerRNA *ptr, int value) } } -static void rna_ActionActuator_force_set(struct PointerRNA *ptr, int value) +static void rna_ActionActuator_force_set(struct PointerRNA *ptr, bool value) { bActuator *act = (bActuator *)ptr->data; bActionActuator *aa = act->data; - if (value == 1) { + if (value) { aa->flag &= ~ACT_IPOADD; aa->flag |= ACT_IPOFORCE; } diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 623eccc9ee5..6f1445d31ef 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -118,7 +118,7 @@ static void rna_AnimData_action_set(PointerRNA *ptr, PointerRNA value) } } -static void rna_AnimData_tweakmode_set(PointerRNA *ptr, const int value) +static void rna_AnimData_tweakmode_set(PointerRNA *ptr, const bool value) { AnimData *adt = (AnimData *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index b6eb0aed709..7af3746b855 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -355,7 +355,7 @@ static void rna_EditBone_connected_check(EditBone *ebone) } } -static void rna_EditBone_connected_set(PointerRNA *ptr, int value) +static void rna_EditBone_connected_set(PointerRNA *ptr, bool value) { EditBone *ebone = (EditBone *)(ptr->data); @@ -475,7 +475,7 @@ static void rna_Armature_bones_next(CollectionPropertyIterator *iter) iter->valid = (internal->link != NULL); } -static int rna_Armature_is_editmode_get(PointerRNA *ptr) +static bool rna_Armature_is_editmode_get(PointerRNA *ptr) { bArmature *arm = (bArmature *)ptr->id.data; return (arm->edbo != NULL); diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 71cdb24ffdc..bb204bf8c81 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -135,25 +135,25 @@ const EnumPropertyItem rna_enum_brush_image_tool_items[] = { #include "WM_api.h" -static int rna_SculptToolCapabilities_has_accumulate_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_accumulate_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return SCULPT_TOOL_HAS_ACCUMULATE(br->sculpt_tool); } -static int rna_SculptToolCapabilities_has_auto_smooth_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_auto_smooth_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return !ELEM(br->sculpt_tool, SCULPT_TOOL_MASK, SCULPT_TOOL_SMOOTH); } -static int rna_SculptToolCapabilities_has_height_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_height_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return br->sculpt_tool == SCULPT_TOOL_LAYER; } -static int rna_SculptToolCapabilities_has_jitter_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_jitter_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return (!(br->flag & BRUSH_ANCHORED) && @@ -163,19 +163,19 @@ static int rna_SculptToolCapabilities_has_jitter_get(PointerRNA *ptr) SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB)); } -static int rna_SculptToolCapabilities_has_normal_weight_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_normal_weight_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return SCULPT_TOOL_HAS_NORMAL_WEIGHT(br->sculpt_tool); } -static int rna_SculptToolCapabilities_has_rake_factor_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_rake_factor_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return SCULPT_TOOL_HAS_RAKE(br->sculpt_tool); } -static int rna_BrushCapabilities_has_overlay_get(PointerRNA *ptr) +static bool rna_BrushCapabilities_has_overlay_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return ELEM(br->mtex.brush_map_mode, @@ -184,26 +184,26 @@ static int rna_BrushCapabilities_has_overlay_get(PointerRNA *ptr) MTEX_MAP_MODE_STENCIL); } -static int rna_SculptToolCapabilities_has_persistence_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_persistence_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return br->sculpt_tool == SCULPT_TOOL_LAYER; } -static int rna_SculptToolCapabilities_has_pinch_factor_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_pinch_factor_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return ELEM(br->sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_CREASE, SCULPT_TOOL_SNAKE_HOOK); } -static int rna_SculptToolCapabilities_has_plane_offset_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_plane_offset_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return ELEM(br->sculpt_tool, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_SCRAPE); } -static int rna_SculptToolCapabilities_has_random_texture_angle_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_random_texture_angle_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return (!ELEM(br->sculpt_tool, @@ -211,7 +211,7 @@ static int rna_SculptToolCapabilities_has_random_texture_angle_get(PointerRNA *p SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB)); } -static int rna_TextureCapabilities_has_random_texture_angle_get(PointerRNA *ptr) +static bool rna_TextureCapabilities_has_random_texture_angle_get(PointerRNA *ptr) { MTex *mtex = (MTex *)ptr->data; return ELEM(mtex->brush_map_mode, @@ -221,13 +221,13 @@ static int rna_TextureCapabilities_has_random_texture_angle_get(PointerRNA *ptr) } -static int rna_BrushCapabilities_has_random_texture_angle_get(PointerRNA *ptr) +static bool rna_BrushCapabilities_has_random_texture_angle_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return !(br->flag & BRUSH_ANCHORED); } -static int rna_SculptToolCapabilities_has_sculpt_plane_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_sculpt_plane_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return !ELEM(br->sculpt_tool, SCULPT_TOOL_INFLATE, @@ -235,13 +235,13 @@ static int rna_SculptToolCapabilities_has_sculpt_plane_get(PointerRNA *ptr) SCULPT_TOOL_SMOOTH); } -static int rna_SculptToolCapabilities_has_secondary_color_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_secondary_color_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return BKE_brush_sculpt_has_secondary_color(br); } -static int rna_SculptToolCapabilities_has_smooth_stroke_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_smooth_stroke_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return (!(br->flag & BRUSH_ANCHORED) && @@ -253,7 +253,7 @@ static int rna_SculptToolCapabilities_has_smooth_stroke_get(PointerRNA *ptr) SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB)); } -static int rna_BrushCapabilities_has_smooth_stroke_get(PointerRNA *ptr) +static bool rna_BrushCapabilities_has_smooth_stroke_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return (!(br->flag & BRUSH_ANCHORED) && @@ -262,7 +262,7 @@ static int rna_BrushCapabilities_has_smooth_stroke_get(PointerRNA *ptr) !(br->flag & BRUSH_CURVE)); } -static int rna_SculptToolCapabilities_has_space_attenuation_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_space_attenuation_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return ((br->flag & (BRUSH_SPACE | BRUSH_LINE | BRUSH_CURVE)) && @@ -270,38 +270,38 @@ static int rna_SculptToolCapabilities_has_space_attenuation_get(PointerRNA *ptr) SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK)); } -static int rna_ImapaintToolCapabilities_has_space_attenuation_get(PointerRNA *ptr) +static bool rna_ImapaintToolCapabilities_has_space_attenuation_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return (br->flag & (BRUSH_SPACE | BRUSH_LINE | BRUSH_CURVE)) && br->imagepaint_tool != PAINT_TOOL_FILL; } -static int rna_BrushCapabilities_has_spacing_get(PointerRNA *ptr) +static bool rna_BrushCapabilities_has_spacing_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return (!(br->flag & BRUSH_ANCHORED)); } -static int rna_SculptToolCapabilities_has_strength_pressure_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_strength_pressure_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return !ELEM(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK); } -static int rna_TextureCapabilities_has_texture_angle_get(PointerRNA *ptr) +static bool rna_TextureCapabilities_has_texture_angle_get(PointerRNA *ptr) { MTex *mtex = (MTex *)ptr->data; return mtex->brush_map_mode != MTEX_MAP_MODE_3D; } -static int rna_SculptToolCapabilities_has_gravity_get(PointerRNA *ptr) +static bool rna_SculptToolCapabilities_has_gravity_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; return !ELEM(br->sculpt_tool, SCULPT_TOOL_MASK, SCULPT_TOOL_SMOOTH); } -static int rna_TextureCapabilities_has_texture_angle_source_get(PointerRNA *ptr) +static bool rna_TextureCapabilities_has_texture_angle_source_get(PointerRNA *ptr) { MTex *mtex = (MTex *)ptr->data; return ELEM(mtex->brush_map_mode, @@ -310,7 +310,7 @@ static int rna_TextureCapabilities_has_texture_angle_source_get(PointerRNA *ptr) MTEX_MAP_MODE_RANDOM); } -static int rna_ImapaintToolCapabilities_has_accumulate_get(PointerRNA *ptr) +static bool rna_ImapaintToolCapabilities_has_accumulate_get(PointerRNA *ptr) { /* only support for draw tool */ Brush *br = (Brush *)ptr->data; @@ -325,7 +325,7 @@ static int rna_ImapaintToolCapabilities_has_accumulate_get(PointerRNA *ptr) ) ? false : true; } -static int rna_ImapaintToolCapabilities_has_radius_get(PointerRNA *ptr) +static bool rna_ImapaintToolCapabilities_has_radius_get(PointerRNA *ptr) { /* only support for draw tool */ Brush *br = (Brush *)ptr->data; @@ -456,7 +456,7 @@ static void rna_Brush_set_size(PointerRNA *ptr, int value) brush->size = value; } -static void rna_Brush_use_gradient_set(PointerRNA *ptr, int value) +static void rna_Brush_use_gradient_set(PointerRNA *ptr, bool value) { Brush *br = (Brush *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 1d85ba43995..080916bfbf8 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -85,7 +85,7 @@ static void rna_CurveMapping_curves_begin(CollectionPropertyIterator *iter, Poin rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), 0, NULL); } -static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value) +static void rna_CurveMapping_clip_set(PointerRNA *ptr, bool value) { CurveMapping *cumap = (CurveMapping *)ptr->data; @@ -521,7 +521,7 @@ static const EnumPropertyItem *rna_ColorManagedViewSettings_look_itemf( return items; } -static void rna_ColorManagedViewSettings_use_curves_set(PointerRNA *ptr, int value) +static void rna_ColorManagedViewSettings_use_curves_set(PointerRNA *ptr, bool value) { ColorManagedViewSettings *view_settings = (ColorManagedViewSettings *) ptr->data; diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c index 96e8878b938..606f482c92e 100644 --- a/source/blender/makesrna/intern/rna_controller.c +++ b/source/blender/makesrna/intern/rna_controller.c @@ -159,7 +159,7 @@ static void rna_Controller_state_get(PointerRNA *ptr, int *values) values[i] = (cont->state_mask & (1 << i)); } -static void rna_Controller_state_set(PointerRNA *ptr, const int *values) +static void rna_Controller_state_set(PointerRNA *ptr, const bool *values) { bController *cont = (bController *)ptr->data; int i, tot = 0; diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 3c4baa70c5f..59fbde13ee3 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -735,7 +735,7 @@ static void rna_Curve_splines_begin(CollectionPropertyIterator *iter, PointerRNA rna_iterator_listbase_begin(iter, BKE_curve_nurbs_get(cu), NULL); } -static int rna_Curve_is_editmode_get(PointerRNA *ptr) +static bool rna_Curve_is_editmode_get(PointerRNA *ptr) { Curve *cu = (Curve *)ptr->id.data; const short type = BKE_curve_type_get(cu); diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 325deff0a7a..d16ef3db296 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -223,7 +223,7 @@ static void rna_DynamicPaint_uvlayer_set(PointerRNA *ptr, const char *value) } /* is point cache used */ -static int rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr) +static bool rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr) { DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data; @@ -231,7 +231,7 @@ static int rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr) } /* is some 3D view preview available */ -static int rna_DynamicPaint_use_color_preview_get(PointerRNA *ptr) +static bool rna_DynamicPaint_use_color_preview_get(PointerRNA *ptr) { DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index c225045e187..9dbc9a62aa4 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -510,7 +510,7 @@ static void rna_FCurve_modifiers_remove(FCurve *fcu, ReportList *reports, Pointe RNA_POINTER_INVALIDATE(fcm_ptr); } -static void rna_FModifier_active_set(PointerRNA *ptr, int UNUSED(value)) +static void rna_FModifier_active_set(PointerRNA *ptr, bool UNUSED(value)) { FModifier *fcm = (FModifier *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index fb06e2e17d3..90af65497a4 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -275,7 +275,7 @@ static const EnumPropertyItem *rna_Object_parent_type_itemf( return item; } -static int rna_GPencilLayer_is_parented_get(PointerRNA *ptr) +static bool rna_GPencilLayer_is_parented_get(PointerRNA *ptr) { bGPDlayer *gpl = (bGPDlayer *)ptr->data; return (gpl->parent != NULL); @@ -366,7 +366,7 @@ static void rna_GPencilLayer_info_set(PointerRNA *ptr, const char *value) BKE_animdata_fix_paths_rename_all(&gpd->id, "layers", oldname, gpl->info); } -static void rna_GPencil_use_onion_skinning_set(PointerRNA *ptr, const int value) +static void rna_GPencil_use_onion_skinning_set(PointerRNA *ptr, const bool value) { bGPdata *gpd = ptr->id.data; bGPDlayer *gpl; @@ -423,7 +423,7 @@ static bGPDstroke *rna_GPencil_stroke_point_find_stroke(const bGPdata *gpd, cons return NULL; } -static void rna_GPencil_stroke_point_select_set(PointerRNA *ptr, const int value) +static void rna_GPencil_stroke_point_select_set(PointerRNA *ptr, const bool value) { bGPdata *gpd = ptr->id.data; bGPDspoint *pt = ptr->data; @@ -525,7 +525,7 @@ static void rna_GPencil_stroke_remove(bGPDframe *frame, ReportList *reports, Poi WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); } -static void rna_GPencil_stroke_select_set(PointerRNA *ptr, const int value) +static void rna_GPencil_stroke_select_set(PointerRNA *ptr, const bool value) { bGPDstroke *gps = ptr->data; bGPDspoint *pt; @@ -851,13 +851,13 @@ static void rna_GPencilStrokeColor_info_set(PointerRNA *ptr, const char *value) } -static int rna_GPencilPaletteColor_is_stroke_visible_get(PointerRNA *ptr) +static bool rna_GPencilPaletteColor_is_stroke_visible_get(PointerRNA *ptr) { bGPDpalettecolor *pcolor = (bGPDpalettecolor *)ptr->data; return (pcolor->color[3] > GPENCIL_ALPHA_OPACITY_THRESH); } -static int rna_GPencilPaletteColor_is_fill_visible_get(PointerRNA *ptr) +static bool rna_GPencilPaletteColor_is_fill_visible_get(PointerRNA *ptr) { bGPDpalettecolor *pcolor = (bGPDpalettecolor *)ptr->data; return (pcolor->fill[3] > GPENCIL_ALPHA_OPACITY_THRESH); diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 9549eb1de08..018a4765cd0 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -83,17 +83,17 @@ static void rna_Image_animated_update(Main *UNUSED(bmain), Scene *UNUSED(scene), } } -static int rna_Image_is_stereo_3d_get(PointerRNA *ptr) +static bool rna_Image_is_stereo_3d_get(PointerRNA *ptr) { return BKE_image_is_stereo((Image *)ptr->data); } -static int rna_Image_is_multiview_get(PointerRNA *ptr) +static bool rna_Image_is_multiview_get(PointerRNA *ptr) { return BKE_image_is_multiview((Image *)ptr->data); } -static int rna_Image_dirty_get(PointerRNA *ptr) +static bool rna_Image_dirty_get(PointerRNA *ptr) { return BKE_image_is_dirty((Image *)ptr->data); } @@ -251,7 +251,7 @@ static void rna_Image_file_format_set(PointerRNA *ptr, int value) } } -static int rna_Image_has_data_get(PointerRNA *ptr) +static bool rna_Image_has_data_get(PointerRNA *ptr) { Image *image = (Image *)ptr->data; @@ -438,7 +438,7 @@ static int rna_Image_channels_get(PointerRNA *ptr) return channels; } -static int rna_Image_is_float_get(PointerRNA *ptr) +static bool rna_Image_is_float_get(PointerRNA *ptr) { Image *im = (Image *)ptr->data; ImBuf *ibuf; diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index fac0f39b11c..67fbee8d0ef 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -209,14 +209,14 @@ void rna_def_render_layer_common(struct StructRNA *srna, int scene); void rna_def_actionbone_group_common(struct StructRNA *srna, int update_flag, const char *update_cb); void rna_ActionGroup_colorset_set(struct PointerRNA *ptr, int value); -int rna_ActionGroup_is_custom_colorset_get(struct PointerRNA *ptr); +bool rna_ActionGroup_is_custom_colorset_get(struct PointerRNA *ptr); void rna_ID_name_get(struct PointerRNA *ptr, char *value); int rna_ID_name_length(struct PointerRNA *ptr); void rna_ID_name_set(struct PointerRNA *ptr, const char *value); struct StructRNA *rna_ID_refine(struct PointerRNA *ptr); struct IDProperty *rna_ID_idprops(struct PointerRNA *ptr, bool create); -void rna_ID_fake_user_set(struct PointerRNA *ptr, int value); +void rna_ID_fake_user_set(struct PointerRNA *ptr, bool value); void **rna_ID_instance(PointerRNA *ptr); struct IDProperty *rna_PropertyGroup_idprops(struct PointerRNA *ptr, bool create); void rna_PropertyGroup_unregister(struct Main *bmain, struct StructRNA *type); diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 60b64b0795d..1e1ae2e8183 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -89,7 +89,7 @@ static void rna_Lamp_active_texture_set(PointerRNA *ptr, PointerRNA value) set_current_lamp_texture(la, value.data); } -static int rna_use_shadow_get(PointerRNA *ptr) +static bool rna_use_shadow_get(PointerRNA *ptr) { Lamp *la = (Lamp *)ptr->data; @@ -101,7 +101,7 @@ static int rna_use_shadow_get(PointerRNA *ptr) } } -static void rna_use_shadow_set(PointerRNA *ptr, int value) +static void rna_use_shadow_set(PointerRNA *ptr, bool value) { Lamp *la = (Lamp *)ptr->data; la->mode &= ~(LA_SHAD_BUF | LA_SHAD_RAY); diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index 424c6f93f75..bbc0c251897 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -154,7 +154,7 @@ static void rna_Lattice_update_size(Main *bmain, Scene *scene, PointerRNA *ptr) rna_Lattice_update_data(bmain, scene, ptr); } -static void rna_Lattice_use_outside_set(PointerRNA *ptr, int value) +static void rna_Lattice_use_outside_set(PointerRNA *ptr, bool value) { Lattice *lt = ptr->data; @@ -235,7 +235,7 @@ static char *rna_LatticePoint_path(PointerRNA *ptr) return BLI_strdup(""); } -static int rna_Lattice_is_editmode_get(PointerRNA *ptr) +static bool rna_Lattice_is_editmode_get(PointerRNA *ptr) { Lattice *lt = (Lattice *)ptr->id.data; return (lt->editlatt != NULL); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 89e1ee47475..5d7088c952b 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -42,7 +42,7 @@ /* all the list begin functions are added manually here, Main is not in SDNA */ -static int rna_Main_use_autopack_get(PointerRNA *UNUSED(ptr)) +static bool rna_Main_use_autopack_get(PointerRNA *UNUSED(ptr)) { if (G.fileflags & G_AUTOPACK) return 1; @@ -50,7 +50,7 @@ static int rna_Main_use_autopack_get(PointerRNA *UNUSED(ptr)) return 0; } -static void rna_Main_use_autopack_set(PointerRNA *UNUSED(ptr), int value) +static void rna_Main_use_autopack_set(PointerRNA *UNUSED(ptr), bool value) { if (value) G.fileflags |= G_AUTOPACK; @@ -58,12 +58,12 @@ static void rna_Main_use_autopack_set(PointerRNA *UNUSED(ptr), int value) G.fileflags &= ~G_AUTOPACK; } -static int rna_Main_is_saved_get(PointerRNA *UNUSED(ptr)) +static bool rna_Main_is_saved_get(PointerRNA *UNUSED(ptr)) { return G.relbase_valid; } -static int rna_Main_is_dirty_get(PointerRNA *ptr) +static bool rna_Main_is_dirty_get(PointerRNA *ptr) { /* XXX, not totally nice to do it this way, should store in main ? */ Main *bmain = (Main *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index a4b9f52464d..4947557af10 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -285,7 +285,7 @@ static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float } } -static int rna_MaterialTextureSlot_use_get(PointerRNA *ptr) +static bool rna_MaterialTextureSlot_use_get(PointerRNA *ptr) { Material *ma = (Material *)ptr->id.data; MTex *mtex = (MTex *)ptr->data; @@ -298,7 +298,7 @@ static int rna_MaterialTextureSlot_use_get(PointerRNA *ptr) return 0; } -static void rna_MaterialTextureSlot_use_set(PointerRNA *ptr, int value) +static void rna_MaterialTextureSlot_use_set(PointerRNA *ptr, bool value) { Material *ma = (Material *)ptr->id.data; MTex *mtex = (MTex *)ptr->data; @@ -314,7 +314,7 @@ static void rna_MaterialTextureSlot_use_set(PointerRNA *ptr, int value) } } -static void rna_Material_use_diffuse_ramp_set(PointerRNA *ptr, int value) +static void rna_Material_use_diffuse_ramp_set(PointerRNA *ptr, bool value) { Material *ma = (Material *)ptr->data; @@ -325,7 +325,7 @@ static void rna_Material_use_diffuse_ramp_set(PointerRNA *ptr, int value) ma->ramp_col = BKE_colorband_add(false); } -static void rna_Material_use_specular_ramp_set(PointerRNA *ptr, int value) +static void rna_Material_use_specular_ramp_set(PointerRNA *ptr, bool value) { Material *ma = (Material *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index f09fd29889a..0b8f90e1c68 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -209,10 +209,10 @@ static void rna_MeshAnyLayer_name_set(PointerRNA *ptr, const char *value) rna_cd_layer_name_set(cd, (CustomDataLayer *)ptr->data, value); } -static int rna_Mesh_has_custom_normals_get(PointerRNA *ptr) +static bool rna_Mesh_has_custom_normals_get(PointerRNA *ptr) { Mesh *me = ptr->data; - return (int)BKE_mesh_has_custom_loop_normals(me); + return BKE_mesh_has_custom_loop_normals(me); } /* -------------------------------------------------------------------- */ @@ -778,7 +778,7 @@ static void rna_CustomDataLayer_clone_set(PointerRNA *ptr, CustomData *data, int CustomData_set_layer_clone_index(data, type, n); } -static int rna_MEdge_freestyle_edge_mark_get(PointerRNA *ptr) +static bool rna_MEdge_freestyle_edge_mark_get(PointerRNA *ptr) { Mesh *me = rna_mesh(ptr); MEdge *medge = (MEdge *)ptr->data; @@ -787,7 +787,7 @@ static int rna_MEdge_freestyle_edge_mark_get(PointerRNA *ptr) return fed && (fed->flag & FREESTYLE_EDGE_MARK) != 0; } -static void rna_MEdge_freestyle_edge_mark_set(PointerRNA *ptr, int value) +static void rna_MEdge_freestyle_edge_mark_set(PointerRNA *ptr, bool value) { Mesh *me = rna_mesh(ptr); MEdge *medge = (MEdge *)ptr->data; @@ -804,7 +804,7 @@ static void rna_MEdge_freestyle_edge_mark_set(PointerRNA *ptr, int value) } } -static int rna_MPoly_freestyle_face_mark_get(PointerRNA *ptr) +static bool rna_MPoly_freestyle_face_mark_get(PointerRNA *ptr) { Mesh *me = rna_mesh(ptr); MPoly *mpoly = (MPoly *)ptr->data; @@ -890,22 +890,22 @@ static int rna_MeshTextureFaceLayer_data_length(PointerRNA *ptr) return (me->edit_btmesh) ? 0 : me->totface; } -static int rna_MeshTextureFaceLayer_active_render_get(PointerRNA *ptr) +static bool rna_MeshTextureFaceLayer_active_render_get(PointerRNA *ptr) { return rna_CustomDataLayer_active_get(ptr, rna_mesh_fdata(ptr), CD_MTFACE, 1); } -static int rna_MeshTextureFaceLayer_active_get(PointerRNA *ptr) +static bool rna_MeshTextureFaceLayer_active_get(PointerRNA *ptr) { return rna_CustomDataLayer_active_get(ptr, rna_mesh_fdata(ptr), CD_MTFACE, 0); } -static int rna_MeshTextureFaceLayer_clone_get(PointerRNA *ptr) +static bool rna_MeshTextureFaceLayer_clone_get(PointerRNA *ptr) { return rna_CustomDataLayer_clone_get(ptr, rna_mesh_fdata(ptr), CD_MTFACE); } -static void rna_MeshTextureFaceLayer_active_render_set(PointerRNA *ptr, int value) +static void rna_MeshTextureFaceLayer_active_render_set(PointerRNA *ptr, bool value) { rna_CustomDataLayer_active_set(ptr, rna_mesh_fdata(ptr), value, CD_MTFACE, 1); } @@ -941,22 +941,22 @@ static int rna_MeshTexturePolyLayer_data_length(PointerRNA *ptr) return (me->edit_btmesh) ? 0 : me->totpoly; } -static int rna_MeshTexturePolyLayer_active_render_get(PointerRNA *ptr) +static bool rna_MeshTexturePolyLayer_active_render_get(PointerRNA *ptr) { return rna_CustomDataLayer_active_get(ptr, rna_mesh_pdata(ptr), CD_MTEXPOLY, 1); } -static int rna_MeshTexturePolyLayer_active_get(PointerRNA *ptr) +static bool rna_MeshTexturePolyLayer_active_get(PointerRNA *ptr) { return rna_CustomDataLayer_active_get(ptr, rna_mesh_pdata(ptr), CD_MTEXPOLY, 0); } -static int rna_MeshTexturePolyLayer_clone_get(PointerRNA *ptr) +static bool rna_MeshTexturePolyLayer_clone_get(PointerRNA *ptr) { return rna_CustomDataLayer_clone_get(ptr, rna_mesh_pdata(ptr), CD_MTEXPOLY); } -static void rna_MeshTexturePolyLayer_active_render_set(PointerRNA *ptr, int value) +static void rna_MeshTexturePolyLayer_active_render_set(PointerRNA *ptr, bool value) { rna_CustomDataLayer_active_set(ptr, rna_mesh_pdata(ptr), value, CD_MTEXPOLY, 1); } @@ -966,7 +966,7 @@ static void rna_MeshTexturePolyLayer_active_set(PointerRNA *ptr, int value) rna_CustomDataLayer_active_set(ptr, rna_mesh_pdata(ptr), value, CD_MTEXPOLY, 0); } -static void rna_MeshTexturePolyLayer_clone_set(PointerRNA *ptr, int value) +static void rna_MeshTexturePolyLayer_clone_set(PointerRNA *ptr, bool value) { rna_CustomDataLayer_clone_set(ptr, rna_mesh_pdata(ptr), value, CD_MTEXPOLY); } @@ -990,17 +990,17 @@ static int rna_MeshColorLayer_data_length(PointerRNA *ptr) return me->totface; } -static int rna_MeshColorLayer_active_render_get(PointerRNA *ptr) +static bool rna_MeshColorLayer_active_render_get(PointerRNA *ptr) { return rna_CustomDataLayer_active_get(ptr, rna_mesh_fdata(ptr), CD_MCOL, 1); } -static int rna_MeshColorLayer_active_get(PointerRNA *ptr) +static bool rna_MeshColorLayer_active_get(PointerRNA *ptr) { return rna_CustomDataLayer_active_get(ptr, rna_mesh_fdata(ptr), CD_MCOL, 0); } -static void rna_MeshColorLayer_active_render_set(PointerRNA *ptr, int value) +static void rna_MeshColorLayer_active_render_set(PointerRNA *ptr, bool value) { rna_CustomDataLayer_active_set(ptr, rna_mesh_fdata(ptr), value, CD_MCOL, 1); } @@ -1027,22 +1027,22 @@ static int rna_MeshLoopColorLayer_data_length(PointerRNA *ptr) return (me->edit_btmesh) ? 0 : me->totloop; } -static int rna_MeshLoopColorLayer_active_render_get(PointerRNA *ptr) +static bool rna_MeshLoopColorLayer_active_render_get(PointerRNA *ptr) { return rna_CustomDataLayer_active_get(ptr, rna_mesh_ldata(ptr), CD_MLOOPCOL, 1); } -static int rna_MeshLoopColorLayer_active_get(PointerRNA *ptr) +static bool rna_MeshLoopColorLayer_active_get(PointerRNA *ptr) { return rna_CustomDataLayer_active_get(ptr, rna_mesh_ldata(ptr), CD_MLOOPCOL, 0); } -static void rna_MeshLoopColorLayer_active_render_set(PointerRNA *ptr, int value) +static void rna_MeshLoopColorLayer_active_render_set(PointerRNA *ptr, bool value) { rna_CustomDataLayer_active_set(ptr, rna_mesh_ldata(ptr), value, CD_MLOOPCOL, 1); } -static void rna_MeshLoopColorLayer_active_set(PointerRNA *ptr, int value) +static void rna_MeshLoopColorLayer_active_set(PointerRNA *ptr, bool value) { rna_CustomDataLayer_active_set(ptr, rna_mesh_ldata(ptr), value, CD_MLOOPCOL, 0); } @@ -1823,7 +1823,7 @@ static PointerRNA rna_Mesh_tessface_uv_texture_new(struct Mesh *me, ReportList * } -static int rna_Mesh_is_editmode_get(PointerRNA *ptr) +static bool rna_Mesh_is_editmode_get(PointerRNA *ptr) { Mesh *me = rna_mesh(ptr); return (me->edit_btmesh != NULL); diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 07f36b3efff..7025e05d56c 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -158,7 +158,7 @@ static void rna_MetaBall_elements_clear(MetaBall *mb) } } -static int rna_Meta_is_editmode_get(PointerRNA *ptr) +static bool rna_Meta_is_editmode_get(PointerRNA *ptr) { MetaBall *mb = ptr->id.data; return (mb->editelems != NULL); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 27fd02c9be7..902074d8628 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -651,7 +651,7 @@ static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max *max = max_ii(0, mmd->totlvl); /* intentionally _not_ -1 */ } -static int rna_MultiresModifier_external_get(PointerRNA *ptr) +static bool rna_MultiresModifier_external_get(PointerRNA *ptr) { Object *ob = (Object *)ptr->id.data; Mesh *me = ob->data; @@ -700,7 +700,7 @@ static void rna_ShrinkwrapModifier_face_cull_set(struct PointerRNA *ptr, int val (swm->shrinkOpts & ~(MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE | MOD_SHRINKWRAP_CULL_TARGET_BACKFACE)) | value; } -static int rna_MeshDeformModifier_is_bound_get(PointerRNA *ptr) +static bool rna_MeshDeformModifier_is_bound_get(PointerRNA *ptr) { return (((MeshDeformModifierData *)ptr->data)->bindcagecos != NULL); } @@ -775,7 +775,7 @@ static void rna_OceanModifier_ocean_chop_set(PointerRNA *ptr, float value) } } -static int rna_LaplacianDeformModifier_is_bind_get(PointerRNA *ptr) +static bool rna_LaplacianDeformModifier_is_bind_get(PointerRNA *ptr) { LaplacianDeformModifierData *lmd = (LaplacianDeformModifierData *)ptr->data; return ((lmd->flag & MOD_LAPLACIANDEFORM_BIND) && (lmd->cache_system != NULL)); @@ -1129,13 +1129,13 @@ static void rna_CorrectiveSmoothModifier_rest_source_update(Main *bmain, Scene * rna_CorrectiveSmoothModifier_update(bmain, scene, ptr); } -static int rna_CorrectiveSmoothModifier_is_bind_get(PointerRNA *ptr) +static bool rna_CorrectiveSmoothModifier_is_bind_get(PointerRNA *ptr) { CorrectiveSmoothModifierData *csmd = (CorrectiveSmoothModifierData *)ptr->data; return (csmd->bind_coords != NULL); } -static int rna_SurfaceDeformModifier_is_bound_get(PointerRNA *ptr) +static bool rna_SurfaceDeformModifier_is_bound_get(PointerRNA *ptr) { return (((SurfaceDeformModifierData *)ptr->data)->verts != NULL); } diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index d76f2ccf443..09b194d0e1b 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -254,7 +254,7 @@ static void rna_NlaStrip_blend_out_set(PointerRNA *ptr, float value) data->blendout = value; } -static void rna_NlaStrip_use_auto_blend_set(PointerRNA *ptr, int value) +static void rna_NlaStrip_use_auto_blend_set(PointerRNA *ptr, bool value) { NlaStrip *data = (NlaStrip *)ptr->data; @@ -330,7 +330,7 @@ static void rna_NlaStrip_action_end_frame_set(PointerRNA *ptr, float value) BKE_nlastrip_recalculate_bounds(data); } -static void rna_NlaStrip_animated_influence_set(PointerRNA *ptr, int value) +static void rna_NlaStrip_animated_influence_set(PointerRNA *ptr, bool value) { NlaStrip *data = (NlaStrip *)ptr->data; @@ -343,7 +343,7 @@ static void rna_NlaStrip_animated_influence_set(PointerRNA *ptr, int value) data->flag &= ~NLASTRIP_FLAG_USR_INFLUENCE; } -static void rna_NlaStrip_animated_time_set(PointerRNA *ptr, int value) +static void rna_NlaStrip_animated_time_set(PointerRNA *ptr, bool value) { NlaStrip *data = (NlaStrip *)ptr->data; @@ -434,7 +434,7 @@ static void rna_NlaStrip_remove(NlaTrack *track, bContext *C, ReportList *report /* Set the 'solo' setting for the given NLA-track, making sure that it is the only one * that has this status in its AnimData block. */ -static void rna_NlaTrack_solo_set(PointerRNA *ptr, int value) +static void rna_NlaTrack_solo_set(PointerRNA *ptr, bool value) { NlaTrack *data = (NlaTrack *)ptr->data; AnimData *adt = BKE_animdata_from_id(ptr->id.data); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 38e969fedb5..a2ab00a482b 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1086,7 +1086,7 @@ static void rna_NodeTree_interface_update(bNodeTree *ntree, bContext *C) /* ******** NodeLink ******** */ -static int rna_NodeLink_is_hidden_get(PointerRNA *ptr) +static bool rna_NodeLink_is_hidden_get(PointerRNA *ptr) { bNodeLink *link = ptr->data; return nodeLinkIsHidden(link); @@ -1587,7 +1587,7 @@ static void rna_Node_socket_value_update(ID *id, bNode *node, bContext *C) ED_node_tag_update_nodetree(CTX_data_main(C), (bNodeTree *)id, node); } -static void rna_Node_select_set(PointerRNA *ptr, int value) +static void rna_Node_select_set(PointerRNA *ptr, bool value) { bNode *node = (bNode *)ptr->data; nodeSetSelected(node, value); @@ -1957,7 +1957,7 @@ static void rna_NodeSocket_update(Main *bmain, Scene *UNUSED(scene), PointerRNA } } -static int rna_NodeSocket_is_output_get(PointerRNA *ptr) +static bool rna_NodeSocket_is_output_get(PointerRNA *ptr) { bNodeSocket *sock = ptr->data; return sock->in_out == SOCK_OUT; @@ -1969,7 +1969,7 @@ static void rna_NodeSocket_link_limit_set(PointerRNA *ptr, int value) sock->limit = (value == 0 ? 0xFFF : value); } -static void rna_NodeSocket_hide_set(PointerRNA *ptr, int value) +static void rna_NodeSocket_hide_set(PointerRNA *ptr, bool value) { bNodeSocket *sock = (bNodeSocket *)ptr->data; @@ -2687,7 +2687,7 @@ static const EnumPropertyItem *rna_Node_image_layer_itemf(bContext *UNUSED(C), P return item; } -static int rna_Node_image_has_layers_get(PointerRNA *ptr) +static bool rna_Node_image_has_layers_get(PointerRNA *ptr) { bNode *node = (bNode *)ptr->data; Image *ima = (Image *)node->id; @@ -2697,7 +2697,7 @@ static int rna_Node_image_has_layers_get(PointerRNA *ptr) return RE_layers_have_name(ima->rr); } -static int rna_Node_image_has_views_get(PointerRNA *ptr) +static bool rna_Node_image_has_views_get(PointerRNA *ptr) { bNode *node = (bNode *)ptr->data; Image *ima = (Image *)node->id; diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 9b741cf044a..1d62f438047 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1513,7 +1513,7 @@ int rna_DupliObject_index_get(PointerRNA *ptr) return dob->persistent_id[0]; } -int rna_Object_use_dynamic_topology_sculpting_get(PointerRNA *ptr) +bool rna_Object_use_dynamic_topology_sculpting_get(PointerRNA *ptr) { SculptSession *ss = ((Object *)ptr->id.data)->sculpt; return (ss && ss->bm); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 4e51f81fd89..7da859c000c 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -346,52 +346,52 @@ static char *rna_CollisionSettings_path(PointerRNA *UNUSED(ptr)) #endif } -static int rna_SoftBodySettings_use_edges_get(PointerRNA *ptr) +static bool rna_SoftBodySettings_use_edges_get(PointerRNA *ptr) { Object *data = (Object *)(ptr->id.data); return (((data->softflag) & OB_SB_EDGES) != 0); } -static void rna_SoftBodySettings_use_edges_set(PointerRNA *ptr, int value) +static void rna_SoftBodySettings_use_edges_set(PointerRNA *ptr, bool value) { Object *data = (Object *)(ptr->id.data); if (value) data->softflag |= OB_SB_EDGES; else data->softflag &= ~OB_SB_EDGES; } -static int rna_SoftBodySettings_use_goal_get(PointerRNA *ptr) +static bool rna_SoftBodySettings_use_goal_get(PointerRNA *ptr) { Object *data = (Object *)(ptr->id.data); return (((data->softflag) & OB_SB_GOAL) != 0); } -static void rna_SoftBodySettings_use_goal_set(PointerRNA *ptr, int value) +static void rna_SoftBodySettings_use_goal_set(PointerRNA *ptr, bool value) { Object *data = (Object *)(ptr->id.data); if (value) data->softflag |= OB_SB_GOAL; else data->softflag &= ~OB_SB_GOAL; } -static int rna_SoftBodySettings_stiff_quads_get(PointerRNA *ptr) +static bool rna_SoftBodySettings_stiff_quads_get(PointerRNA *ptr) { Object *data = (Object *)(ptr->id.data); return (((data->softflag) & OB_SB_QUADS) != 0); } -static void rna_SoftBodySettings_stiff_quads_set(PointerRNA *ptr, int value) +static void rna_SoftBodySettings_stiff_quads_set(PointerRNA *ptr, bool value) { Object *data = (Object *)(ptr->id.data); if (value) data->softflag |= OB_SB_QUADS; else data->softflag &= ~OB_SB_QUADS; } -static int rna_SoftBodySettings_self_collision_get(PointerRNA *ptr) +static bool rna_SoftBodySettings_self_collision_get(PointerRNA *ptr) { Object *data = (Object *)(ptr->id.data); return (((data->softflag) & OB_SB_SELF) != 0); } -static void rna_SoftBodySettings_self_collision_set(PointerRNA *ptr, int value) +static void rna_SoftBodySettings_self_collision_set(PointerRNA *ptr, bool value) { Object *data = (Object *)(ptr->id.data); if (value) data->softflag |= OB_SB_SELF; @@ -416,26 +416,26 @@ static void rna_SoftBodySettings_new_aero_set(PointerRNA *ptr, int value) data->softflag &= ~OB_SB_AERO_ANGLE; } -static int rna_SoftBodySettings_face_collision_get(PointerRNA *ptr) +static bool rna_SoftBodySettings_face_collision_get(PointerRNA *ptr) { Object *data = (Object *)(ptr->id.data); return (((data->softflag) & OB_SB_FACECOLL) != 0); } -static void rna_SoftBodySettings_face_collision_set(PointerRNA *ptr, int value) +static void rna_SoftBodySettings_face_collision_set(PointerRNA *ptr, bool value) { Object *data = (Object *)(ptr->id.data); if (value) data->softflag |= OB_SB_FACECOLL; else data->softflag &= ~OB_SB_FACECOLL; } -static int rna_SoftBodySettings_edge_collision_get(PointerRNA *ptr) +static bool rna_SoftBodySettings_edge_collision_get(PointerRNA *ptr) { Object *data = (Object *)(ptr->id.data); return (((data->softflag) & OB_SB_EDGECOLL) != 0); } -static void rna_SoftBodySettings_edge_collision_set(PointerRNA *ptr, int value) +static void rna_SoftBodySettings_edge_collision_set(PointerRNA *ptr, bool value) { Object *data = (Object *)(ptr->id.data); if (value) data->softflag |= OB_SB_EDGECOLL; diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index fc8f28f4f2c..a2286f0b92a 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -935,7 +935,7 @@ static float rna_PartSetting_linelenhead_get(struct PointerRNA *ptr) } -static int rna_PartSettings_is_fluid_get(PointerRNA *ptr) +static bool rna_PartSettings_is_fluid_get(PointerRNA *ptr) { ParticleSettings *part = (ParticleSettings *)ptr->data; @@ -1095,19 +1095,19 @@ static char *rna_SPHFluidSettings_path(PointerRNA *ptr) return NULL; } -static int rna_ParticleSystem_multiple_caches_get(PointerRNA *ptr) +static bool rna_ParticleSystem_multiple_caches_get(PointerRNA *ptr) { ParticleSystem *psys = (ParticleSystem *)ptr->data; return (psys->ptcaches.first != psys->ptcaches.last); } -static int rna_ParticleSystem_editable_get(PointerRNA *ptr) +static bool rna_ParticleSystem_editable_get(PointerRNA *ptr) { ParticleSystem *psys = (ParticleSystem *)ptr->data; return psys_check_edited(psys); } -static int rna_ParticleSystem_edited_get(PointerRNA *ptr) +static bool rna_ParticleSystem_edited_get(PointerRNA *ptr) { ParticleSystem *psys = (ParticleSystem *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index a1a026536cf..e06aab8c4cc 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -181,7 +181,7 @@ void rna_ActionGroup_colorset_set(PointerRNA *ptr, int value) } } -int rna_ActionGroup_is_custom_colorset_get(PointerRNA *ptr) +bool rna_ActionGroup_is_custom_colorset_get(PointerRNA *ptr) { bActionGroup *grp = ptr->data; @@ -292,7 +292,7 @@ static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value) ED_armature_bone_rename(G_MAIN, ob->data, oldname, newname); } -static int rna_PoseChannel_has_ik_get(PointerRNA *ptr) +static bool rna_PoseChannel_has_ik_get(PointerRNA *ptr) { Object *ob = (Object *)ptr->id.data; bPoseChannel *pchan = (bPoseChannel *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index df52515934a..e1e9bb30335 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -131,7 +131,7 @@ static void rna_RigidBodyWorld_num_solver_iterations_set(PointerRNA *ptr, int va #endif } -static void rna_RigidBodyWorld_split_impulse_set(PointerRNA *ptr, int value) +static void rna_RigidBodyWorld_split_impulse_set(PointerRNA *ptr, bool value) { RigidBodyWorld *rbw = (RigidBodyWorld *)ptr->data; @@ -194,7 +194,7 @@ static void rna_RigidBodyOb_shape_set(PointerRNA *ptr, int value) rbo->flag |= RBO_FLAG_NEEDS_VALIDATE; } -static void rna_RigidBodyOb_disabled_set(PointerRNA *ptr, int value) +static void rna_RigidBodyOb_disabled_set(PointerRNA *ptr, bool value) { RigidBodyOb *rbo = (RigidBodyOb *)ptr->data; @@ -276,7 +276,7 @@ static void rna_RigidBodyOb_collision_groups_set(PointerRNA *ptr, const bool *va rbo->flag |= RBO_FLAG_NEEDS_VALIDATE; } -static void rna_RigidBodyOb_kinematic_state_set(PointerRNA *ptr, int value) +static void rna_RigidBodyOb_kinematic_state_set(PointerRNA *ptr, bool value) { RigidBodyOb *rbo = (RigidBodyOb *)ptr->data; @@ -292,7 +292,7 @@ static void rna_RigidBodyOb_kinematic_state_set(PointerRNA *ptr, int value) #endif } -static void rna_RigidBodyOb_activation_state_set(PointerRNA *ptr, int value) +static void rna_RigidBodyOb_activation_state_set(PointerRNA *ptr, bool value) { RigidBodyOb *rbo = (RigidBodyOb *)ptr->data; @@ -376,7 +376,7 @@ static void rna_RigidBodyCon_type_set(PointerRNA *ptr, int value) rbc->flag |= RBC_FLAG_NEEDS_VALIDATE; } -static void rna_RigidBodyCon_enabled_set(PointerRNA *ptr, int value) +static void rna_RigidBodyCon_enabled_set(PointerRNA *ptr, bool value) { RigidBodyCon *rbc = (RigidBodyCon *)ptr->data; @@ -389,7 +389,7 @@ static void rna_RigidBodyCon_enabled_set(PointerRNA *ptr, int value) #endif } -static void rna_RigidBodyCon_disable_collisions_set(PointerRNA *ptr, int value) +static void rna_RigidBodyCon_disable_collisions_set(PointerRNA *ptr, bool value) { RigidBodyCon *rbc = (RigidBodyCon *)ptr->data; @@ -398,7 +398,7 @@ static void rna_RigidBodyCon_disable_collisions_set(PointerRNA *ptr, int value) rbc->flag |= RBC_FLAG_NEEDS_VALIDATE; } -static void rna_RigidBodyCon_use_breaking_set(PointerRNA *ptr, int value) +static void rna_RigidBodyCon_use_breaking_set(PointerRNA *ptr, bool value) { RigidBodyCon *rbc = (RigidBodyCon *)ptr->data; @@ -433,7 +433,7 @@ static void rna_RigidBodyCon_breaking_threshold_set(PointerRNA *ptr, float value #endif } -static void rna_RigidBodyCon_override_solver_iterations_set(PointerRNA *ptr, int value) +static void rna_RigidBodyCon_override_solver_iterations_set(PointerRNA *ptr, bool value) { RigidBodyCon *rbc = (RigidBodyCon *)ptr->data; @@ -633,7 +633,7 @@ static void rna_RigidBodyCon_motor_lin_max_impulse_set(PointerRNA *ptr, float va #endif } -static void rna_RigidBodyCon_use_motor_lin_set(PointerRNA *ptr, int value) +static void rna_RigidBodyCon_use_motor_lin_set(PointerRNA *ptr, bool value) { RigidBodyCon *rbc = (RigidBodyCon *)ptr->data; @@ -646,7 +646,7 @@ static void rna_RigidBodyCon_use_motor_lin_set(PointerRNA *ptr, int value) #endif } -static void rna_RigidBodyCon_use_motor_ang_set(PointerRNA *ptr, int value) +static void rna_RigidBodyCon_use_motor_ang_set(PointerRNA *ptr, bool value) { RigidBodyCon *rbc = (RigidBodyCon *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index f158cfaa54c..7eb48272c56 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -570,7 +570,7 @@ static int rna_Property_icon_get(PointerRNA *ptr) return prop->icon; } -static int rna_Property_readonly_get(PointerRNA *ptr) +static bool rna_Property_readonly_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; @@ -581,57 +581,57 @@ static int rna_Property_readonly_get(PointerRNA *ptr) return (prop->flag & PROP_EDITABLE) == 0; } -static int rna_Property_animatable_get(PointerRNA *ptr) +static bool rna_Property_animatable_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag & PROP_ANIMATABLE) != 0; } -static int rna_Property_use_output_get(PointerRNA *ptr) +static bool rna_Property_use_output_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag_parameter & PARM_OUTPUT) != 0; } -static int rna_Property_is_required_get(PointerRNA *ptr) +static bool rna_Property_is_required_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag_parameter & PARM_REQUIRED) != 0; } -static int rna_Property_is_argument_optional_get(PointerRNA *ptr) +static bool rna_Property_is_argument_optional_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag_parameter & PARM_PYFUNC_OPTIONAL) != 0; } -static int rna_Property_is_never_none_get(PointerRNA *ptr) +static bool rna_Property_is_never_none_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag & PROP_NEVER_NULL) != 0; } -static int rna_Property_is_hidden_get(PointerRNA *ptr) +static bool rna_Property_is_hidden_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag & PROP_HIDDEN) != 0; } -static int rna_Property_is_skip_save_get(PointerRNA *ptr) +static bool rna_Property_is_skip_save_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag & PROP_SKIP_SAVE) != 0; } -static int rna_Property_is_enum_flag_get(PointerRNA *ptr) +static bool rna_Property_is_enum_flag_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag & PROP_ENUM_FLAG) != 0; } -static int rna_Property_is_library_editable_flag_get(PointerRNA *ptr) +static bool rna_Property_is_library_editable_flag_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag & PROP_LIB_EXCEPTION) != 0; @@ -688,26 +688,26 @@ static void rna_Property_array_dimensions_get(PointerRNA *ptr, int dimensions[RN } } -static int rna_Property_is_registered_get(PointerRNA *ptr) +static bool rna_Property_is_registered_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag & PROP_REGISTER) != 0; } -static int rna_Property_is_registered_optional_get(PointerRNA *ptr) +static bool rna_Property_is_registered_optional_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag & PROP_REGISTER_OPTIONAL) != 0; } -static int rna_Property_is_runtime_get(PointerRNA *ptr) +static bool rna_Property_is_runtime_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; return (prop->flag_internal & PROP_INTERN_RUNTIME) != 0; } -static int rna_BoolProperty_default_get(PointerRNA *ptr) +static bool rna_BoolProperty_default_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; rna_idproperty_check(&prop, ptr); @@ -730,7 +730,7 @@ static int rna_NumberProperty_default_array_get_length(PointerRNA *ptr, int leng return length[0]; } -static int rna_NumberProperty_is_array_get(PointerRNA *ptr) +static bool rna_NumberProperty_is_array_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; @@ -1035,19 +1035,19 @@ static void rna_Function_parameters_begin(CollectionPropertyIterator *iter, Poin rna_iterator_listbase_begin(iter, &((FunctionRNA *)ptr->data)->cont.properties, rna_property_builtin); } -static int rna_Function_registered_get(PointerRNA *ptr) +static bool rna_Function_registered_get(PointerRNA *ptr) { FunctionRNA *func = (FunctionRNA *)ptr->data; return 0 != (func->flag & FUNC_REGISTER); } -static int rna_Function_registered_optional_get(PointerRNA *ptr) +static bool rna_Function_registered_optional_get(PointerRNA *ptr) { FunctionRNA *func = (FunctionRNA *)ptr->data; return 0 != (func->flag & (FUNC_REGISTER_OPTIONAL & ~FUNC_REGISTER)); } -static int rna_Function_no_self_get(PointerRNA *ptr) +static bool rna_Function_no_self_get(PointerRNA *ptr) { FunctionRNA *func = (FunctionRNA *)ptr->data; return !(func->flag & FUNC_NO_SELF); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 894742fe8fe..3c8cc9ee2be 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -839,7 +839,7 @@ static void rna_Scene_end_frame_set(PointerRNA *ptr, int value) } } -static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value) +static void rna_Scene_use_preview_range_set(PointerRNA *ptr, bool value) { Scene *data = (Scene *)ptr->data; @@ -1059,13 +1059,13 @@ static int rna_RenderSettings_threads_mode_get(PointerRNA *ptr) return (rd->mode & R_FIXED_THREADS); } -static int rna_RenderSettings_is_movie_format_get(PointerRNA *ptr) +static bool rna_RenderSettings_is_movie_format_get(PointerRNA *ptr) { RenderData *rd = (RenderData *)ptr->data; return BKE_imtype_is_movie(rd->im_format.imtype); } -static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr) +static bool rna_RenderSettings_save_buffers_get(PointerRNA *ptr) { RenderData *rd = (RenderData *)ptr->data; Scene *scene = (Scene *)ptr->id.data; @@ -1312,7 +1312,7 @@ static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str) } #ifdef WITH_FFMPEG -static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, int value) +static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, bool value) { Scene *scene = (Scene *) ptr->id.data; RenderData *rd = &scene->r; @@ -1610,24 +1610,24 @@ static void rna_RenderSettings_views_format_set(PointerRNA *ptr, int value) rd->views_format = value; } -static int rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr)) +static bool rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr)) { return (BLI_listbase_count(&R_engines) > 1); } -static int rna_RenderSettings_use_shading_nodes_get(PointerRNA *ptr) +static bool rna_RenderSettings_use_shading_nodes_get(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->id.data; return BKE_scene_use_new_shading_nodes(scene); } -static int rna_RenderSettings_use_spherical_stereo_get(PointerRNA *ptr) +static bool rna_RenderSettings_use_spherical_stereo_get(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->id.data; return BKE_scene_use_spherical_stereo(scene); } -static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr) +static bool rna_RenderSettings_use_game_engine_get(PointerRNA *ptr) { RenderData *rd = (RenderData *)ptr->data; RenderEngineType *type; @@ -1777,13 +1777,13 @@ static void rna_Scene_use_persistent_data_update(Main *UNUSED(bmain), Scene *UNU RE_FreePersistentData(); } -static int rna_Scene_use_audio_get(PointerRNA *ptr) +static bool rna_Scene_use_audio_get(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->data; return (scene->audio.flag & AUDIO_MUTE) != 0; } -static void rna_Scene_use_audio_set(PointerRNA *ptr, int value) +static void rna_Scene_use_audio_set(PointerRNA *ptr, bool value) { Scene *scene = (Scene *)ptr->data; @@ -1820,12 +1820,12 @@ static void rna_Scene_sync_mode_set(PointerRNA *ptr, int value) } } -static int rna_GameSettings_auto_start_get(PointerRNA *UNUSED(ptr)) +static bool rna_GameSettings_auto_start_get(PointerRNA *UNUSED(ptr)) { return (G.fileflags & G_FILE_AUTOPLAY) != 0; } -static void rna_GameSettings_auto_start_set(PointerRNA *UNUSED(ptr), int value) +static void rna_GameSettings_auto_start_set(PointerRNA *UNUSED(ptr), bool value) { if (value) G.fileflags |= G_FILE_AUTOPLAY; @@ -2162,7 +2162,7 @@ static void rna_Stereo3dFormat_update(Main *bmain, Scene *UNUSED(scene), Pointer } } -static int rna_gpu_is_hq_supported_get(PointerRNA *UNUSED(ptr)) +static bool rna_gpu_is_hq_supported_get(PointerRNA *UNUSED(ptr)) { return GPU_instanced_drawing_support() && GPU_geometry_shader_support(); } diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 0b2034b6369..7ca26ab1c9f 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -108,14 +108,14 @@ static void rna_Screen_redraw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), } -static int rna_Screen_is_animation_playing_get(PointerRNA *UNUSED(ptr)) +static bool rna_Screen_is_animation_playing_get(PointerRNA *UNUSED(ptr)) { /* can be NULL on file load, T42619 */ wmWindowManager *wm = G_MAIN->wm.first; return wm ? (ED_screen_animation_playing(wm) != NULL) : 0; } -static int rna_Screen_fullscreen_get(PointerRNA *ptr) +static bool rna_Screen_fullscreen_get(PointerRNA *ptr) { bScreen *sc = (bScreen *)ptr->data; return (sc->state == SCREENMAXIMIZED); diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 890aa532943..c111263cb7d 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -214,7 +214,7 @@ static const EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerR return particle_edit_cache_brush_items; } -static int rna_ParticleEdit_editable_get(PointerRNA *ptr) +static bool rna_ParticleEdit_editable_get(PointerRNA *ptr) { ParticleEditSettings *pset = (ParticleEditSettings *)ptr->data; @@ -224,7 +224,7 @@ static int rna_ParticleEdit_editable_get(PointerRNA *ptr) } return (pset->object && pset->scene && PE_get_current(G_MAIN, pset->scene, pset->object)); } -static int rna_ParticleEdit_hair_get(PointerRNA *ptr) +static bool rna_ParticleEdit_hair_get(PointerRNA *ptr) { ParticleEditSettings *pset = (ParticleEditSettings *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index c992f4dd57d..e04e78f3ac7 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -211,7 +211,7 @@ static void rna_Sensor_keyboard_modifier2_set(struct PointerRNA *ptr, int value) ks->qual2 = 0; } -static void rna_Sensor_tap_set(struct PointerRNA *ptr, int value) +static void rna_Sensor_tap_set(struct PointerRNA *ptr, bool value) { bSensor *sens = (bSensor *)ptr->data; @@ -220,7 +220,7 @@ static void rna_Sensor_tap_set(struct PointerRNA *ptr, int value) sens->level = 0; } -static void rna_Sensor_level_set(struct PointerRNA *ptr, int value) +static void rna_Sensor_level_set(struct PointerRNA *ptr, bool value) { bSensor *sens = (bSensor *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index aa3ab1742aa..e78bce9170d 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -327,13 +327,13 @@ static void rna_Sequence_frame_offset_range(PointerRNA *ptr, int *min, int *max, *max = INT_MAX; } -static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value) +static void rna_Sequence_use_proxy_set(PointerRNA *ptr, bool value) { Sequence *seq = (Sequence *)ptr->data; BKE_sequencer_proxy_set(seq, value != 0); } -static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value) +static void rna_Sequence_use_translation_set(PointerRNA *ptr, bool value) { Sequence *seq = (Sequence *)ptr->data; if (value) { @@ -347,7 +347,7 @@ static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value) } } -static void rna_Sequence_use_crop_set(PointerRNA *ptr, int value) +static void rna_Sequence_use_crop_set(PointerRNA *ptr, bool value) { Sequence *seq = (Sequence *)ptr->data; if (value) { @@ -891,7 +891,7 @@ static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), Scene *UNUSED(s BKE_sequence_invalidate_cache_for_modifier(scene, seq); } -static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value) +static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, bool value) { Scene *scene = ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, false); diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 52550a9b8cc..65e56ddb487 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -429,7 +429,7 @@ static void rna_SmokeFlow_uvlayer_set(PointerRNA *ptr, const char *value) rna_object_uvlayer_name_set(ptr, value, flow->uvlayer_name, sizeof(flow->uvlayer_name)); } -static void rna_Smoke_use_color_ramp_set(PointerRNA *ptr, int value) +static void rna_Smoke_use_color_ramp_set(PointerRNA *ptr, bool value) { SmokeDomainSettings *sds = (SmokeDomainSettings *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c index 6aacede5816..3339c5ec405 100644 --- a/source/blender/makesrna/intern/rna_sound.c +++ b/source/blender/makesrna/intern/rna_sound.c @@ -45,13 +45,13 @@ static void rna_Sound_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) BKE_sound_load(bmain, (bSound *)ptr->data); } -static int rna_Sound_caching_get(PointerRNA *ptr) +static bool rna_Sound_caching_get(PointerRNA *ptr) { bSound *sound = (bSound *)(ptr->data); return (sound->flags & SOUND_FLAGS_CACHING) != 0; } -static void rna_Sound_caching_set(PointerRNA *ptr, const int value) +static void rna_Sound_caching_set(PointerRNA *ptr, const bool value) { bSound *sound = (bSound *)(ptr->data); if (value) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 23ed021b190..813e847aae6 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -367,7 +367,7 @@ static void rna_area_region_from_regiondata(PointerRNA *ptr, ScrArea **r_sa, ARe area_region_from_regiondata(sc, regiondata, r_sa, r_ar); } -static int rna_Space_view2d_sync_get(PointerRNA *ptr) +static bool rna_Space_view2d_sync_get(PointerRNA *ptr) { ScrArea *sa; ARegion *ar; @@ -382,7 +382,7 @@ static int rna_Space_view2d_sync_get(PointerRNA *ptr) return false; } -static void rna_Space_view2d_sync_set(PointerRNA *ptr, int value) +static void rna_Space_view2d_sync_set(PointerRNA *ptr, bool value) { ScrArea *sa; ARegion *ar; @@ -477,7 +477,7 @@ static void rna_SpaceView3D_camera_update(Main *bmain, Scene *scene, PointerRNA } } -static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, int value) +static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, bool value) { View3D *v3d = (View3D *)(ptr->data); bScreen *sc = (bScreen *)ptr->id.data; @@ -786,7 +786,7 @@ static void rna_SpaceImageEditor_show_stereo_set(PointerRNA *ptr, int value) sima->iuser.flag &= ~IMA_SHOW_STEREO; } -static int rna_SpaceImageEditor_show_stereo_get(PointerRNA *ptr) +static bool rna_SpaceImageEditor_show_stereo_get(PointerRNA *ptr) { SpaceImage *sima = (SpaceImage *)(ptr->data); return (sima->iuser.flag & IMA_SHOW_STEREO) != 0; @@ -807,26 +807,26 @@ static void rna_SpaceImageEditor_show_stereo_update(Main *UNUSED(bmain), Scene * } } -static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr) +static bool rna_SpaceImageEditor_show_render_get(PointerRNA *ptr) { SpaceImage *sima = (SpaceImage *)(ptr->data); return ED_space_image_show_render(sima); } -static int rna_SpaceImageEditor_show_paint_get(PointerRNA *ptr) +static bool rna_SpaceImageEditor_show_paint_get(PointerRNA *ptr) { SpaceImage *sima = (SpaceImage *)(ptr->data); return ED_space_image_show_paint(sima); } -static int rna_SpaceImageEditor_show_uvedit_get(PointerRNA *ptr) +static bool rna_SpaceImageEditor_show_uvedit_get(PointerRNA *ptr) { SpaceImage *sima = (SpaceImage *)(ptr->data); bScreen *sc = (bScreen *)ptr->id.data; return ED_space_image_show_uvedit(sima, sc->scene->obedit); } -static int rna_SpaceImageEditor_show_maskedit_get(PointerRNA *ptr) +static bool rna_SpaceImageEditor_show_maskedit_get(PointerRNA *ptr) { SpaceImage *sima = (SpaceImage *)(ptr->data); bScreen *sc = (bScreen *)ptr->id.data; @@ -993,7 +993,7 @@ static const EnumPropertyItem *rna_SpaceImageEditor_pivot_itemf(bContext *UNUSED /* Space Text Editor */ -static void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, int value) +static void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, bool value) { SpaceText *st = (SpaceText *)(ptr->data); @@ -1400,7 +1400,7 @@ static void rna_SpaceGraphEditor_display_mode_update(Main *UNUSED(bmain), Scene ED_area_tag_refresh(sa); } -static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr) +static bool rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr) { SpaceIpo *sipo = (SpaceIpo *)(ptr->data); return (BLI_listbase_is_empty(&sipo->ghostCurves) == false); @@ -1606,7 +1606,7 @@ static void rna_SpaceClipEditor_view_type_update(Main *UNUSED(bmain), Scene *UNU /* File browser. */ -static int rna_FileSelectParams_use_lib_get(PointerRNA *ptr) +static bool rna_FileSelectParams_use_lib_get(PointerRNA *ptr) { FileSelectParams *params = ptr->data; diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c index 1035a3f7f55..191c3355176 100644 --- a/source/blender/makesrna/intern/rna_text.c +++ b/source/blender/makesrna/intern/rna_text.c @@ -73,7 +73,7 @@ static void rna_Text_filename_set(PointerRNA *ptr, const char *value) text->name = NULL; } -static int rna_Text_modified_get(PointerRNA *ptr) +static bool rna_Text_modified_get(PointerRNA *ptr) { Text *text = (Text *)ptr->data; return BKE_text_file_modified_check(text) != 0; diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index b20f489af55..b2271c3903d 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -397,7 +397,7 @@ static const EnumPropertyItem *rna_TextureSlot_output_node_itemf( return item; } -static void rna_Texture_use_color_ramp_set(PointerRNA *ptr, int value) +static void rna_Texture_use_color_ramp_set(PointerRNA *ptr, bool value) { Tex *tex = (Tex *)ptr->data; @@ -422,7 +422,7 @@ static void rna_Texture_use_nodes_update(bContext *C, PointerRNA *ptr) rna_Texture_nodes_update(CTX_data_main(C), CTX_data_scene(C), ptr); } -static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, int value) +static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, bool value) { Tex *tex = (Tex *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 0f7ebcc544f..deb40070fe9 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -208,14 +208,14 @@ static void rna_trackingTrack_name_set(PointerRNA *ptr, const char *value) } } -static int rna_trackingTrack_select_get(PointerRNA *ptr) +static bool rna_trackingTrack_select_get(PointerRNA *ptr) { MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data; return TRACK_SELECTED(track); } -static void rna_trackingTrack_select_set(PointerRNA *ptr, int value) +static void rna_trackingTrack_select_set(PointerRNA *ptr, bool value) { MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 840fe86ea04..782d39bcb7e 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -797,22 +797,22 @@ static void rna_Menu_bl_description_set(PointerRNA *ptr, const char *value) /* UILayout */ -static int rna_UILayout_active_get(PointerRNA *ptr) +static bool rna_UILayout_active_get(PointerRNA *ptr) { return uiLayoutGetActive(ptr->data); } -static void rna_UILayout_active_set(PointerRNA *ptr, int value) +static void rna_UILayout_active_set(PointerRNA *ptr, bool value) { uiLayoutSetActive(ptr->data, value); } -static int rna_UILayout_alert_get(PointerRNA *ptr) +static bool rna_UILayout_alert_get(PointerRNA *ptr) { return uiLayoutGetRedAlert(ptr->data); } -static void rna_UILayout_alert_set(PointerRNA *ptr, int value) +static void rna_UILayout_alert_set(PointerRNA *ptr, bool value) { uiLayoutSetRedAlert(ptr->data, value); } @@ -827,12 +827,12 @@ static int rna_UILayout_op_context_get(PointerRNA *ptr) return uiLayoutGetOperatorContext(ptr->data); } -static int rna_UILayout_enabled_get(PointerRNA *ptr) +static bool rna_UILayout_enabled_get(PointerRNA *ptr) { return uiLayoutGetEnabled(ptr->data); } -static void rna_UILayout_enabled_set(PointerRNA *ptr, int value) +static void rna_UILayout_enabled_set(PointerRNA *ptr, bool value) { uiLayoutSetEnabled(ptr->data, value); } @@ -843,12 +843,12 @@ static int rna_UILayout_red_alert_get(PointerRNA *ptr) return uiLayoutGetRedAlert(ptr->data); } -static void rna_UILayout_red_alert_set(PointerRNA *ptr, int value) +static void rna_UILayout_red_alert_set(PointerRNA *ptr, bool value) { uiLayoutSetRedAlert(ptr->data, value); } -static int rna_UILayout_keep_aspect_get(PointerRNA *ptr) +static bool rna_UILayout_keep_aspect_get(PointerRNA *ptr) { return uiLayoutGetKeepAspect(ptr->data); } diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 44e01cf8d44..8930c144f17 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -518,7 +518,7 @@ static int rna_Operator_name_length(PointerRNA *ptr) return strlen(op->type->name); } -static int rna_Operator_has_reports_get(PointerRNA *ptr) +static bool rna_Operator_has_reports_get(PointerRNA *ptr) { wmOperator *op = (wmOperator *)ptr->data; return (op->reports && op->reports->list.first); @@ -590,7 +590,7 @@ static float rna_Event_pressure_get(PointerRNA *ptr) return WM_event_tablet_data(event, NULL, NULL); } -static int rna_Event_is_tablet_get(PointerRNA *ptr) +static bool rna_Event_is_tablet_get(PointerRNA *ptr) { const wmEvent *event = ptr->data; return WM_event_is_tablet(event); @@ -785,7 +785,7 @@ static const EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, Point return rna_enum_keymap_propvalue_items; /* ERROR */ } -static int rna_KeyMapItem_any_get(PointerRNA *ptr) +static bool rna_KeyMapItem_any_get(PointerRNA *ptr) { wmKeyMapItem *kmi = (wmKeyMapItem *)ptr->data; @@ -801,7 +801,7 @@ static int rna_KeyMapItem_any_get(PointerRNA *ptr) } } -static void rna_KeyMapItem_any_set(PointerRNA *ptr, int value) +static void rna_KeyMapItem_any_set(PointerRNA *ptr, bool value) { wmKeyMapItem *kmi = (wmKeyMapItem *)ptr->data; @@ -813,25 +813,25 @@ static void rna_KeyMapItem_any_set(PointerRNA *ptr, int value) } } -static int rna_KeyMapItem_shift_get(PointerRNA *ptr) +static bool rna_KeyMapItem_shift_get(PointerRNA *ptr) { wmKeyMapItem *kmi = (wmKeyMapItem *)ptr->data; return kmi->shift != 0; } -static int rna_KeyMapItem_ctrl_get(PointerRNA *ptr) +static bool rna_KeyMapItem_ctrl_get(PointerRNA *ptr) { wmKeyMapItem *kmi = (wmKeyMapItem *)ptr->data; return kmi->ctrl != 0; } -static int rna_KeyMapItem_alt_get(PointerRNA *ptr) +static bool rna_KeyMapItem_alt_get(PointerRNA *ptr) { wmKeyMapItem *kmi = (wmKeyMapItem *)ptr->data; return kmi->alt != 0; } -static int rna_KeyMapItem_oskey_get(PointerRNA *ptr) +static bool rna_KeyMapItem_oskey_get(PointerRNA *ptr) { wmKeyMapItem *kmi = (wmKeyMapItem *)ptr->data; return kmi->oskey != 0; @@ -902,7 +902,7 @@ static int rna_wmKeyMapItem_name_length(PointerRNA *ptr) return strlen(ot ? RNA_struct_ui_name(ot->srna) : kmi->idname); } -static int rna_KeyMapItem_userdefined_get(PointerRNA *ptr) +static bool rna_KeyMapItem_userdefined_get(PointerRNA *ptr) { wmKeyMapItem *kmi = ptr->data; return kmi->id < 0; |