Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-01 16:47:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-01 16:57:59 +0300
commitddee0931b8687d01186f1941d483c6b3622d1833 (patch)
treeafc6e71c703bc1bd7a941e7d3f2e4617f0be27e6 /source/blender/makesrna/intern/rna_object_api.c
parent3ec6f2172d890972b46c26a72dd30122b697c101 (diff)
RNA: use bool for boolean RNA types
We were using int's for bool arguments in BKE, just to avoid having wrapper functions.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 6131b7adac8..2acda5985e1 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -141,7 +141,7 @@ static void rna_Object_camera_fit_coords(
/* settings: 0 - preview, 1 - render */
static Mesh *rna_Object_to_mesh(
Object *ob, Main *bmain, ReportList *reports, Scene *sce,
- int apply_modifiers, int settings, int calc_tessface, int calc_undeformed)
+ bool apply_modifiers, int settings, bool calc_tessface, bool calc_undeformed)
{
return rna_Main_meshes_new_from_object(bmain, reports, sce, ob, apply_modifiers, settings, calc_tessface, calc_undeformed);
}
@@ -226,7 +226,7 @@ static void rna_Object_free_duplilist(Object *ob)
}
static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList *reports,
- const char *name, int from_mix)
+ const char *name, bool from_mix)
{
Main *bmain = CTX_data_main(C);
KeyBlock *kb = NULL;
@@ -268,7 +268,7 @@ static void rna_Object_shape_key_remove(
RNA_POINTER_INVALIDATE(kb_ptr);
}
-static int rna_Object_is_visible(Object *ob, Scene *sce)
+static bool rna_Object_is_visible(Object *ob, Scene *sce)
{
return !(ob->restrictflag & OB_RESTRICT_VIEW) && (ob->lay & sce->lay);
}
@@ -320,7 +320,7 @@ static int dm_looptri_to_poly_index(DerivedMesh *dm, const MLoopTri *lt)
static void rna_Object_ray_cast(
Object *ob, ReportList *reports,
float origin[3], float direction[3], float distance,
- int *r_success, float r_location[3], float r_normal[3], int *r_index)
+ bool *r_success, float r_location[3], float r_normal[3], int *r_index)
{
bool success = false;
@@ -375,7 +375,7 @@ static void rna_Object_ray_cast(
static void rna_Object_closest_point_on_mesh(
Object *ob, ReportList *reports, float origin[3], float distance,
- int *r_success, float r_location[3], float r_normal[3], int *r_index)
+ bool *r_success, float r_location[3], float r_normal[3], int *r_index)
{
BVHTreeFromMesh treeData = {NULL};
@@ -427,12 +427,12 @@ static void rna_ObjectBase_layers_from_view(Base *base, View3D *v3d)
base->lay = base->object->lay = v3d->lay;
}
-static int rna_Object_is_modified(Object *ob, Scene *scene, int settings)
+static bool rna_Object_is_modified(Object *ob, Scene *scene, int settings)
{
return BKE_object_is_modified(scene, ob) & settings;
}
-static int rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings)
+static bool rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings)
{
return BKE_object_is_deform_modified(scene, ob) & settings;
}
@@ -475,7 +475,7 @@ void rna_Object_dm_info(struct Object *ob, int type, char *result)
}
#endif /* NDEBUG */
-static int rna_Object_update_from_editmode(Object *ob, Main *bmain)
+static bool rna_Object_update_from_editmode(Object *ob, Main *bmain)
{
return ED_object_editmode_load(bmain, ob);
}