RNA: use 0/1 for pose layer operator

This commit is contained in:
Campbell Barton 2015-02-24 07:43:04 +11:00
parent 225f68c324
commit 4f86f62f32

@ -853,7 +853,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] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
int 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)
@ -862,8 +862,7 @@ static int pose_bone_layers_invoke(bContext *C, wmOperator *op, const wmEvent *e
/* loop over the bits for this pchan's layers, adding layers where they're needed */
for (bit = 0; bit < 32; bit++) {
if (pchan->bone->layer & (1 << bit))
layers[bit] = 1;
layers[bit] = (pchan->bone->layer & (1 << bit)) != 0;
}
}
CTX_DATA_END;