Blender
V3.3
|
Go to the source code of this file.
Macros | |
#define | BONESEL_ROOT (1u << 29) |
#define | BONESEL_TIP (1u << 30) |
#define | BONESEL_BONE (1u << 31) |
#define | BONESEL_ANY (BONESEL_TIP | BONESEL_ROOT | BONESEL_BONE) |
#define | EBONE_VISIBLE(arm, ebone) |
#define | EBONE_SELECTABLE(arm, ebone) (EBONE_VISIBLE(arm, ebone) && !((ebone)->flag & BONE_UNSELECTABLE)) |
#define | EBONE_EDITABLE(ebone) |
#define | BONE_SELECT_PARENT 0 |
#define | BONE_SELECT_CHILD 1 |
#define | ARM_GROUPS_NAME 1 |
#define | ARM_GROUPS_ENVELOPE 2 |
#define | ARM_GROUPS_AUTO 3 |
Typedefs | |
typedef enum ePosePathCalcRange | ePosePathCalcRange |
Enumerations | |
enum | ePosePathCalcRange { POSE_PATH_CALC_RANGE_CURRENT_FRAME , POSE_PATH_CALC_RANGE_CHANGED , POSE_PATH_CALC_RANGE_FULL } |
#define ARM_GROUPS_AUTO 3 |
Definition at line 200 of file ED_armature.h.
#define ARM_GROUPS_ENVELOPE 2 |
Definition at line 199 of file ED_armature.h.
#define ARM_GROUPS_NAME 1 |
Definition at line 198 of file ED_armature.h.
#define BONE_SELECT_CHILD 1 |
Definition at line 62 of file ED_armature.h.
#define BONE_SELECT_PARENT 0 |
Definition at line 61 of file ED_armature.h.
#define BONESEL_ANY (BONESEL_TIP | BONESEL_ROOT | BONESEL_BONE) |
Definition at line 44 of file ED_armature.h.
#define BONESEL_BONE (1u << 31) |
Definition at line 43 of file ED_armature.h.
#define BONESEL_ROOT (1u << 29) |
Definition at line 41 of file ED_armature.h.
#define BONESEL_TIP (1u << 30) |
Definition at line 42 of file ED_armature.h.
#define EBONE_EDITABLE | ( | ebone | ) |
Definition at line 55 of file ED_armature.h.
#define EBONE_SELECTABLE | ( | arm, | |
ebone | |||
) | (EBONE_VISIBLE(arm, ebone) && !((ebone)->flag & BONE_UNSELECTABLE)) |
Definition at line 52 of file ED_armature.h.
#define EBONE_VISIBLE | ( | arm, | |
ebone | |||
) |
Definition at line 47 of file ED_armature.h.
typedef enum ePosePathCalcRange ePosePathCalcRange |
Corresponds to eAnimvizCalcRange.
enum ePosePathCalcRange |
Corresponds to eAnimvizCalcRange.
Enumerator | |
---|---|
POSE_PATH_CALC_RANGE_CURRENT_FRAME | |
POSE_PATH_CALC_RANGE_CHANGED | |
POSE_PATH_CALC_RANGE_FULL |
Definition at line 294 of file ED_armature.h.
struct Base* ED_armature_base_and_bone_from_select_buffer | ( | struct Base ** | bases, |
uint | bases_len, | ||
unsigned int | select_id, | ||
struct Bone ** | r_bone | ||
) |
For callers that don't need the pose channel.
Definition at line 128 of file armature_select.c.
References bPoseChannel::bone, ED_armature_base_and_pchan_from_select_buffer(), and NULL.
Referenced by do_pose_box_select().
struct Base* ED_armature_base_and_ebone_from_select_buffer | ( | struct Base ** | bases, |
uint | bases_len, | ||
unsigned int | select_id, | ||
struct EditBone ** | r_ebone | ||
) |
Definition at line 54 of file armature_select.c.
References BLI_findlink(), BONESEL_ANY, Object::data, bArmature::edbo, NULL, and Base::object.
Referenced by do_armature_box_select(), ed_armature_pick_bone_from_selectbuffer_impl(), and get_nearest_editbonepoint().
struct Base* ED_armature_base_and_pchan_from_select_buffer | ( | struct Base ** | bases, |
uint | bases_len, | ||
unsigned int | select_id, | ||
struct bPoseChannel ** | r_pchan | ||
) |
Definition at line 102 of file armature_select.c.
References BLI_findlink(), BONESEL_ANY, bPose::chanbase, NULL, Base::object, and Object::pose.
Referenced by do_object_box_select(), ED_armature_base_and_bone_from_select_buffer(), and ed_armature_pick_bone_from_selectbuffer_impl().
void ED_armature_bone_rename | ( | struct Main * | bmain, |
struct bArmature * | arm, | ||
const char * | oldnamep, | ||
const char * | newnamep | ||
) |
Bone Rename (called by UI for renaming a bone). Seems messy, but that's what you get with not using pointers but channel names :).
Definition at line 136 of file armature_naming.c.
References blender::compositor::area(), bScreen::areabase, BKE_animdata_fix_paths_rename_all(), BKE_armature_find_bone_name(), BKE_modifiers_uses_armature(), BKE_object_defgroup_find_name(), BKE_object_supports_vertex_groups(), BKE_pose_channel_find_name(), BKE_pose_channels_is_valid(), BLI_assert, BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_remove(), BLI_strncpy(), UVWarpModifierData::bone_dst, UVWarpModifierData::bone_src, bArmature::bonehash, bPose::chanbase, bPose::chanhash, constraint_bone_name_fix(), bPoseChannel::constraints, Object::constraints, Object::data, DEG_id_tag_update(), Camera::dof, ed_armature_bone_unique_name(), ED_armature_ebone_find_name(), ED_armature_ebone_unique_name(), bArmature::edbo, eGpencilModifierType_Armature, eGpencilModifierType_Hook, eModifierType_Hook, eModifierType_UVWarp, ListBase::first, CameraDOFSettings::focus_object, CameraDOFSettings::focus_subtarget, Object::greasepencil_modifiers, bArmature::id, Camera::id, Object::id, bScreen::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, if(), bGPdata::layers, LISTBASE_FOREACH, MAXBONENAME, Object::modifiers, EditBone::name, bPoseChannel::name, Bone::name, bDeformGroup::name, bPoseChannel::next, ID::next, ModifierData::next, SpaceLink::next, NULL, OB_CAMERA, View3D::ob_center, View3D::ob_center_bone, OB_GPENCIL, HookGpencilModifierData::object, ArmatureGpencilModifierData::object, HookModifierData::object, UVWarpModifierData::object_dst, UVWarpModifierData::object_src, Main::objects, PARBONE, Object::parent, Object::parsubstr, Object::partype, Object::pose, Main::screens, SPACE_VIEW3D, SpaceLink::spacetype, STREQ, STREQLEN, HookGpencilModifierData::subtarget, HookModifierData::subtarget, ModifierData::type, and Object::type.
Referenced by armature_autoside_names_exec(), ED_armature_bones_flip_names(), namebutton_fn(), and pose_autoside_names_exec().
void ED_armature_bones_flip_names | ( | struct Main * | bmain, |
struct bArmature * | arm, | ||
struct ListBase * | bones_names, | ||
bool | do_strip_numbers | ||
) |
Renames (by flipping) all selected bones at once.
This way if we are flipping related bones (e.g., Bone.L, Bone.R) at the same time all the bones are safely renamed, without conflicting with each other.
arm | Armature the bones belong to |
bones_names | List of bone conflict elements (LinkData pointing to names). |
do_strip_numbers | if set, try to get rid of dot-numbers at end of bone names. |
Definition at line 385 of file armature_naming.c.
References BLI_addtail(), BLI_string_flip_side_name(), BLI_strncpy(), ED_armature_bone_rename(), ListBase::first, LISTBASE_FOREACH, MAXBONENAME, BoneFlipNameData::name, BoneFlipNameData::name_flip, BoneFlipNameData::next, NULL, and STREQ.
Referenced by armature_flip_names_exec(), and pose_flip_names_exec().
Default bone add, returns it selected, but without tail set.
Definition at line 51 of file armature_add.c.
References BLI_addtail(), BLI_strncpy(), BONE_TIPSEL, copy_v3_fl(), EditBone::curve_in_x, EditBone::curve_in_z, EditBone::curve_out_x, EditBone::curve_out_z, EditBone::dist, EditBone::ease1, EditBone::ease2, ED_armature_ebone_unique_name(), bArmature::edbo, EditBone::flag, EditBone::layer, bArmature::layer, MEM_callocN, EditBone::name, NULL, EditBone::rad_head, EditBone::rad_tail, EditBone::roll1, EditBone::roll2, EditBone::scale_in, EditBone::scale_out, EditBone::segments, EditBone::weight, EditBone::xwidth, and EditBone::zwidth.
Referenced by add_points_bone(), armature_bone_primitive_add_exec(), armature_click_extrude_exec(), ED_armature_ebone_add_primitive(), modifier_skin_armature_create(), and skin_armature_bone_create().
struct EditBone* ED_armature_ebone_add_primitive | ( | struct Object * | obedit_arm, |
float | length, | ||
bool | view_aligned | ||
) |
Definition at line 86 of file armature_add.c.
References bArmature::act_edbone, Object::data, ED_armature_ebone_add(), ED_armature_edit_deselect_all(), EditBone::head, blender::math::length(), EditBone::tail, and zero_v3().
Referenced by object_armature_add_exec().
Return a pointer to the bone of the given name
struct EditBone* ED_armature_ebone_find_shared_parent | ( | struct EditBone * | ebone_child[], |
unsigned int | ebone_child_tot | ||
) |
Finds the first parent shared by ebone_child
ebone_child | Children bones to search |
ebone_child_tot | Size of the ebone_child array |
Definition at line 174 of file armature_utils.c.
References EBONE_TEMP_UINT, NULL, and EditBone::parent.
Referenced by armature_shortest_path_pick_invoke().
Definition at line 236 of file armature_utils.c.
References EditBone::head, len, len_v3v3(), madd_v3_v3v3fl(), mat3_to_vec_roll(), EditBone::roll, and EditBone::tail.
Referenced by ED_armature_ebone_from_mat4().
Definition at line 247 of file armature_utils.c.
References add_v3_v3(), BLI_ASSERT_UNIT_M3, copy_m3_m4(), copy_v3_v3(), ED_armature_ebone_from_mat3(), EditBone::head, sub_v3_v3(), and EditBone::tail.
struct EditBone* ED_armature_ebone_get_mirrored | ( | const struct ListBase * | edbo, |
struct EditBone * | ebo | ||
) |
bool ED_armature_ebone_is_child_recursive | ( | struct EditBone * | ebone_parent, |
struct EditBone * | ebone_child | ||
) |
Definition at line 164 of file armature_utils.c.
References EditBone::parent.
Referenced by armature_shortest_path_pick_invoke(), do_outliner_ebone_select_recursive(), and restrictbutton_recursive_ebone().
void ED_armature_ebone_listbase_copy | ( | struct ListBase * | lb_dst, |
struct ListBase * | lb_src, | ||
bool | do_id_user | ||
) |
Definition at line 839 of file armature_utils.c.
References EditBone::bbone_next, EditBone::bbone_prev, BLI_addtail(), BLI_assert, BLI_listbase_is_empty(), EditBone::ebone, ListBase::first, IDP_CopyProperty_ex(), LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_dupallocN, EditBone::next, EditBone::parent, EditBone::prop, and EditBone::temp.
Referenced by undoarm_from_editarm(), and undoarm_to_editarm().
Free's bones and their properties.
Definition at line 822 of file armature_utils.c.
References BLI_listbase_clear(), ListBase::first, IDP_FreeProperty_ex(), MEM_freeN, EditBone::next, and EditBone::prop.
Referenced by undoarm_free_data(), and undoarm_to_editarm().
Definition at line 870 of file armature_utils.c.
References ListBase::first, EditBone::next, NULL, EditBone::p, and EditBone::temp.
Referenced by do_armature_box_select(), do_lasso_select_armature(), preEditBoneDuplicate(), undoarm_from_editarm(), and undoarm_to_editarm().
Definition at line 159 of file armature_utils.c.
References ED_armature_ebone_remove_ex().
Referenced by armature_delete_selected_exec().
void ED_armature_ebone_remove_ex | ( | struct bArmature * | arm, |
struct EditBone * | exBone, | ||
bool | clear_connected | ||
) |
clear_connected | When false caller is responsible for keeping the flag in a valid state. |
Definition at line 142 of file armature_utils.c.
References BONE_CONNECTED, bone_free(), bArmature::edbo, ListBase::first, EditBone::flag, EditBone::next, and EditBone::parent.
Referenced by armature_dissolve_selected_exec(), and ED_armature_ebone_remove().
float ED_armature_ebone_roll_to_vector | ( | const struct EditBone * | bone, |
const float | align_axis[3], | ||
bool | axis_only | ||
) |
Adjust bone roll to align Z axis with vector align_axis
is in local space and is normalized.
Definition at line 927 of file armature_utils.c.
References BLI_assert, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_UNSELECTABLE, ED_armature_ebone_selectflag_set(), EditBone::flag, and select().
Referenced by armature_select_hierarchy_exec(), armature_select_less(), armature_select_linked_impl(), armature_select_more(), armature_select_more_less(), armature_split_exec(), armature_symmetrize_exec(), ED_object_jump_to_bone(), outliner_select_sync_to_edit_bone(), select_similar_children(), select_similar_children_immediate(), select_similar_data_pchan(), select_similar_direction(), select_similar_layer(), select_similar_length(), select_similar_prefix(), select_similar_siblings(), select_similar_suffix(), and tree_element_active_ebone__sel().
Definition at line 920 of file armature_utils.c.
References BLI_assert, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, ED_armature_ebone_selectflag_set(), and EditBone::flag.
Referenced by armature_select_less().
Definition at line 914 of file armature_utils.c.
References BLI_assert, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, ED_armature_ebone_selectflag_set(), and EditBone::flag.
Referenced by armature_select_more().
int ED_armature_ebone_selectflag_get | ( | const struct EditBone * | ebone | ) |
Definition at line 897 of file armature_utils.c.
References BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, EditBone::flag, and EditBone::parent.
Referenced by armature_select_mirror_exec(), armature_shortest_path_select(), ED_armature_ebone_select_set(), ED_armature_ebone_selectflag_disable(), and ED_armature_ebone_selectflag_enable().
Definition at line 206 of file armature_utils.c.
References EditBone::head, normalize_v3(), EditBone::parent, EditBone::roll, sub_v3_v3v3(), EditBone::tail, and vec_roll_to_mat3_normalized().
Referenced by armature_calc_roll_exec(), armature_finalize_restpose(), createTransArmatureVerts(), ED_armature_ebone_to_mat4(), ED_armature_edit_transform(), ED_armature_join_objects_exec(), and getTransformOrientation_ex().
Definition at line 226 of file armature_utils.c.
References copy_m4_m3(), copy_v3_v3(), ED_armature_ebone_to_mat3(), and EditBone::head.
Referenced by draw_bone_update_disp_matrix_bbone(), draw_bone_update_disp_matrix_default(), and ebone_spline_preview().
void ED_armature_ebone_transform_mirror_update | ( | struct bArmature * | arm, |
struct EditBone * | ebo, | ||
bool | check_select | ||
) |
Definition at line 360 of file armature_utils.c.
References BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, copy_v3_v3(), EditBone::curve_in_x, EditBone::curve_in_z, EditBone::curve_out_x, EditBone::curve_out_z, EditBone::dist, EditBone::ease1, EditBone::ease2, ED_armature_ebone_get_mirrored(), bArmature::edbo, ListBase::first, EditBone::flag, EditBone::head, EditBone::next, EditBone::parent, EditBone::rad_head, EditBone::rad_tail, EditBone::roll, EditBone::roll1, EditBone::roll2, EditBone::scale_in, EditBone::scale_out, EditBone::segments, EditBone::tail, EditBone::weight, EditBone::xwidth, and EditBone::zwidth.
Referenced by ED_armature_edit_transform_mirror_update().
void ED_armature_ebone_unique_name | ( | struct ListBase * | ebones, |
char * | name, | ||
struct EditBone * | bone | ||
) |
Ensure the bone name is unique. If bone is already in list, pass it as argument to ignore it.
Definition at line 68 of file armature_naming.c.
References BLI_uniquename_cb(), data, DATA_, editbone_unique_check(), and EditBone::name.
Referenced by armature_extrude_exec(), armature_subdivide_exec(), duplicateEditBoneObjects(), ED_armature_bone_rename(), ED_armature_ebone_add(), and ED_armature_join_objects_exec().
Definition at line 878 of file armature_select.c.
References BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, Object::data, bArmature::edbo, and LISTBASE_FOREACH.
Referenced by armature_bone_primitive_add_exec(), armature_click_extrude_exec(), armature_fill_bones_exec(), ED_armature_ebone_add_primitive(), ED_armature_edit_deselect_all_multi_ex(), ED_object_jump_to_bone(), separate_armature_bones(), and separate_armature_exec().
Definition at line 911 of file armature_select.c.
References ED_armature_edit_deselect_all(), and Base::object.
Referenced by ED_armature_edit_deselect_all_visible_multi(), ED_armature_edit_select_pick_bone(), and tree_element_ebone_activate().
Definition at line 891 of file armature_select.c.
References BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, Object::data, EBONE_VISIBLE, ED_armature_edit_sync_selection(), bArmature::edbo, and LISTBASE_FOREACH.
Referenced by armature_circle_select(), do_lasso_select_armature(), and ED_armature_edit_deselect_all_visible_multi_ex().
Definition at line 931 of file armature_select.c.
References BKE_view_layer_array_from_bases_in_edit_mode_unique_data, C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_armature_edit_deselect_all_multi_ex(), ED_view3d_viewcontext_init(), MEM_freeN, ViewContext::v3d, and ViewContext::view_layer.
Definition at line 921 of file armature_select.c.
References ED_armature_edit_deselect_all_visible(), and Base::object.
Referenced by do_armature_box_select().
Definition at line 788 of file armature_utils.c.
References bArmature::act_edbone, BLI_freelistN(), bArmature::edbo, ListBase::first, IDP_FreeProperty(), MEM_freeN, EditBone::next, NULL, and EditBone::prop.
Referenced by ArmatureExporter::add_armature_bones(), apply_armature_pose2bones_exec(), ED_armature_join_objects_exec(), ED_armature_origin_set(), ED_armature_to_edit(), ED_object_editmode_load_free_ex(), ArmatureImporter::make_armatures(), modifier_skin_armature_create(), separate_armature_bones(), and separate_armature_exec().
Update the layers_used variable after bones are moved between layer
Definition at line 73 of file armature_utils.c.
References bArmature::edbo, bArmature::layer_used, and LISTBASE_FOREACH.
Referenced by armature_bone_layers_exec(), armature_bone_primitive_add_exec(), armature_delete_selected_exec(), armature_dissolve_selected_exec(), armature_fill_bones_exec(), and separate_armature_exec().
Perform a selection operation on elements which have been 'touched', use for lasso & border select but can be used elsewhere too.
Tagging is done via #EditBone.temp.i using: BONESEL_ROOT, BONESEL_TIP, BONESEL_BONE And optionally ignoring end-points using the BONESEL_ROOT, BONESEL_TIP right shifted 16 bits. (used when the values are clipped outside the view).
sel_op | eSelectOp type. |
Definition at line 1220 of file armature_select.c.
References armature_edit_select_op_apply(), BONE_CONNECTED, BONE_DONE, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONESEL_BONE, BONESEL_ROOT, BONESEL_TIP, ED_armature_edit_sync_selection(), ED_armature_edit_validate_active(), bArmature::edbo, ELEM, LISTBASE_FOREACH, and SWAP.
Referenced by do_armature_box_select(), and do_lasso_select_armature().
bool ED_armature_edit_select_pick | ( | struct bContext * | C, |
const int | mval[2], | ||
const struct SelectPick_Params * | params | ||
) |
Bone selection picking for armature edit-mode in the view3d.
Definition at line 1124 of file armature_select.c.
References C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_armature_edit_select_pick_bone(), ED_view3d_viewcontext_init(), get_nearest_editbonepoint(), ViewContext::mval, NULL, and params.
Referenced by view3d_select_exec().
bool ED_armature_edit_select_pick_bone | ( | struct bContext * | C, |
struct Base * | basact, | ||
struct EditBone * | ebone, | ||
int | selmask, | ||
const struct SelectPick_Params * | params | ||
) |
Definition at line 950 of file armature_select.c.
References bArmature::act_edbone, ViewLayer::basact, BKE_object_is_in_editmode(), BKE_view_layer_array_from_bases_in_edit_mode_unique_data, BLI_assert, BLI_assert_unreachable, BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), EBONE_SELECTABLE, ED_armature_ebone_selectflag_get(), ED_armature_edit_deselect_all_multi_ex(), ED_armature_edit_sync_selection(), ED_object_base_activate(), ED_outliner_select_sync_from_edit_bone_tag(), bArmature::edbo, EditBone::flag, bArmature::id, ID_RECALC_COPY_ON_WRITE, MEM_freeN, NC_OBJECT, ND_BONE_SELECT, Base::object, params, EditBone::parent, SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, SEL_OP_XOR, and WM_event_add_notifier().
Referenced by bone_select_menu_exec(), and ED_armature_edit_select_pick().
Sync selection to parent for connected children.
Definition at line 36 of file armature_utils.c.
References BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_UNSELECTABLE, ListBase::first, EditBone::flag, EditBone::next, and EditBone::parent.
Referenced by armature_circle_select(), armature_click_extrude_exec(), armature_delete_selected_exec(), armature_dissolve_selected_exec(), armature_duplicate_selected_exec(), armature_extrude_exec(), armature_hide_exec(), armature_parent_clear_exec(), armature_reveal_exec(), armature_select_hierarchy_exec(), armature_select_linked_impl(), armature_select_mirror_exec(), armature_select_more_less(), armature_shortest_path_pick_invoke(), armature_symmetrize_exec(), ED_armature_edit_deselect_all_visible(), ED_armature_edit_select_op_from_tagged(), ED_armature_edit_select_pick_bone(), and ED_object_jump_to_bone().
See BKE_armature_transform for object-mode transform.
Definition at line 53 of file armature_edit.c.
References copy_m3_m4(), EditBone::dist, ED_armature_ebone_to_mat3(), bArmature::edbo, ListBase::first, EditBone::head, mat3_to_vec_roll(), mat4_to_scale(), mul_m3_m3m3(), mul_m4_v3(), EditBone::next, normalize_m3(), NULL, EditBone::rad_head, EditBone::rad_tail, EditBone::roll, EditBone::tail, EditBone::xwidth, and EditBone::zwidth.
Referenced by ED_armature_transform(), and edit_armature_coords_and_quats_apply_with_mat4().
If edit-bone (partial) selected, copy data. context; edit-mode armature, with mirror editing enabled.
Definition at line 436 of file armature_utils.c.
References Object::data, ED_armature_ebone_transform_mirror_update(), bArmature::edbo, and LISTBASE_FOREACH.
Referenced by armature_symmetrize_exec(), ED_transverts_update_obedit(), recalcData_edit_armature(), and recalcData_pose().
Definition at line 62 of file armature_utils.c.
References bArmature::act_edbone, BONE_HIDDEN_A, EditBone::flag, and NULL.
Referenced by armature_circle_select(), armature_duplicate_selected_exec(), armature_hide_exec(), armature_reveal_exec(), armature_symmetrize_exec(), and ED_armature_edit_select_op_from_tagged().
Put edit-mode back in Object.
Definition at line 660 of file armature_utils.c.
References bArmature::act_bone, bArmature::act_edbone, Bone::arm_head, Bone::arm_roll, Bone::arm_tail, armature_finalize_restpose(), EditBone::bbone_flag, Bone::bbone_flag, EditBone::bbone_next, Bone::bbone_next, EditBone::bbone_next_flag, Bone::bbone_next_flag, EditBone::bbone_next_type, Bone::bbone_next_type, EditBone::bbone_prev, Bone::bbone_prev, EditBone::bbone_prev_flag, Bone::bbone_prev_flag, EditBone::bbone_prev_type, Bone::bbone_prev_type, BKE_armature_bone_hash_free(), BKE_armature_bone_hash_make(), BKE_armature_bonelist_free(), BKE_pose_rebuild(), BLI_addtail(), BLI_strncpy(), EditBone::bone, bone_free(), bArmature::bonebase, Bone::childbase, copy_v3_v3(), EditBone::curve_in_x, Bone::curve_in_x, EditBone::curve_in_z, Bone::curve_in_z, EditBone::curve_out_x, Bone::curve_out_x, EditBone::curve_out_z, Bone::curve_out_z, Object::data, DEG_id_tag_update(), EditBone::dist, Bone::dist, EditBone::ease1, Bone::ease1, EditBone::ease2, Bone::ease2, bArmature::edbo, ListBase::first, EditBone::flag, Bone::flag, G, G_DEBUG, EditBone::head, bArmature::id, Object::id, IDP_CopyProperty(), EditBone::inherit_scale_mode, Bone::inherit_scale_mode, EditBone::layer, Bone::layer, len_squared_v3v3(), MEM_callocN, EditBone::name, Bone::name, EditBone::next, ID::next, NULL, Main::objects, EditBone::parent, Bone::parent, EditBone::prop, Bone::prop, EditBone::rad_head, Bone::rad_head, EditBone::rad_tail, Bone::rad_tail, EditBone::roll, Bone::roll, EditBone::roll1, Bone::roll1, EditBone::roll2, Bone::roll2, EditBone::scale_in, Bone::scale_in, EditBone::scale_out, Bone::scale_out, EditBone::segments, Bone::segments, square_f(), EditBone::tail, EditBone::temp, EditBone::weight, Bone::weight, EditBone::xwidth, Bone::xwidth, EditBone::zwidth, and Bone::zwidth.
Referenced by apply_armature_pose2bones_exec(), ED_armature_join_objects_exec(), ED_armature_origin_set(), ED_object_editmode_load_free_ex(), ArmatureImporter::make_armatures(), modifier_skin_armature_create(), separate_armature_bones(), and separate_armature_exec().
int ED_armature_join_objects_exec | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Join armature exec is exported for use in object->join objects operator.
Definition at line 256 of file armature_relations.c.
References bArmature::adt, Object::adt, ADT_MERGECOPY_KEEP_DST, atan2f, BKE_animdata_copy(), BKE_animdata_merge_copy(), BKE_fcurves_main_cb(), BKE_pose_channels_hash_free(), BKE_report(), BLI_addtail(), BLI_assert, BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_str_new(), BLI_remlink(), BLI_strdup(), BLI_strncpy(), tJoinArmature_AdtFixData::bmain, C, copy_m4_m3(), CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), Object::data, DEG_id_tag_update(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), ED_armature_ebone_find_name(), ED_armature_ebone_to_mat3(), ED_armature_ebone_unique_name(), ED_armature_edit_free(), ED_armature_from_edit(), ED_armature_to_edit(), ED_object_base_free_and_unlink(), bArmature::edbo, bArmature::id, Object::id, Scene::id, ID_RECALC_GEOMETRY, ID_RECALC_SELECT, if(), invert_m4_m4(), invert_m4_m4_safe_ortho(), joined_armature_fix_animdata_cb(), joined_armature_fix_links(), MEM_freeN, Object::mode, mul_m4_m3m4(), mul_m4_m4m4(), mul_m4_v3(), tJoinArmature_AdtFixData::names_map, NC_SCENE, ND_LAYER_CONTENT, ND_OB_ACTIVE, NULL, OB_ARMATURE, OB_MODE_POSE, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, wmOperator::reports, RPT_WARNING, scene, tJoinArmature_AdtFixData::srcArm, tJoinArmature_AdtFixData::tarArm, Object::type, unit_m4(), and WM_event_add_notifier().
Referenced by object_join_exec().
struct Object* ED_armature_object_and_ebone_from_select_buffer | ( | struct Object ** | objects, |
uint | objects_len, | ||
unsigned int | select_id, | ||
struct EditBone ** | r_ebone | ||
) |
Definition at line 78 of file armature_select.c.
References BLI_findlink(), BONESEL_ANY, Object::data, bArmature::edbo, and NULL.
void ED_armature_origin_set | ( | struct Main * | bmain, |
struct Object * | ob, | ||
const float | cursor[3], | ||
int | centermode, | ||
int | around | ||
) |
centermode | 0 == do center, 1 == center new, 2 == center cursor. |
editors/object/
. Definition at line 100 of file armature_edit.c.
References add_v3_v3(), BKE_object_is_in_editmode(), copy_v3_v3(), Object::data, ED_armature_edit_free(), ED_armature_from_edit(), ED_armature_to_edit(), bArmature::edbo, ListBase::first, EditBone::head, Object::imat, INIT_MINMAX, invert_m4_m4(), Object::loc, max, mid_v3_v3v3(), min, minmax_v3v3_v3(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), EditBone::next, Object::obmat, sub_v3_v3(), EditBone::tail, V3D_AROUND_CENTER_BOUNDS, and zero_v3().
Referenced by object_origin_set_exec().
void ED_armature_pose_select_in_wpaint_mode | ( | struct ViewLayer * | view_layer, |
struct Base * | base_select | ||
) |
While in weight-paint mode, a single pose may be active as well. While not common, it's possible we have multiple armatures deforming a mesh.
This function de-selects all other objects, and selects the new base. It can't be set to the active object because we need to keep this set to the weight paint object.
Definition at line 269 of file pose_select.c.
References BA_DESELECT, BA_SELECT, BASE_SELECTED, BKE_gpencil_modifiers_get_virtual_modifierlist(), BKE_modifiers_get_virtual_modifierlist(), BKE_view_layer_base_find(), BLI_assert, ED_object_base_select(), eGpencilModifierType_Armature, eModifierType_Armature, Base::flag, Object::mode, GpencilModifierData::next, ModifierData::next, NULL, OB_ARMATURE, OB_GPENCIL, OB_MODE_ALL_WEIGHT_PAINT, OBACT, ArmatureGpencilModifierData::object, Base::object, ArmatureModifierData::object, GpencilModifierData::type, ModifierData::type, and Object::type.
Referenced by bone_select_menu_exec(), and ed_object_select_pick().
bool ED_armature_pose_select_pick_bone | ( | struct ViewLayer * | view_layer, |
struct View3D * | v3d, | ||
struct Object * | ob, | ||
struct Bone * | bone, | ||
const struct SelectPick_Params * | params | ||
) |
Definition at line 124 of file pose_select.c.
References bArmature::act_bone, ARM_HAS_VIZ_DEPS, BLI_assert, BLI_assert_unreachable, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONE_UNSELECTABLE, Object::data, DEG_id_tag_update(), ED_pose_bone_select_tag_update(), ED_pose_deselect_all(), ED_vgroup_select_by_name(), Bone::flag, bArmature::flag, FOREACH_VISIBLE_BASE_BEGIN, FOREACH_VISIBLE_BASE_END, bArmature::id, Object::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, Object::mode, Bone::name, NULL, OB_ARMATURE, OB_MODE_ALL_WEIGHT_PAINT, OB_MODE_POSE, OBACT, OBEDIT_FROM_VIEW_LAYER, params, Object::pose, SEL_DESELECT, SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, SEL_OP_XOR, and Object::type.
Referenced by bone_select_menu_exec(), and ED_armature_pose_select_pick_with_buffer().
bool ED_armature_pose_select_pick_with_buffer | ( | struct ViewLayer * | view_layer, |
struct View3D * | v3d, | ||
struct Base * | base, | ||
const struct GPUSelectResult * | buffer, | ||
short | hits, | ||
const struct SelectPick_Params * | params, | ||
bool | do_nearest | ||
) |
Called for mode-less pose selection. assumes the active object is still on old situation.
Definition at line 246 of file pose_select.c.
References buffer, ED_armature_pick_bone_from_selectbuffer(), ED_armature_pose_select_pick_bone(), NULL, Base::object, params, and Object::pose.
Referenced by ed_object_select_pick().
Put armature in edit-mode.
Definition at line 809 of file armature_utils.c.
References bArmature::act_bone, bArmature::act_edbone, bArmature::bonebase, ED_armature_edit_free(), bArmature::edbo, make_boneList(), and MEM_callocN.
Referenced by ArmatureExporter::add_armature_bones(), apply_armature_pose2bones_exec(), ED_armature_join_objects_exec(), ED_armature_origin_set(), ED_object_editmode_enter_ex(), ArmatureImporter::make_armatures(), separate_armature_bones(), and separate_armature_exec().
Definition at line 90 of file armature_edit.c.
References BKE_armature_transform(), ED_armature_edit_transform(), and bArmature::edbo.
Export for ED_undo_sys.
Definition at line 231 of file editarmature_undo.c.
References armature_undosys_foreach_ID_ref(), armature_undosys_poll(), armature_undosys_step_decode(), armature_undosys_step_encode(), armature_undosys_step_free(), UndoType::flags, UndoType::name, UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_foreach_ID_ref, UndoType::step_free, UndoType::step_size, and UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE.
Referenced by ED_undosys_type_init().
void ED_keymap_armature | ( | struct wmKeyConfig * | keyconf | ) |
Definition at line 177 of file armature_ops.c.
References ED_operator_editarmature(), ED_operator_posemode(), wmKeyMap::poll, and WM_keymap_ensure().
Referenced by ED_spacetypes_keymap().
void ED_mesh_deform_bind_callback | ( | struct Object * | object, |
struct MeshDeformModifierData * | mmd, | ||
struct Mesh * | cagemesh, | ||
float * | vertexcos, | ||
int | verts_num, | ||
float | cagemat[4][4] | ||
) |
Definition at line 1736 of file meshlaplacian.c.
References Freestyle::a, MeshDeformModifierData::bindcagecos, MeshDeformModifierData::bindmat, BKE_mesh_wrapper_ensure_mdata(), BKE_modifier_get_original(), BKE_modifier_mdef_compact_influences(), MeshDeformBind::cage_verts_num, MeshDeformModifierData::cage_verts_num, MeshDeformBind::cagecos, MeshDeformBind::cagemat, MeshDeformBind::cagemesh, MVert::co, copy_m4_m4(), copy_v3_v3(), end_progress_bar(), harmonic_coordinates_bind(), MeshRayCallbackData::mdb, MEM_callocN, MEM_freeN, MeshDeformModifierData::modifier, mul_m4_v3(), mul_v3_m4v3(), Mesh::mvert, MeshDeformModifierData::object, Object::obmat, start_progress_bar(), Mesh::totvert, MeshDeformBind::vertexcos, MeshDeformBind::verts_num, MeshDeformModifierData::verts_num, and waitcursor().
Referenced by meshdeform_bind_exec().
Definition at line 100 of file pose_edit.c.
References BKE_id_is_editable(), BKE_report(), C, CTX_data_main(), CTX_wm_reports(), ED_object_posemode_enter_ex(), Object::id, NC_SCENE, ND_MODE, NS_MODE_POSE, NULL, RPT_WARNING, and WM_event_add_notifier().
Referenced by posemode_exec().
This function is used to process the necessary updates for.
Definition at line 80 of file pose_edit.c.
References BKE_id_is_editable(), BLI_assert, DEG_id_tag_update_ex(), Object::id, ID_RECALC_COPY_ON_WRITE, Object::mode, OB_ARMATURE, OB_MODE_POSE, Object::restore_mode, and Object::type.
Referenced by do_outliner_item_posemode_toggle(), ED_editors_init(), ED_object_posemode_enter(), ed_object_posemode_set_for_weight_paint_ex(), and posemode_exec().
Definition at line 128 of file pose_edit.c.
References C, CTX_data_main(), ED_object_posemode_exit_ex(), NC_SCENE, ND_MODE, NS_MODE_OBJECT, NULL, and WM_event_add_notifier().
Referenced by posemode_exec().
Definition at line 115 of file pose_edit.c.
References DEG_id_tag_update_ex(), Object::id, ID_RECALC_COPY_ON_WRITE, Object::mode, OB_MODE_POSE, and Object::restore_mode.
Referenced by do_outliner_item_posemode_toggle(), ed_object_mode_generic_exit_ex(), ED_object_posemode_exit(), ed_object_posemode_set_for_weight_paint_ex(), and posemode_exec().
void ED_object_vgroup_calc_from_armature | ( | struct ReportList * | reports, |
struct Depsgraph * | depsgraph, | ||
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct Object * | par, | ||
int | mode, | ||
bool | mirror | ||
) |
Definition at line 452 of file armature_skinning.c.
References add_verts_to_dgroups(), ARM_GROUPS_AUTO, ARM_GROUPS_ENVELOPE, ARM_GROUPS_NAME, BKE_object_defgroup_count(), bone_looper(), bArmature::bonebase, Object::data, depsgraph, ED_vgroup_data_clamp_range(), ELEM, ListBase::first, NULL, scene, and vgroup_add_unique_bone_cb().
Referenced by ED_object_parent_set(), and weight_from_bones_exec().
Definition at line 141 of file armature_ops.c.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorTypeMacro::ptr, RNA_boolean_set(), WM_operatortype_append_macro(), and WM_operatortype_macro_define().
Referenced by ED_spacemacros_init().
Definition at line 20 of file armature_ops.c.
References ARMATURE_OT_align(), ARMATURE_OT_armature_layers(), ARMATURE_OT_autoside_names(), ARMATURE_OT_bone_layers(), ARMATURE_OT_bone_primitive_add(), ARMATURE_OT_calculate_roll(), ARMATURE_OT_click_extrude(), ARMATURE_OT_delete(), ARMATURE_OT_dissolve(), ARMATURE_OT_duplicate(), ARMATURE_OT_extrude(), ARMATURE_OT_fill(), ARMATURE_OT_flip_names(), ARMATURE_OT_hide(), ARMATURE_OT_layers_show_all(), ARMATURE_OT_parent_clear(), ARMATURE_OT_parent_set(), ARMATURE_OT_reveal(), ARMATURE_OT_roll_clear(), ARMATURE_OT_select_all(), ARMATURE_OT_select_hierarchy(), ARMATURE_OT_select_less(), ARMATURE_OT_select_linked(), ARMATURE_OT_select_linked_pick(), ARMATURE_OT_select_mirror(), ARMATURE_OT_select_more(), ARMATURE_OT_select_similar(), ARMATURE_OT_separate(), ARMATURE_OT_shortest_path_pick(), ARMATURE_OT_split(), ARMATURE_OT_subdivide(), ARMATURE_OT_switch_direction(), ARMATURE_OT_symmetrize(), POSE_OT_armature_apply(), POSE_OT_autoside_names(), POSE_OT_blend_to_neighbors(), POSE_OT_bone_layers(), POSE_OT_breakdown(), POSE_OT_copy(), POSE_OT_flip_names(), POSE_OT_group_add(), POSE_OT_group_assign(), POSE_OT_group_deselect(), POSE_OT_group_move(), POSE_OT_group_remove(), POSE_OT_group_select(), POSE_OT_group_sort(), POSE_OT_group_unassign(), POSE_OT_hide(), POSE_OT_loc_clear(), POSE_OT_paste(), POSE_OT_paths_calculate(), POSE_OT_paths_clear(), POSE_OT_paths_range_update(), POSE_OT_paths_update(), POSE_OT_propagate(), POSE_OT_push(), POSE_OT_push_rest(), POSE_OT_quaternions_flip(), POSE_OT_relax(), POSE_OT_relax_rest(), POSE_OT_reveal(), POSE_OT_rot_clear(), POSE_OT_rotation_mode_set(), POSE_OT_scale_clear(), POSE_OT_select_all(), POSE_OT_select_constraint_target(), POSE_OT_select_grouped(), POSE_OT_select_hierarchy(), POSE_OT_select_linked(), POSE_OT_select_linked_pick(), POSE_OT_select_mirror(), POSE_OT_select_parent(), POSE_OT_transforms_clear(), POSE_OT_user_transforms_clear(), POSE_OT_visual_transform_apply(), POSELIB_OT_action_sanitize(), POSELIB_OT_apply_pose(), POSELIB_OT_apply_pose_asset(), POSELIB_OT_blend_pose_asset(), POSELIB_OT_browse_interactive(), POSELIB_OT_new(), POSELIB_OT_pose_add(), POSELIB_OT_pose_move(), POSELIB_OT_pose_remove(), POSELIB_OT_pose_rename(), POSELIB_OT_unlink(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
struct PoseBackup* ED_pose_backup_create_all_bones | ( | const struct Object * | ob, |
const struct bAction * | action | ||
) |
struct PoseBackup* ED_pose_backup_create_selected_bones | ( | const struct Object * | ob, |
const struct bAction * | action | ||
) |
Create a backup of those bones that are animated in the given action.
void ED_pose_backup_free | ( | struct PoseBackup * | pbd | ) |
Definition at line 120 of file pose_backup.cc.
References PoseBackup::backups, BLI_freelinkN(), IDP_FreeProperty(), LISTBASE_FOREACH_MUTABLE, and MEM_freeN.
Referenced by action_preview_render_cleanup(), and poselib_blend_free().
bool ED_pose_backup_is_selection_relevant | ( | const struct PoseBackup * | pose_backup | ) |
Definition at line 101 of file pose_backup.cc.
References PoseBackup::is_bone_selection_relevant.
Referenced by poselib_keytag_pose().
void ED_pose_backup_restore | ( | const struct PoseBackup * | pbd | ) |
void ED_pose_bone_select | ( | struct Object * | ob, |
struct bPoseChannel * | pchan, | ||
bool | select | ||
) |
Utility method for changing the selection status of a bone.
Definition at line 95 of file pose_select.c.
References bArmature::act_bone, bPoseChannel::bone, BONE_SELECTED, Object::data, ED_pose_bone_select_tag_update(), ELEM, Bone::flag, NULL, PBONE_SELECTABLE, Object::pose, and select().
Referenced by click_select_channel_group(), ED_object_jump_to_bone(), and select_pchan_for_action_group().
Definition at line 80 of file pose_select.c.
References ARM_HAS_VIZ_DEPS, BLI_assert, Object::data, DEG_id_tag_update(), bArmature::flag, bArmature::id, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SELECT, NC_GEOM, NC_OBJECT, ND_BONE_SELECT, ND_DATA, OB_ARMATURE, Object::type, and WM_main_add_notifier().
Referenced by do_pose_tag_select_op_exec(), ED_armature_pose_select_pick_bone(), ED_object_jump_to_bone(), ED_pose_bone_select(), ED_pose_deselect_all_multi_ex(), pose_circle_select(), pose_select_connected_invoke(), pose_select_constraint_target_exec(), pose_select_hierarchy_exec(), pose_select_linked_exec(), pose_select_parent_exec(), pose_select_same_group(), pose_select_same_keyingset(), and pose_select_same_layer().
'select_mode' is usual SEL_SELECT/SEL_DESELECT/SEL_TOGGLE/SEL_INVERT. When true, 'ignore_visibility' makes this func also affect invisible bones (hidden or on hidden layers).
Definition at line 315 of file pose_select.c.
References bPoseChannel::bone, BONE_SELECTED, bPose::chanbase, Object::data, ListBase::first, Bone::flag, bPoseChannel::next, NULL, PBONE_VISIBLE, Object::pose, pose_do_bone_select(), SEL_DESELECT, SEL_SELECT, and SEL_TOGGLE.
Referenced by click_select_channel_group(), do_pose_tag_select_op_exec(), ED_armature_pose_select_pick_bone(), ED_object_jump_to_bone(), ED_pose_deselect_all_multi_ex(), and pose_circle_select().
Definition at line 397 of file pose_select.c.
References BKE_object_pose_base_array_get_unique(), C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_pose_deselect_all_multi_ex(), ED_view3d_viewcontext_init(), MEM_freeN, ViewContext::v3d, and ViewContext::view_layer.
bool ED_pose_deselect_all_multi_ex | ( | struct Base ** | bases, |
uint | bases_len, | ||
int | select_mode, | ||
bool | ignore_visibility | ||
) |
Definition at line 375 of file pose_select.c.
References ED_pose_bone_select_tag_update(), ED_pose_deselect_all(), ed_pose_is_any_selected_multi(), Base::object, SEL_DESELECT, SEL_SELECT, and SEL_TOGGLE.
Referenced by ED_pose_deselect_all_multi().
Definition at line 61 of file pose_edit.c.
References blender::compositor::area(), BKE_object_pose_armature_get(), C, CTX_data_active_object(), CTX_wm_area(), ED_object_context(), and SPACE_PROPERTIES.
Referenced by ED_operator_posemode_context(), group_move_exec(), group_sort_exec(), pose_group_add_exec(), pose_group_assign_exec(), pose_group_deselect_exec(), pose_group_poll(), pose_group_remove_exec(), pose_group_select_exec(), pose_group_unassign_exec(), and pose_groups_menu_invoke().
void ED_pose_recalculate_paths | ( | struct bContext * | C, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
ePosePathCalcRange | range | ||
) |
For the object with pose/action: update paths for those that have got them This should selectively update paths that exist...
To be called from various tools that do incremental updates.
Definition at line 154 of file pose_edit.c.
References animviz_calc_motionpaths(), animviz_depsgraph_build(), animviz_get_object_motionpaths(), ANIMVIZ_RECALC_PATHS, bPose::avs, BLI_freelistN(), C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_view_layer(), DEG_graph_free(), DEG_id_tag_update(), depsgraph, Object::id, ID_RECALC_COPY_ON_WRITE, NULL, Object::pose, POSE_PATH_CALC_RANGE_CURRENT_FRAME, pose_path_convert_range(), bAnimVizSettings::recalc, scene, TIMEIT_END, and TIMEIT_START.
Referenced by pose_calculate_paths_exec(), pose_clear_transform_generic_exec(), pose_paste_exec(), pose_update_paths_exec(), poseAnim_mapping_autoKeyframe(), recalcData_pose(), and special_aftertrans_update__pose().