Blender V4.3
armature_naming.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
12#include <cstring>
13
14#include "MEM_guardedalloc.h"
15
16#include "DNA_armature_types.h"
17#include "DNA_camera_types.h"
21#include "DNA_object_types.h"
22
23#include "BLI_blenlib.h"
24#include "BLI_ghash.h"
26#include "BLI_string_utils.hh"
27#include "BLI_utildefines.h"
28
29#include "BLT_translation.hh"
30
31#include "BKE_action.hh"
32#include "BKE_animsys.h"
33#include "BKE_armature.hh"
34#include "BKE_constraint.h"
35#include "BKE_context.hh"
36#include "BKE_deform.hh"
37#include "BKE_grease_pencil.hh"
38#include "BKE_layer.hh"
39#include "BKE_main.hh"
40#include "BKE_modifier.hh"
41
42#include "DEG_depsgraph.hh"
43
44#include "RNA_access.hh"
45#include "RNA_define.hh"
46
47#include "WM_api.hh"
48#include "WM_types.hh"
49
50#include "ED_armature.hh"
51#include "ED_screen.hh"
52
54
55#include "armature_intern.hh"
56
57using namespace blender;
58
59/* -------------------------------------------------------------------- */
63/* NOTE: there's a ed_armature_bone_unique_name() too! */
64static bool editbone_unique_check(void *arg, const char *name)
65{
66 struct Arg {
67 ListBase *lb;
68 void *bone;
69 } *data = static_cast<Arg *>(arg);
70
71 if (data->bone) {
72 /* This indicates that there is a bone to ignore. This means ED_armature_ebone_find_name()
73 * cannot be used, as it might return the bone we should be ignoring. */
74 for (EditBone *ebone : ListBaseWrapper<EditBone>(data->lb)) {
75 if (STREQ(ebone->name, name) && ebone != data->bone) {
76 return true;
77 }
78 }
79 return false;
80 }
81
82 EditBone *dupli = ED_armature_ebone_find_name(data->lb, name);
83 return dupli && dupli != data->bone;
84}
85
86void ED_armature_ebone_unique_name(ListBase *ebones, char *name, EditBone *bone)
87{
88 struct {
89 ListBase *lb;
90 void *bone;
91 } data;
92 data.lb = ebones;
93 data.bone = bone;
94
95 BLI_uniquename_cb(editbone_unique_check, &data, DATA_("Bone"), '.', name, sizeof(bone->name));
96}
97
100/* -------------------------------------------------------------------- */
104static bool bone_unique_check(void *arg, const char *name)
105{
106 return BKE_armature_find_bone_name((bArmature *)arg, name) != nullptr;
107}
108
109static void ed_armature_bone_unique_name(bArmature *arm, char *name)
110{
111 BLI_uniquename_cb(bone_unique_check, (void *)arm, DATA_("Bone"), '.', name, sizeof(Bone::name));
112}
113
116/* -------------------------------------------------------------------- */
120/* helper call for armature_bone_rename */
122 ListBase *conlist,
123 const char *oldname,
124 const char *newname)
125{
126 LISTBASE_FOREACH (bConstraint *, curcon, conlist) {
127 ListBase targets = {nullptr, nullptr};
128
129 /* constraint targets */
130 if (BKE_constraint_targets_get(curcon, &targets)) {
131 LISTBASE_FOREACH (bConstraintTarget *, ct, &targets) {
132 if (ct->tar == ob) {
133 if (STREQ(ct->subtarget, oldname)) {
134 STRNCPY(ct->subtarget, newname);
135 }
136 }
137 }
138
139 BKE_constraint_targets_flush(curcon, &targets, false);
140 }
141
142 /* action constraints */
143 if (curcon->type == CONSTRAINT_TYPE_ACTION) {
144 bActionConstraint *actcon = (bActionConstraint *)curcon->data;
146 &ob->id, actcon->act, "pose.bones", oldname, newname, 0, 0, true);
147 }
148 }
149}
150
152 bArmature *arm,
153 const char *oldnamep,
154 const char *newnamep)
155{
156 Object *ob;
157 char newname[MAXBONENAME];
158 char oldname[MAXBONENAME];
159
160 /* names better differ! */
161 if (!STREQLEN(oldnamep, newnamep, MAXBONENAME)) {
162
163 /* we alter newname string... so make copy */
164 STRNCPY(newname, newnamep);
165 /* we use oldname for search... so make copy */
166 STRNCPY(oldname, oldnamep);
167
168 /* now check if we're in editmode, we need to find the unique name */
169 if (arm->edbo) {
170 EditBone *eBone = ED_armature_ebone_find_name(arm->edbo, oldname);
171
172 if (eBone) {
173 ED_armature_ebone_unique_name(arm->edbo, newname, nullptr);
174 STRNCPY(eBone->name, newname);
175 }
176 else {
177 return;
178 }
179 }
180 else {
181 Bone *bone = BKE_armature_find_bone_name(arm, oldname);
182
183 if (bone) {
184 ed_armature_bone_unique_name(arm, newname);
185
186 if (arm->bonehash) {
188 BLI_ghash_remove(arm->bonehash, bone->name, nullptr, nullptr);
189 }
190
191 STRNCPY(bone->name, newname);
192
193 if (arm->bonehash) {
194 BLI_ghash_insert(arm->bonehash, bone->name, bone);
195 }
196 }
197 else {
198 return;
199 }
200 }
201
202 /* force evaluation copy to update database */
204
205 /* do entire dbase - objects */
206 for (ob = static_cast<Object *>(bmain->objects.first); ob;
207 ob = static_cast<Object *>(ob->id.next))
208 {
209
210 /* we have the object using the armature */
211 if (arm == ob->data) {
212 Object *cob;
213
214 /* Rename the pose channel, if it exists */
215 if (ob->pose) {
216 bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, oldname);
217 if (pchan) {
218 GHash *gh = ob->pose->chanhash;
219
220 /* remove the old hash entry, and replace with the new name */
221 if (gh) {
222 BLI_assert(BLI_ghash_haskey(gh, pchan->name));
223 BLI_ghash_remove(gh, pchan->name, nullptr, nullptr);
224 }
225
226 STRNCPY(pchan->name, newname);
227
228 if (gh) {
229 BLI_ghash_insert(gh, pchan->name, pchan);
230 }
231 }
232
234 }
235
236 /* Update any object constraints to use the new bone name */
237 for (cob = static_cast<Object *>(bmain->objects.first); cob;
238 cob = static_cast<Object *>(cob->id.next))
239 {
240 if (cob->constraints.first) {
241 constraint_bone_name_fix(ob, &cob->constraints, oldname, newname);
242 }
243 if (cob->pose) {
244 LISTBASE_FOREACH (bPoseChannel *, pchan, &cob->pose->chanbase) {
245 constraint_bone_name_fix(ob, &pchan->constraints, oldname, newname);
246 }
247 }
248 }
249 }
250
251 /* See if an object is parented to this armature */
252 if (ob->parent && (ob->parent->data == arm)) {
253 if (ob->partype == PARBONE) {
254 /* bone name in object */
255 if (STREQ(ob->parsubstr, oldname)) {
256 STRNCPY(ob->parsubstr, newname);
257 }
258 }
259 }
260
263 if (dg) {
264 STRNCPY(dg->name, newname);
265
266 if (ob->type == OB_GREASE_PENCIL) {
267 /* Update vgroup names stored in CurvesGeometry */
269 }
270
271 DEG_id_tag_update(static_cast<ID *>(ob->data), ID_RECALC_GEOMETRY);
272 }
273 }
274
275 /* fix modifiers that might be using this name */
277 switch (md->type) {
278 case eModifierType_Hook: {
280
281 if (hmd->object && (hmd->object->data == arm)) {
282 if (STREQ(hmd->subtarget, oldname)) {
283 STRNCPY(hmd->subtarget, newname);
284 }
285 }
286 break;
287 }
290
291 if (umd->object_src && (umd->object_src->data == arm)) {
292 if (STREQ(umd->bone_src, oldname)) {
293 STRNCPY(umd->bone_src, newname);
294 }
295 }
296 if (umd->object_dst && (umd->object_dst->data == arm)) {
297 if (STREQ(umd->bone_dst, oldname)) {
298 STRNCPY(umd->bone_dst, newname);
299 }
300 }
301 break;
302 }
303 default:
304 break;
305 }
306 }
307
308 /* fix camera focus */
309 if (ob->type == OB_CAMERA) {
310 Camera *cam = (Camera *)ob->data;
311 if ((cam->dof.focus_object != nullptr) && (cam->dof.focus_object->data == arm)) {
312 if (STREQ(cam->dof.focus_subtarget, oldname)) {
313 STRNCPY(cam->dof.focus_subtarget, newname);
315 }
316 }
317 }
318
319 /* fix grease pencil modifiers and vertex groups */
320 if (ob->type == OB_GPENCIL_LEGACY) {
321
322 bGPdata *gpd = (bGPdata *)ob->data;
323 LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
324 if ((gpl->parent != nullptr) && (gpl->parent->data == arm)) {
325 if (STREQ(gpl->parsubstr, oldname)) {
326 STRNCPY(gpl->parsubstr, newname);
327 }
328 }
329 }
330
332 switch (gp_md->type) {
335 if (mmd->object && mmd->object->data == arm) {
337 if (dg) {
338 STRNCPY(dg->name, newname);
339 DEG_id_tag_update(static_cast<ID *>(ob->data), ID_RECALC_GEOMETRY);
340 }
341 }
342 break;
343 }
346 if (hgp_md->object && (hgp_md->object->data == arm)) {
347 if (STREQ(hgp_md->subtarget, oldname)) {
348 STRNCPY(hgp_md->subtarget, newname);
349 }
350 }
351 break;
352 }
353 default:
354 break;
355 }
356 }
357 }
358
359 if (ob->type == OB_GREASE_PENCIL) {
360 using namespace blender;
361 GreasePencil &grease_pencil = *static_cast<GreasePencil *>(ob->data);
362 for (bke::greasepencil::Layer *layer : grease_pencil.layers_for_write()) {
363 Object *parent = layer->parent;
364 if (parent == nullptr) {
365 continue;
366 }
367 StringRefNull bone_name = layer->parent_bone_name();
368 if (!bone_name.is_empty() && bone_name == StringRef(oldname)) {
369 layer->set_parent_bone_name(newname);
370 }
371 }
372 }
373
375 }
376
377 /* Fix all animdata that may refer to this bone -
378 * we can't just do the ones attached to objects,
379 * since other ID-blocks may have drivers referring to this bone #29822. */
380
381 /* XXX: the ID here is for armatures,
382 * but most bone drivers are actually on the object instead. */
383 {
384
385 BKE_animdata_fix_paths_rename_all(&arm->id, "pose.bones", oldname, newname);
386 }
387
388 /* correct view locking */
389 {
390 bScreen *screen;
391 for (screen = static_cast<bScreen *>(bmain->screens.first); screen;
392 screen = static_cast<bScreen *>(screen->id.next))
393 {
394 /* add regions */
395 LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
396 LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
397 if (sl->spacetype == SPACE_VIEW3D) {
398 View3D *v3d = (View3D *)sl;
399 if (v3d->ob_center && v3d->ob_center->data == arm) {
400 if (STREQ(v3d->ob_center_bone, oldname)) {
401 STRNCPY(v3d->ob_center_bone, newname);
402 }
403 }
404 }
405 }
406 }
407 }
408 }
409 }
410}
411
414/* -------------------------------------------------------------------- */
423
425 bArmature *arm,
426 ListBase *bones_names,
427 const bool do_strip_numbers)
428{
429 ListBase bones_names_conflicts = {nullptr};
430 BoneFlipNameData *bfn;
431
432 /* First pass: generate flip names, and blindly rename.
433 * If rename did not yield expected result,
434 * store both bone's name and expected flipped one into temp list for second pass. */
435 LISTBASE_FOREACH (LinkData *, link, bones_names) {
436 char name_flip[MAXBONENAME];
437 char *name = static_cast<char *>(link->data);
438
439 /* WARNING: if do_strip_numbers is set, expect completely mismatched names in cases like
440 * Bone.R, Bone.R.001, Bone.R.002, etc. */
441 BLI_string_flip_side_name(name_flip, name, do_strip_numbers, sizeof(name_flip));
442
443 ED_armature_bone_rename(bmain, arm, name, name_flip);
444
445 if (!STREQ(name, name_flip)) {
446 bfn = static_cast<BoneFlipNameData *>(alloca(sizeof(BoneFlipNameData)));
447 bfn->name = name;
448 STRNCPY(bfn->name_flip, name_flip);
449 BLI_addtail(&bones_names_conflicts, bfn);
450 }
451 }
452
453 /* Second pass to handle the bones that have naming conflicts with other bones.
454 * Note that if the other bone was not selected, its name was not flipped,
455 * so conflict remains and that second rename simply generates a new numbered alternative name.
456 */
457 LISTBASE_FOREACH (BoneFlipNameData *, bfn, &bones_names_conflicts) {
458 ED_armature_bone_rename(bmain, arm, bfn->name, bfn->name_flip);
459 }
460}
461
464/* -------------------------------------------------------------------- */
469{
470 Main *bmain = CTX_data_main(C);
471 const Scene *scene = CTX_data_scene(C);
472 ViewLayer *view_layer = CTX_data_view_layer(C);
473 Object *ob_active = CTX_data_edit_object(C);
474
475 const bool do_strip_numbers = RNA_boolean_get(op->ptr, "do_strip_numbers");
476
478 scene, view_layer, CTX_wm_view3d(C));
479 for (Object *ob : objects) {
480 bArmature *arm = static_cast<bArmature *>(ob->data);
481
482 /* Paranoia check. */
483 if (ob_active->pose == nullptr) {
484 continue;
485 }
486
487 ListBase bones_names = {nullptr};
488
489 LISTBASE_FOREACH (EditBone *, ebone, arm->edbo) {
490 if (EBONE_VISIBLE(arm, ebone)) {
491 if (ebone->flag & BONE_SELECTED) {
492 BLI_addtail(&bones_names, BLI_genericNodeN(ebone->name));
493
494 if (arm->flag & ARM_MIRROR_EDIT) {
495 EditBone *flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
496 if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) {
497 BLI_addtail(&bones_names, BLI_genericNodeN(flipbone->name));
498 }
499 }
500 }
501 }
502 }
503
504 if (BLI_listbase_is_empty(&bones_names)) {
505 continue;
506 }
507
508 ED_armature_bones_flip_names(bmain, arm, &bones_names, do_strip_numbers);
509
510 BLI_freelistN(&bones_names);
511
512 /* since we renamed stuff... */
514
515 /* copied from #rna_Bone_update_renamed */
516 /* Redraw Outliner / Dopesheet. */
518
519 /* update animation channels */
521 }
522
523 return OPERATOR_FINISHED;
524}
525
527{
528 /* identifiers */
529 ot->name = "Flip Names";
530 ot->idname = "ARMATURE_OT_flip_names";
531 ot->description = "Flips (and corrects) the axis suffixes of the names of selected bones";
532
533 /* api callbacks */
536
537 /* flags */
539
541 "do_strip_numbers",
542 false,
543 "Strip Numbers",
544 "Try to remove right-most dot-number from flipped names.\n"
545 "Warning: May result in incoherent naming in some cases");
546}
547
550/* -------------------------------------------------------------------- */
555{
556 const Scene *scene = CTX_data_scene(C);
557 ViewLayer *view_layer = CTX_data_view_layer(C);
558 Main *bmain = CTX_data_main(C);
559 char newname[MAXBONENAME];
560 const short axis = RNA_enum_get(op->ptr, "type");
561 bool changed_multi = false;
562
564 scene, view_layer, CTX_wm_view3d(C));
565 for (Object *ob : objects) {
566 bArmature *arm = static_cast<bArmature *>(ob->data);
567 bool changed = false;
568
569 /* Paranoia checks. */
570 if (ELEM(nullptr, ob, ob->pose)) {
571 continue;
572 }
573
574 LISTBASE_FOREACH (EditBone *, ebone, arm->edbo) {
575 if (EBONE_EDITABLE(ebone)) {
576
577 /* We first need to do the flipped bone, then the original one.
578 * Otherwise we can't find the flipped one because of the bone name change. */
579 if (arm->flag & ARM_MIRROR_EDIT) {
580 EditBone *flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
581 if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) {
582 STRNCPY(newname, flipbone->name);
583 if (bone_autoside_name(newname, 1, axis, flipbone->head[axis], flipbone->tail[axis])) {
584 ED_armature_bone_rename(bmain, arm, flipbone->name, newname);
585 changed = true;
586 }
587 }
588 }
589
590 STRNCPY(newname, ebone->name);
591 if (bone_autoside_name(newname, 1, axis, ebone->head[axis], ebone->tail[axis])) {
592 ED_armature_bone_rename(bmain, arm, ebone->name, newname);
593 changed = true;
594 }
595 }
596 }
597
598 if (!changed) {
599 continue;
600 }
601
602 changed_multi = true;
603
604 /* Since we renamed stuff... */
606
607 /* NOTE: notifier might evolve. */
609 }
610 return changed_multi ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
611}
612
614{
615 static const EnumPropertyItem axis_items[] = {
616 {0, "XAXIS", 0, "X-Axis", "Left/Right"},
617 {1, "YAXIS", 0, "Y-Axis", "Front/Back"},
618 {2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"},
619 {0, nullptr, 0, nullptr, nullptr},
620 };
621
622 /* identifiers */
623 ot->name = "Auto-Name by Axis";
624 ot->idname = "ARMATURE_OT_autoside_names";
625 ot->description =
626 "Automatically renames the selected bones according to which side of the target axis they "
627 "fall on";
628
629 /* api callbacks */
633
634 /* flags */
636
637 /* settings */
638 ot->prop = RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis to tag names with");
639}
640
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
Blender kernel action and pose functionality.
bool BKE_pose_channels_is_valid(const bPose *pose) ATTR_WARN_UNUSED_RESULT
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
void BKE_action_fix_paths_rename(struct ID *owner_id, struct bAction *act, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
Bone * BKE_armature_find_bone_name(bArmature *arm, const char *name)
Definition armature.cc:779
bool bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail)
void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy)
int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
Main * CTX_data_main(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
support for deformation groups and hooks.
bool BKE_object_supports_vertex_groups(const Object *ob)
Definition deform.cc:457
bDeformGroup * BKE_object_defgroup_find_name(const Object *ob, blender::StringRef name)
Definition deform.cc:520
Low-level operations for grease pencil.
void BKE_grease_pencil_vgroup_name_update(Object *ob, const char *old_name, const char *new_name)
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
bool BKE_modifiers_uses_armature(Object *ob, bArmature *arm)
#define BLI_assert(a)
Definition BLI_assert.h:50
bool BLI_ghash_haskey(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
Definition BLI_ghash.c:819
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
Definition BLI_ghash.c:787
void BLI_ghash_insert(GHash *gh, void *key, void *val)
Definition BLI_ghash.c:707
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:496
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:110
struct LinkData * BLI_genericNodeN(void *data)
Definition listbase.cc:909
#define STRNCPY(dst, src)
Definition BLI_string.h:593
size_t BLI_string_flip_side_name(char *name_dst, const char *name_src, bool strip_number, size_t name_dst_maxncpy) ATTR_NONNULL(1
size_t void BLI_uniquename_cb(UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(1
#define STREQLEN(a, b, n)
#define ELEM(...)
#define STREQ(a, b)
#define DATA_(msgid)
void DEG_id_tag_update(ID *id, unsigned int flags)
@ ID_RECALC_SYNC_TO_EVAL
Definition DNA_ID.h:1085
@ ID_RECALC_GEOMETRY
Definition DNA_ID.h:1041
#define MAXBONENAME
@ BONE_SELECTED
@ ARM_MIRROR_EDIT
@ CONSTRAINT_TYPE_ACTION
@ eGpencilModifierType_Hook
@ eGpencilModifierType_Armature
@ eModifierType_Hook
@ eModifierType_UVWarp
Object is a sort of wrapper for general info.
@ PARBONE
@ OB_CAMERA
@ OB_GREASE_PENCIL
@ OB_GPENCIL_LEGACY
@ SPACE_VIEW3D
#define EBONE_VISIBLE(arm, ebone)
#define EBONE_EDITABLE(ebone)
bool ED_operator_editarmature(bContext *C)
Read Guarded memory(de)allocation.
@ OPTYPE_UNDO
Definition WM_types.hh:162
@ OPTYPE_REGISTER
Definition WM_types.hh:160
#define NC_GEOM
Definition WM_types.hh:360
#define ND_DATA
Definition WM_types.hh:475
#define NC_ANIMATION
Definition WM_types.hh:355
#define ND_POSE
Definition WM_types.hh:425
#define NA_RENAME
Definition WM_types.hh:554
#define NC_OBJECT
Definition WM_types.hh:346
#define ND_ANIMCHAN
Definition WM_types.hh:463
static int armature_autoside_names_exec(bContext *C, wmOperator *op)
static bool editbone_unique_check(void *arg, const char *name)
void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep, const char *newnamep)
static bool bone_unique_check(void *arg, const char *name)
static void ed_armature_bone_unique_name(bArmature *arm, char *name)
static int armature_flip_names_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_flip_names(wmOperatorType *ot)
void ARMATURE_OT_autoside_names(wmOperatorType *ot)
void ED_armature_ebone_unique_name(ListBase *ebones, char *name, EditBone *bone)
static void constraint_bone_name_fix(Object *ob, ListBase *conlist, const char *oldname, const char *newname)
void ED_armature_bones_flip_names(Main *bmain, bArmature *arm, ListBase *bones_names, const bool do_strip_numbers)
EditBone * ED_armature_ebone_find_name(const ListBase *edbo, const char *name)
EditBone * ED_armature_ebone_get_mirrored(const ListBase *edbo, EditBone *ebo)
constexpr bool is_empty() const
ListBaseWrapperTemplate< ListBase, T > ListBaseWrapper
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
BoneFlipNameData * next
BoneFlipNameData * prev
char name_flip[MAXBONENAME]
char name[64]
struct Object * focus_object
struct CameraDOFSettings dof
char name[64]
float tail[3]
Bone * bone
float head[3]
struct Object * object
Definition DNA_ID.h:413
void * next
Definition DNA_ID.h:416
void * first
ListBase screens
Definition BKE_main.hh:225
ListBase objects
Definition BKE_main.hh:212
ListBase constraints
struct bPose * pose
ListBase modifiers
ListBase greasepencil_modifiers
struct Object * parent
char parsubstr[64]
struct Object * object_dst
struct Object * object_src
char ob_center_bone[64]
struct Object * ob_center
struct GHash * bonehash
ListBase * edbo
ListBase chanbase
struct GHash * chanhash
const char * name
Definition WM_types.hh:990
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1042
const char * idname
Definition WM_types.hh:992
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1022
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1006
const char * description
Definition WM_types.hh:996
PropertyRNA * prop
Definition WM_types.hh:1092
StructRNA * srna
Definition WM_types.hh:1080
struct PointerRNA * ptr
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorType * ot
Definition wm_files.cc:4125
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)