Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_utils.c
| Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | bool ED_object_calc_active_center_for_editmode(Object *obedit, | ||||
| return false; | return false; | ||||
| } | } | ||||
| bool ED_object_calc_active_center_for_posemode(Object *ob, | bool ED_object_calc_active_center_for_posemode(Object *ob, | ||||
| const bool select_only, | const bool select_only, | ||||
| float r_center[3]) | float r_center[3]) | ||||
| { | { | ||||
| bPoseChannel *pchan = BKE_pose_channel_active(ob); | bPoseChannel *pchan = BKE_pose_channel_active_if_layer_visible(ob); | ||||
| if (pchan && (!select_only || (pchan->bone->flag & BONE_SELECTED))) { | if (pchan && (!select_only || (pchan->bone->flag & BONE_SELECTED))) { | ||||
| copy_v3_v3(r_center, pchan->pose_head); | copy_v3_v3(r_center, pchan->pose_head); | ||||
| return true; | return true; | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| bool ED_object_calc_active_center(Object *ob, const bool select_only, float r_center[3]) | bool ED_object_calc_active_center(Object *ob, const bool select_only, float r_center[3]) | ||||
| ▲ Show 20 Lines • Show All 370 Lines • Show Last 20 Lines | |||||