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/editors/transform
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/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c10
-rw-r--r--source/blender/editors/transform/transform_manipulator.c2
-rw-r--r--source/blender/editors/transform/transform_ops.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 6fe20c359a8..a7bf9612fbb 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1887,7 +1887,7 @@ static void drawTransformPixel(const struct bContext *UNUSED(C), ARegion *ar, vo
void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
{
ToolSettings *ts = CTX_data_tool_settings(C);
- int constraint_axis[3] = {0, 0, 0};
+ bool constraint_axis[3] = {false, false, false};
int proportional = 0;
PropertyRNA *prop;
@@ -2004,13 +2004,13 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
if (t->con.mode & CON_APPLY) {
if (t->con.mode & CON_AXIS0) {
- constraint_axis[0] = 1;
+ constraint_axis[0] = true;
}
if (t->con.mode & CON_AXIS1) {
- constraint_axis[1] = 1;
+ constraint_axis[1] = true;
}
if (t->con.mode & CON_AXIS2) {
- constraint_axis[2] = 1;
+ constraint_axis[2] = true;
}
}
@@ -2313,7 +2313,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
/* Constraint init from operator */
if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis")) && RNA_property_is_set(op->ptr, prop)) {
- int constraint_axis[3];
+ bool constraint_axis[3];
RNA_property_boolean_get_array(op->ptr, prop, constraint_axis);
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 9f05cf1324a..79785f982c8 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -1849,7 +1849,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op)
ScrArea *sa = CTX_wm_area(C);
View3D *v3d = sa->spacedata.first;
ARegion *ar = CTX_wm_region(C);
- int constraint_axis[3] = {0, 0, 0};
+ bool constraint_axis[3] = {false, false, false};
int val;
const bool use_planar = RNA_boolean_get(op->ptr, "use_planar_constraint");
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 885d26a63cd..56d6983f581 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -305,7 +305,7 @@ static void transformops_loopsel_hack(bContext *C, wmOperator *op)
if (op->opm && op->opm->opm && op->opm->opm->prev) {
wmOperator *op_prev = op->opm->opm->prev;
Scene *scene = CTX_data_scene(C);
- int mesh_select_mode[3];
+ bool mesh_select_mode[3];
PropertyRNA *prop = RNA_struct_find_property(op_prev->ptr, "mesh_select_mode_init");
if (prop && RNA_property_is_set(op_prev->ptr, prop)) {