|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_constraint_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_blenlib.h"#include "BLI_ghash.h"#include "BLI_map.hh"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLT_translation.hh"#include "BKE_action.hh"#include "BKE_anim_data.hh"#include "BKE_animsys.h"#include "BKE_armature.hh"#include "BKE_constraint.h"#include "BKE_context.hh"#include "BKE_fcurve_driver.h"#include "BKE_idprop.hh"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_report.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_armature.hh"#include "ED_object.hh"#include "ED_outliner.hh"#include "ED_screen.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "ANIM_bone_collections.hh"#include "armature_intern.hh"Go to the source code of this file.
Functions | |
Edit Armature Join | |
| |
| static void | joined_armature_fix_links_constraints (Main *bmain, Object *ob, Object *tarArm, Object *srcArm, bPoseChannel *pchan, EditBone *curbone, ListBase *lb) |
| static void | joined_armature_fix_animdata_cb (Main *bmain, ID *id, FCurve *fcu, Object *srcArm, Object *tarArm, GHash *names_map) |
| static void | joined_armature_fix_links (Main *bmain, Object *tarArm, Object *srcArm, bPoseChannel *pchan, EditBone *curbone) |
| static BoneCollection * | join_armature_remap_collection (const bArmature *src_arm, const int src_index, bArmature *dest_arm, blender::Map< std::string, BoneCollection * > &bone_collection_by_name) |
| int | ED_armature_join_objects_exec (bContext *C, wmOperator *op) |
Edit Armature Separate | |
| static void | separated_armature_fix_links (Main *bmain, Object *origArm, Object *newArm) |
| static void | separate_armature_bones (Main *bmain, Object *ob, const bool is_select) |
| static int | separate_armature_exec (bContext *C, wmOperator *op) |
| void | ARMATURE_OT_separate (wmOperatorType *ot) |
Edit Armature Parenting | |
| #define | ARM_PAR_CONNECT 1 |
| #define | ARM_PAR_OFFSET 2 |
| #define | ARM_PAR_CLEAR 1 |
| #define | ARM_PAR_CLEAR_DISCONNECT 2 |
| static const EnumPropertyItem | prop_editarm_make_parent_types [] |
| static const EnumPropertyItem | prop_editarm_clear_parent_types [] |
| static void | bone_connect_to_existing_parent (EditBone *bone) |
| static void | bone_connect_to_new_parent (ListBase *edbo, EditBone *selbone, EditBone *actbone, short mode) |
| static int | armature_parent_set_exec (bContext *C, wmOperator *op) |
| static int | armature_parent_set_invoke (bContext *C, wmOperator *, const wmEvent *) |
| void | ARMATURE_OT_parent_set (wmOperatorType *ot) |
| static void | editbone_clear_parent (EditBone *ebone, int mode) |
| static int | armature_parent_clear_exec (bContext *C, wmOperator *op) |
| static int | armature_parent_clear_invoke (bContext *C, wmOperator *, const wmEvent *) |
| void | ARMATURE_OT_parent_clear (wmOperatorType *ot) |
Operators for relations between bones and for transferring bones between armature objects.
Definition in file armature_relations.cc.
| #define ARM_PAR_CLEAR 1 |
Definition at line 791 of file armature_relations.cc.
Referenced by armature_parent_clear_invoke().
| #define ARM_PAR_CLEAR_DISCONNECT 2 |
Definition at line 792 of file armature_relations.cc.
Referenced by armature_parent_clear_invoke().
| #define ARM_PAR_CONNECT 1 |
Definition at line 787 of file armature_relations.cc.
Referenced by armature_parent_set_invoke(), and bone_connect_to_new_parent().
| #define ARM_PAR_OFFSET 2 |
Definition at line 788 of file armature_relations.cc.
Referenced by armature_parent_set_invoke().
| void ARMATURE_OT_parent_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1118 of file armature_relations.cc.
References armature_parent_clear_exec(), armature_parent_clear_invoke(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, prop_editarm_clear_parent_types, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_parent_set | ( | wmOperatorType * | ot | ) |
Definition at line 995 of file armature_relations.cc.
References armature_parent_set_exec(), armature_parent_set_invoke(), wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_editarm_make_parent_types, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void ARMATURE_OT_separate | ( | wmOperatorType * | ot | ) |
Definition at line 765 of file armature_relations.cc.
References wmOperatorType::description, ED_operator_editarmature(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and separate_armature_exec().
Referenced by ED_operatortypes_armature().
|
static |
Definition at line 1033 of file armature_relations.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), EBONE_EDITABLE, ED_armature_edit_sync_selection(), bArmature::edbo, editbone_clear_parent(), LISTBASE_FOREACH, NC_OBJECT, ND_BONE_SELECT, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by ARMATURE_OT_parent_clear().
|
static |
Definition at line 1069 of file armature_relations.cc.
References ARM_PAR_CLEAR, ARM_PAR_CLEAR_DISCONNECT, BLT_I18NCONTEXT_OPERATOR_DEFAULT, BONE_CONNECTED, BONE_SELECTED, CTX_data_edit_object(), CTX_IFACE_, Object::data, EBONE_EDITABLE, bArmature::edbo, LISTBASE_FOREACH, OPERATOR_INTERFACE, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemEnumO(), uiLayoutRow(), and uiLayoutSetEnabled().
Referenced by ARMATURE_OT_parent_clear().
|
static |
Definition at line 860 of file armature_relations.cc.
References ARM_MIRROR_EDIT, BKE_report(), bone_connect_to_existing_parent(), bone_connect_to_new_parent(), BONE_SELECTED, CTX_data_active_bone(), CTX_data_edit_object(), Object::data, DEG_id_tag_update(), EBONE_EDITABLE, ED_armature_ebone_get_mirrored(), bArmature::edbo, bArmature::flag, EditBone::flag, Object::id, ID_RECALC_SELECT, LISTBASE_FOREACH, NC_OBJECT, ND_BONE_SELECT, OPERATOR_CANCELLED, OPERATOR_FINISHED, EditBone::parent, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and WM_event_add_notifier().
Referenced by ARMATURE_OT_parent_set().
|
static |
Definition at line 949 of file armature_relations.cc.
References bArmature::act_edbone, ARM_PAR_CONNECT, ARM_PAR_OFFSET, BLT_I18NCONTEXT_OPERATOR_DEFAULT, BONE_CONNECTED, BONE_SELECTED, CTX_data_edit_object(), CTX_IFACE_, Object::data, EBONE_EDITABLE, bArmature::edbo, LISTBASE_FOREACH, OPERATOR_INTERFACE, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemEnumO(), uiLayoutRow(), and uiLayoutSetEnabled().
Referenced by ARMATURE_OT_parent_set().
|
static |
Definition at line 795 of file armature_relations.cc.
References BONE_CONNECTED, copy_v3_v3(), EditBone::flag, EditBone::head, EditBone::parent, EditBone::rad_head, EditBone::rad_tail, and EditBone::tail.
Referenced by armature_parent_set_exec().
|
static |
Definition at line 802 of file armature_relations.cc.
References add_v3_v3(), ARM_PAR_CONNECT, BONE_CONNECTED, copy_v3_v3(), EditBone::flag, EditBone::head, LISTBASE_FOREACH, EditBone::parent, EditBone::rad_head, EditBone::rad_tail, sub_v3_v3v3(), and EditBone::tail.
Referenced by armature_parent_set_exec().
| int ED_armature_join_objects_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Join armature exec is exported for use in object->join objects operator.
Definition at line 297 of file armature_relations.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), bArmature::adt, Object::adt, ADT_MERGECOPY_KEEP_DST, ANIM_armature_runtime_refresh(), atan2f, blender::ed::object::base_free_and_unlink(), 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(), EditBone::bone_collections, bPose::chanbase, bArmature::collection_array, bArmature::collection_array_num, 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(), bArmature::edbo, ListBase::first, EditBone::head, bArmature::id, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SELECT, invert_m4_m4(), invert_m4_m4_safe_ortho(), join_armature_remap_collection(), joined_armature_fix_animdata_cb(), joined_armature_fix_links(), LISTBASE_FOREACH, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), MEM_freeN(), Object::mode, mul_m4_m3m4(), mul_m4_m4m4(), mul_m4_v3(), bPoseChannel::name, EditBone::name, NC_SCENE, ND_LAYER_CONTENT, ND_OB_ACTIVE, bPoseChannel::next, OB_ARMATURE, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, wmOperator::reports, EditBone::roll, RPT_WARNING, STRNCPY, EditBone::tail, Object::type, unit_m4(), and WM_event_add_notifier().
Referenced by blender::ed::object::object_join_exec().
Definition at line 1020 of file armature_relations.cc.
References EditBone::flag, and EditBone::parent.
Referenced by armature_parent_clear_exec().
|
static |
Definition at line 253 of file armature_relations.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), ANIM_armature_bonecoll_new(), bArmature::collection_array, BoneCollection::flags, IDP_CopyProperty_ex(), join_armature_remap_collection(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), BoneCollection::name, and BoneCollection::prop.
Referenced by ED_armature_join_objects_exec(), and join_armature_remap_collection().
|
static |
Definition at line 122 of file armature_relations.cc.
References BKE_animsys_fix_rna_path_rename(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), DEG_id_tag_update_ex(), FCurve::driver, DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER_BEGIN, ChannelDriver::flag, FCurve::flag, GHASH_ITER, Object::id, ID_RECALC_SYNC_TO_EVAL, LISTBASE_FOREACH, FCurve::rna_path, STREQ, STRNCPY, and ChannelDriver::variables.
Referenced by ED_armature_join_objects_exec().
|
static |
Definition at line 210 of file armature_relations.cc.
References bPose::chanbase, Object::constraints, DEG_id_tag_update_ex(), ListBase::first, Object::id, ID_RECALC_SYNC_TO_EVAL, joined_armature_fix_links_constraints(), LISTBASE_FOREACH, bPoseChannel::name, EditBone::name, ID::next, OB_ARMATURE, Main::objects, PARBONE, Object::parent, Object::parsubstr, Object::partype, Object::pose, STREQ, STRNCPY, and Object::type.
Referenced by ED_armature_join_objects_exec().
|
static |
Definition at line 67 of file armature_relations.cc.
References BKE_action_fix_paths_rename(), BKE_constraint_targets_flush(), BKE_constraint_targets_get(), CONSTRAINT_TYPE_ACTION, DEG_id_tag_update_ex(), Object::id, ID_RECALC_SYNC_TO_EVAL, LISTBASE_FOREACH, bPoseChannel::name, EditBone::name, STREQ, and STRNCPY.
Referenced by joined_armature_fix_links().
Helper function for armature separating - remove certain bones from the given armature.
| ob | Armature object (must not be is not in edit-mode). |
| is_select | remove selected bones from the armature, otherwise the unselected bones are removed. |
Definition at line 608 of file armature_relations.cc.
References BKE_pose_channel_free(), BKE_pose_channels_hash_free(), BLI_freelinkN(), bone_free(), BONE_SELECTED, bPose::chanbase, Object::data, EBONE_VISIBLE, ED_armature_ebone_find_name(), ED_armature_edit_deselect_all(), ED_armature_edit_free(), ED_armature_from_edit(), ED_armature_to_edit(), bArmature::edbo, ListBase::first, EditBone::flag, LISTBASE_FOREACH, bPoseChannel::name, bPoseChannel::next, and Object::pose.
Referenced by separate_armature_exec().
|
static |
Definition at line 665 of file armature_relations.cc.
References blender::ed::object::add_duplicate(), BKE_report(), BKE_view_layer_array_from_bases_in_edit_mode_unique_data(), BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), DEG_relations_tag_update(), EBONE_VISIBLE, ED_armature_edit_deselect_all(), ED_armature_edit_free(), ED_armature_from_edit(), ED_armature_to_edit(), ED_outliner_select_sync_from_object_tag(), bArmature::edbo, Object::id, ID_RECALC_GEOMETRY, LISTBASE_FOREACH, Object::mode, NC_OBJECT, ND_POSE, Base::object, OPERATOR_FINISHED, wmOperator::reports, RPT_INFO, separate_armature_bones(), separated_armature_fix_links(), USER_DUP_ACT, USER_DUP_ARM, WM_cursor_wait(), and WM_event_add_notifier().
Referenced by ARMATURE_OT_separate().
Definition at line 511 of file armature_relations.cc.
References BKE_constraint_targets_flush(), BKE_constraint_targets_get(), BLI_findstring(), bPose::chanbase, Object::constraints, ListBase::first, Object::id, LISTBASE_FOREACH, ID::next, OB_ARMATURE, Main::objects, offsetof, PARBONE, Object::parent, Object::parsubstr, Object::partype, Object::pose, and Object::type.
Referenced by separate_armature_exec().
|
static |
Definition at line 1014 of file armature_relations.cc.
Referenced by ARMATURE_OT_parent_clear().
|
static |
Definition at line 854 of file armature_relations.cc.
Referenced by ARMATURE_OT_parent_set().