From ddee0931b8687d01186f1941d483c6b3622d1833 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 1 Jul 2018 15:47:09 +0200 Subject: RNA: use bool for boolean RNA types We were using int's for bool arguments in BKE, just to avoid having wrapper functions. --- source/blender/editors/armature/pose_edit.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 69ee30fa7f6..becda3e452e 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -793,7 +793,7 @@ static int pose_armature_layers_showall_exec(bContext *C, wmOperator *op) bArmature *arm = armature_layers_get_data(&ob); PointerRNA ptr; int maxLayers = (RNA_boolean_get(op->ptr, "all")) ? 32 : 16; - int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ + bool layers[32] = {false}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ int i; /* sanity checking */ @@ -844,7 +844,7 @@ static int armature_layers_invoke(bContext *C, wmOperator *op, const wmEvent *ev Object *ob = CTX_data_active_object(C); bArmature *arm = armature_layers_get_data(&ob); PointerRNA ptr; - int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ + bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ /* sanity checking */ if (arm == NULL) @@ -865,7 +865,7 @@ static int armature_layers_exec(bContext *C, wmOperator *op) Object *ob = CTX_data_active_object(C); bArmature *arm = armature_layers_get_data(&ob); PointerRNA ptr; - int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ + bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ if (arm == NULL) { return OPERATOR_CANCELLED; @@ -908,7 +908,7 @@ void ARMATURE_OT_armature_layers(wmOperatorType *ot) /* Present a popup to get the layers that should be used */ static int pose_bone_layers_invoke(bContext *C, wmOperator *op, const wmEvent *event) { - int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ + bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ /* get layers that are active already */ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) @@ -934,7 +934,7 @@ static int pose_bone_layers_exec(bContext *C, wmOperator *op) { Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); PointerRNA ptr; - int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ + bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ if (ob == NULL || ob->data == NULL) { return OPERATOR_CANCELLED; @@ -982,7 +982,7 @@ void POSE_OT_bone_layers(wmOperatorType *ot) /* Present a popup to get the layers that should be used */ static int armature_bone_layers_invoke(bContext *C, wmOperator *op, const wmEvent *event) { - int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ + bool layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ /* get layers that are active already */ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) @@ -1011,7 +1011,7 @@ static int armature_bone_layers_exec(bContext *C, wmOperator *op) Object *ob = CTX_data_edit_object(C); bArmature *arm = (ob) ? ob->data : NULL; PointerRNA ptr; - int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ + bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ /* get the values set in the operator properties */ RNA_boolean_get_array(op->ptr, "layers", layers); -- cgit v1.2.3