diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 16:47:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 16:57:59 +0300 |
commit | ddee0931b8687d01186f1941d483c6b3622d1833 (patch) | |
tree | afc6e71c703bc1bd7a941e7d3f2e4617f0be27e6 /source/blender/editors/transform/transform.c | |
parent | 3ec6f2172d890972b46c26a72dd30122b697c101 (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/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 10 |
1 files changed, 5 insertions, 5 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); |