Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/pose_select.c
| Show First 20 Lines • Show All 740 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); | Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); | ||||
| bArmature *arm = ob->data; | bArmature *arm = ob->data; | ||||
| bPoseChannel *pchan_act; | bPoseChannel *pchan_act; | ||||
| int direction = RNA_enum_get(op->ptr, "direction"); | int direction = RNA_enum_get(op->ptr, "direction"); | ||||
| const bool add_to_sel = RNA_boolean_get(op->ptr, "extend"); | const bool add_to_sel = RNA_boolean_get(op->ptr, "extend"); | ||||
| bool changed = false; | bool changed = false; | ||||
| pchan_act = BKE_pose_channel_active(ob); | pchan_act = BKE_pose_channel_active_if_layer_visible(ob); | ||||
| if (pchan_act == NULL) { | if (pchan_act == NULL) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (direction == BONE_SELECT_PARENT) { | if (direction == BONE_SELECT_PARENT) { | ||||
| if (pchan_act->parent) { | if (pchan_act->parent) { | ||||
| Bone *bone_parent; | Bone *bone_parent; | ||||
| bone_parent = pchan_act->parent->bone; | bone_parent = pchan_act->parent->bone; | ||||
| ▲ Show 20 Lines • Show All 530 Lines • Show Last 20 Lines | |||||