From 57218638052c72d1e25f3201c8356d11bd690834 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 19 Feb 2015 12:33:14 +1100 Subject: RNA: pass only 0/1 to RNA_property_boolean_set --- source/blender/editors/object/object_bake_api.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 1ce5068c4b1..97cb45daae3 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -1214,7 +1214,7 @@ static void bake_set_props(wmOperator *op, Scene *scene) prop = RNA_struct_find_property(op->ptr, "use_selected_to_active"); if (!RNA_property_is_set(op->ptr, prop)) { - RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_TO_ACTIVE)); + RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_TO_ACTIVE) != 0); } prop = RNA_struct_find_property(op->ptr, "cage_extrusion"); @@ -1254,22 +1254,22 @@ static void bake_set_props(wmOperator *op, Scene *scene) prop = RNA_struct_find_property(op->ptr, "use_clear"); if (!RNA_property_is_set(op->ptr, prop)) { - RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_CLEAR)); + RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_CLEAR) != 0); } prop = RNA_struct_find_property(op->ptr, "use_cage"); if (!RNA_property_is_set(op->ptr, prop)) { - RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_CAGE)); + RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_CAGE) != 0); } prop = RNA_struct_find_property(op->ptr, "use_split_materials"); if (!RNA_property_is_set(op->ptr, prop)) { - RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_SPLIT_MAT)); + RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_SPLIT_MAT) != 0); } prop = RNA_struct_find_property(op->ptr, "use_automatic_name"); if (!RNA_property_is_set(op->ptr, prop)) { - RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_AUTO_NAME)); + RNA_property_boolean_set(op->ptr, prop, (bake->flag & R_BAKE_AUTO_NAME) != 0); } } -- cgit v1.2.3