Blender V5.3
armature_ops.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "RNA_access.hh"
10
11#include "WM_api.hh"
12#include "WM_types.hh"
13
14#include "ED_armature.hh"
15#include "ED_screen.hh"
16
17#include "armature_intern.hh"
18
19namespace blender {
20
21/* ************************** registration **********************************/
22
24{
25 /* Both operators `ARMATURE_OT_*` and `POSE_OT_*` are registered here. */
26
27 /* EDIT ARMATURE */
29
35
38
48
61
64
74
77
78 /* POSE */
81
84
90
93
95
103
108
111
113
115
117
118 /* POSELIB */
121
122 /* POSE SLIDING */
128}
129
131{
132 wmOperatorType *ot;
133 wmOperatorTypeMacro *otmacro;
134
136 "ARMATURE_OT_duplicate_move",
137 "Duplicate",
138 "Make copies of the selected bones within the same armature and move them",
140 WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
141 otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
142 RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
143
144 ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move",
145 "Extrude",
146 "Create new bones from the selected joints and move them",
148 otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
149 RNA_boolean_set(otmacro->ptr, "forked", false);
150 otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
151 RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
152
153 /* XXX would it be nicer to just be able to have standard extrude_move,
154 * but set the forked property separate?
155 * that would require fixing a properties bug #19733. */
156 ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked",
157 "Extrude Forked",
158 "Create new bones from the selected joints and move them",
160 otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
161 RNA_boolean_set(otmacro->ptr, "forked", true);
162 otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
163 RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
164}
165
167{
168 wmKeyMap *keymap;
169
170 /* Armature ------------------------ */
171 /* only set in editmode armature, by space_view3d listener */
172 keymap = WM_keymap_ensure(keyconf, "Armature", SPACE_EMPTY, RGN_TYPE_WINDOW);
174
175 /* Pose ------------------------ */
176 /* only set in posemode, by space_view3d listener */
177 keymap = WM_keymap_ensure(keyconf, "Pose", SPACE_EMPTY, RGN_TYPE_WINDOW);
178 keymap->poll = ED_operator_posemode;
179}
180
181} // namespace blender
BMesh Iterators.
void ARMATURE_OT_select_linked(wmOperatorType *ot)
void ARMATURE_OT_hide(wmOperatorType *ot)
void ARMATURE_OT_collection_move(wmOperatorType *ot)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
void POSE_OT_flip_names(wmOperatorType *ot)
Definition pose_edit.cc:516
void POSE_OT_select_linked_pick(wmOperatorType *ot)
void ARMATURE_OT_flip_names(wmOperatorType *ot)
void ARMATURE_OT_dissolve(wmOperatorType *ot)
void ARMATURE_OT_split(wmOperatorType *ot)
void ARMATURE_OT_select_similar(wmOperatorType *ot)
void ARMATURE_OT_select_more(wmOperatorType *ot)
void ARMATURE_OT_autoside_names(wmOperatorType *ot)
void POSE_OT_paths_calculate(wmOperatorType *ot)
Definition pose_edit.cc:259
void POSE_OT_armature_apply(wmOperatorType *ot)
void POSE_OT_select_constraint_target(wmOperatorType *ot)
void POSE_OT_select_linked(wmOperatorType *ot)
void ED_operatormacros_armature()
void ARMATURE_OT_shortest_path_pick(wmOperatorType *ot)
void ARMATURE_OT_collection_select(wmOperatorType *ot)
void POSE_OT_relax(wmOperatorType *ot)
void ARMATURE_OT_extrude(wmOperatorType *ot)
void POSE_OT_blend_with_rest(wmOperatorType *ot)
void ARMATURE_OT_parent_set(wmOperatorType *ot)
bool ED_operator_posemode(bContext *C)
void ARMATURE_OT_calculate_roll(wmOperatorType *ot)
void ARMATURE_OT_duplicate(wmOperatorType *ot)
void ARMATURE_OT_select_hierarchy(wmOperatorType *ot)
void POSE_OT_paths_range_update(wmOperatorType *ot)
Definition pose_edit.cc:462
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void POSE_OT_quaternions_flip(wmOperatorType *ot)
Definition pose_edit.cc:817
bool ED_operator_editarmature(bContext *C)
void ARMATURE_OT_collection_add(wmOperatorType *ot)
void ARMATURE_OT_duplicate_rename(wmOperatorType *ot)
void ARMATURE_OT_subdivide(wmOperatorType *ot)
void POSELIB_OT_blend_pose_asset(wmOperatorType *ot)
void ARMATURE_OT_separate(wmOperatorType *ot)
void POSE_OT_breakdown(wmOperatorType *ot)
void ARMATURE_OT_assign_to_collection(wmOperatorType *ot)
void ARMATURE_OT_fill(wmOperatorType *ot)
void ARMATURE_OT_parent_clear(wmOperatorType *ot)
void POSE_OT_paths_update(wmOperatorType *ot)
Definition pose_edit.cc:338
void POSE_OT_copy(wmOperatorType *ot)
void ARMATURE_OT_collection_assign(wmOperatorType *ot)
void POSE_OT_hide(wmOperatorType *ot)
Definition pose_edit.cc:698
void ED_keymap_armature(wmKeyConfig *keyconf)
void POSE_OT_select_grouped(wmOperatorType *ot)
void ARMATURE_OT_select_less(wmOperatorType *ot)
void POSE_OT_rot_clear(wmOperatorType *ot)
void ARMATURE_OT_reveal(wmOperatorType *ot)
void POSE_OT_blend_to_neighbors(wmOperatorType *ot)
void ARMATURE_OT_select_all(wmOperatorType *ot)
void ARMATURE_OT_roll_clear(wmOperatorType *ot)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:935
void ARMATURE_OT_move_to_collection(wmOperatorType *ot)
void ARMATURE_OT_align(wmOperatorType *ot)
void POSE_OT_paste(wmOperatorType *ot)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void POSE_OT_select_parent(wmOperatorType *ot)
void ED_operatortypes_armature()
void ARMATURE_OT_select_mirror(wmOperatorType *ot)
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
void ARMATURE_OT_select_linked_pick(wmOperatorType *ot)
void POSE_OT_transforms_clear(wmOperatorType *ot)
void POSE_OT_scale_clear(wmOperatorType *ot)
void ARMATURE_OT_click_extrude(wmOperatorType *ot)
void ARMATURE_OT_switch_direction(wmOperatorType *ot)
void ARMATURE_OT_delete(wmOperatorType *ot)
void POSE_OT_select_hierarchy(wmOperatorType *ot)
void POSE_OT_paths_clear(wmOperatorType *ot)
Definition pose_edit.cc:417
void ARMATURE_OT_collection_deselect(wmOperatorType *ot)
void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot)
@ OPTYPE_REGISTER
Definition WM_types.hh:188
@ OPTYPE_UNDO
Definition WM_types.hh:190
void POSE_OT_loc_clear(wmOperatorType *ot)
void ARMATURE_OT_collection_create_and_assign(wmOperatorType *ot)
void POSE_OT_select_mirror(wmOperatorType *ot)
void POSE_OT_select_all(wmOperatorType *ot)
void ARMATURE_OT_symmetrize(wmOperatorType *ot)
void ARMATURE_OT_collection_remove(wmOperatorType *ot)
void POSELIB_OT_apply_pose_asset(wmOperatorType *ot)
void POSE_OT_push(wmOperatorType *ot)
void POSE_OT_rotation_mode_set(wmOperatorType *ot)
Definition pose_edit.cc:635
void POSE_OT_autoside_names(wmOperatorType *ot)
Definition pose_edit.cc:571
void POSE_OT_propagate(wmOperatorType *ot)
void POSE_OT_user_transforms_clear(wmOperatorType *ot)
void POSE_OT_reveal(wmOperatorType *ot)
Definition pose_edit.cc:756
void POSE_OT_visual_transform_apply(wmOperatorType *ot)
void ARMATURE_OT_collection_unassign_named(wmOperatorType *ot)
void ARMATURE_OT_collection_unassign(wmOperatorType *ot)
bool(*) poll(struct bContext *)