Blender V5.0
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
11
12#include <cstring>
13
14#include "DNA_armature_types.h"
15#include "DNA_camera_types.h"
17#include "DNA_object_types.h"
18
19#include "BLI_ghash.h"
21#include "BLI_string.h"
22#include "BLI_string_utf8.h"
23#include "BLI_string_utils.hh"
24#include "BLI_utildefines.h"
25
26#include "BLT_translation.hh"
27
28#include "BKE_action.hh"
29#include "BKE_animsys.h"
30#include "BKE_armature.hh"
31#include "BKE_constraint.h"
32#include "BKE_context.hh"
33#include "BKE_deform.hh"
34#include "BKE_grease_pencil.hh"
35#include "BKE_layer.hh"
36#include "BKE_main.hh"
37#include "BKE_modifier.hh"
38
39#include "DEG_depsgraph.hh"
40
41#include "RNA_access.hh"
42#include "RNA_define.hh"
43
44#include "WM_api.hh"
45#include "WM_types.hh"
46
47#include "ED_armature.hh"
48#include "ED_screen.hh"
49
50#include "ANIM_armature.hh"
51
52#include "armature_intern.hh"
53
54using namespace blender;
55
56/* -------------------------------------------------------------------- */
59
60/* NOTE: there's a ed_armature_bone_unique_name() too! */
61static bool editbone_unique_check(ListBase *ebones, const StringRefNull name, EditBone *bone)
62{
63 if (bone) {
64 /* This indicates that there is a bone to ignore. This means ED_armature_ebone_find_name()
65 * cannot be used, as it might return the bone we should be ignoring. */
66 for (EditBone *ebone : ListBaseWrapper<EditBone>(ebones)) {
67 if (ebone->name == name && ebone != bone) {
68 return true;
69 }
70 }
71 return false;
72 }
73
74 EditBone *dupli = ED_armature_ebone_find_name(ebones, name.c_str());
75 return dupli && dupli != bone;
76}
77
79{
81 [&](const StringRefNull check_name) {
82 return editbone_unique_check(ebones, check_name, bone);
83 },
84 DATA_("Bone"),
85 '.',
86 name,
87 sizeof(bone->name));
88}
89
91
92/* -------------------------------------------------------------------- */
95
97{
99 [&](const StringRefNull check_name) {
100 return BKE_armature_find_bone_name(arm, check_name.c_str()) != nullptr;
101 },
102 DATA_("Bone"),
103 '.',
104 name,
105 sizeof(Bone::name));
106}
107
109
110/* -------------------------------------------------------------------- */
113
120static void constraint_bone_name_fix(Object *rename_ob,
121 Object *constraint_ob,
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 == rename_ob) {
133 if (STREQ(ct->subtarget, oldname)) {
134 STRNCPY_UTF8(ct->subtarget, newname);
135 }
136 }
137 }
138
139 BKE_constraint_targets_flush(curcon, &targets, false);
140 }
141
142 /* Actions from action constraints.
143 *
144 * We only rename channels in the action if the action constraint and the
145 * bone rename are from the same object. This is because the action of an
146 * action constraint animates the constrained object/bone, it does not
147 * animate the constraint target. */
148 if (curcon->type == CONSTRAINT_TYPE_ACTION && constraint_ob == rename_ob) {
149 bActionConstraint *actcon = static_cast<bActionConstraint *>(curcon->data);
151 actcon->act,
152 actcon->action_slot_handle,
153 "pose.bones",
154 oldname,
155 newname,
156 0,
157 0,
158 true);
159 }
160 }
161}
162
164 bArmature *arm,
165 const char *oldnamep,
166 const char *newnamep)
167{
168 Object *ob;
169 char newname[MAXBONENAME];
170 char oldname[MAXBONENAME];
171
172 /* names better differ! */
173 if (!STREQLEN(oldnamep, newnamep, MAXBONENAME)) {
174
175 /* we alter newname string... so make copy */
176 STRNCPY_UTF8(newname, newnamep);
177 /* we use oldname for search... so make copy */
178 STRNCPY(oldname, oldnamep); /* Allow non UTF8 encoding for the old name. */
179
180 /* now check if we're in editmode, we need to find the unique name */
181 if (arm->edbo) {
182 EditBone *eBone = ED_armature_ebone_find_name(arm->edbo, oldname);
183
184 if (eBone) {
185 ED_armature_ebone_unique_name(arm->edbo, newname, nullptr);
186 STRNCPY_UTF8(eBone->name, newname);
187 }
188 else {
189 return;
190 }
191 }
192 else {
193 Bone *bone = BKE_armature_find_bone_name(arm, oldname);
194
195 if (bone) {
196 ed_armature_bone_unique_name(arm, newname);
197
198 if (arm->bonehash) {
200 BLI_ghash_remove(arm->bonehash, bone->name, nullptr, nullptr);
201 }
202
203 STRNCPY_UTF8(bone->name, newname);
204
205 if (arm->bonehash) {
206 BLI_ghash_insert(arm->bonehash, bone->name, bone);
207 }
208 }
209 else {
210 return;
211 }
212 }
213
214 /* force evaluation copy to update database */
216
217 /* do entire dbase - objects */
218 for (ob = static_cast<Object *>(bmain->objects.first); ob;
219 ob = static_cast<Object *>(ob->id.next))
220 {
221
222 /* we have the object using the armature */
223 if (arm == ob->data) {
224 Object *cob;
225
226 /* Rename the pose channel, if it exists */
227 if (ob->pose) {
228 bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, oldname);
229 if (pchan) {
230 GHash *gh = ob->pose->chanhash;
231
232 /* remove the old hash entry, and replace with the new name */
233 if (gh) {
234 BLI_assert(BLI_ghash_haskey(gh, pchan->name));
235 BLI_ghash_remove(gh, pchan->name, nullptr, nullptr);
236 }
237
238 STRNCPY_UTF8(pchan->name, newname);
239
240 if (gh) {
241 BLI_ghash_insert(gh, pchan->name, pchan);
242 }
243 }
244
246 }
247
248 /* Update any object constraints to use the new bone name */
249 for (cob = static_cast<Object *>(bmain->objects.first); cob;
250 cob = static_cast<Object *>(cob->id.next))
251 {
252 if (cob->constraints.first) {
253 constraint_bone_name_fix(ob, cob, &cob->constraints, oldname, newname);
254 }
255 if (cob->pose) {
256 LISTBASE_FOREACH (bPoseChannel *, pchan, &cob->pose->chanbase) {
257 constraint_bone_name_fix(ob, cob, &pchan->constraints, oldname, newname);
258 }
259 }
260 }
261 }
262
263 /* See if an object is parented to this armature */
264 if (ob->parent && (ob->parent->data == arm)) {
265 if (ob->partype == PARBONE) {
266 /* bone name in object */
267 if (STREQ(ob->parsubstr, oldname)) {
268 STRNCPY_UTF8(ob->parsubstr, newname);
269 }
270 }
271 }
272
274 if (BKE_object_defgroup_find_name(ob, newname)) {
276 "New bone name collides with an existing vertex "
277 "group name, vertex group "
278 "names are unchanged. (%s::%s)",
279 &ob->id.name[2],
280 newname);
281 /* Not renaming vertex group could cause bone to bind to other vertex group, in this case
282 * deformation could change, so we tag this object for depsgraph update. */
283 DEG_id_tag_update(static_cast<ID *>(ob->data), ID_RECALC_GEOMETRY);
284 }
285 else if (bDeformGroup *dg = BKE_object_defgroup_find_name(ob, oldname)) {
286 STRNCPY_UTF8(dg->name, newname);
287
288 if (ob->type == OB_GREASE_PENCIL) {
289 /* Update vgroup names stored in CurvesGeometry */
291 }
292
293 DEG_id_tag_update(static_cast<ID *>(ob->data), ID_RECALC_GEOMETRY);
294 }
295 }
296
297 /* fix modifiers that might be using this name */
299 switch (md->type) {
300 case eModifierType_Hook: {
301 HookModifierData *hmd = reinterpret_cast<HookModifierData *>(md);
302
303 if (hmd->object && (hmd->object->data == arm)) {
304 if (STREQ(hmd->subtarget, oldname)) {
305 STRNCPY_UTF8(hmd->subtarget, newname);
306 }
307 }
308 break;
309 }
311 UVWarpModifierData *umd = reinterpret_cast<UVWarpModifierData *>(md);
312
313 if (umd->object_src && (umd->object_src->data == arm)) {
314 if (STREQ(umd->bone_src, oldname)) {
315 STRNCPY_UTF8(umd->bone_src, newname);
316 }
317 }
318 if (umd->object_dst && (umd->object_dst->data == arm)) {
319 if (STREQ(umd->bone_dst, oldname)) {
320 STRNCPY_UTF8(umd->bone_dst, newname);
321 }
322 }
323 break;
324 }
325 default:
326 break;
327 }
328 }
329
330 /* fix camera focus */
331 if (ob->type == OB_CAMERA) {
332 Camera *cam = static_cast<Camera *>(ob->data);
333 if ((cam->dof.focus_object != nullptr) && (cam->dof.focus_object->data == arm)) {
334 if (STREQ(cam->dof.focus_subtarget, oldname)) {
335 STRNCPY_UTF8(cam->dof.focus_subtarget, newname);
337 }
338 }
339 }
340
341 if (ob->type == OB_GREASE_PENCIL) {
342 using namespace blender;
343 GreasePencil &grease_pencil = *static_cast<GreasePencil *>(ob->data);
344 for (bke::greasepencil::Layer *layer : grease_pencil.layers_for_write()) {
345 Object *parent = layer->parent;
346 if (parent == nullptr) {
347 continue;
348 }
349 StringRefNull bone_name = layer->parent_bone_name();
350 if (!bone_name.is_empty() && bone_name == StringRef(oldname)) {
351 layer->set_parent_bone_name(newname);
352 }
353 }
354 }
355
357 }
358
359 /* Fix all animdata that may refer to this bone -
360 * we can't just do the ones attached to objects,
361 * since other ID-blocks may have drivers referring to this bone #29822. */
362
363 /* XXX: the ID here is for armatures,
364 * but most bone drivers are actually on the object instead. */
365 {
366
367 BKE_animdata_fix_paths_rename_all(&arm->id, "pose.bones", oldname, newname);
368 }
369
370 /* correct view locking */
371 {
372 bScreen *screen;
373 for (screen = static_cast<bScreen *>(bmain->screens.first); screen;
374 screen = static_cast<bScreen *>(screen->id.next))
375 {
376 /* add regions */
377 LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
378 LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
379 if (sl->spacetype == SPACE_VIEW3D) {
380 View3D *v3d = reinterpret_cast<View3D *>(sl);
381 if (v3d->ob_center && v3d->ob_center->data == arm) {
382 if (STREQ(v3d->ob_center_bone, oldname)) {
383 STRNCPY_UTF8(v3d->ob_center_bone, newname);
384 }
385 }
386 }
387 }
388 }
389 }
390 }
391 }
392}
393
395
396/* -------------------------------------------------------------------- */
399
405
407 bArmature *arm,
408 ListBase *bones_names,
409 const bool do_strip_numbers)
410{
411 ListBase bones_names_conflicts = {nullptr};
412 BoneFlipNameData *bfn;
413
414 /* First pass: generate flip names, and blindly rename.
415 * If rename did not yield expected result,
416 * store both bone's name and expected flipped one into temp list for second pass. */
417 LISTBASE_FOREACH (LinkData *, link, bones_names) {
418 char name_flip[MAXBONENAME];
419 char *name = static_cast<char *>(link->data);
420
421 /* WARNING: if do_strip_numbers is set, expect completely mismatched names in cases like
422 * Bone.R, Bone.R.001, Bone.R.002, etc. */
423 BLI_string_flip_side_name(name_flip, name, do_strip_numbers, sizeof(name_flip));
424
425 ED_armature_bone_rename(bmain, arm, name, name_flip);
426
427 if (!STREQ(name, name_flip)) {
428 bfn = static_cast<BoneFlipNameData *>(alloca(sizeof(BoneFlipNameData)));
429 bfn->name = name;
430 STRNCPY_UTF8(bfn->name_flip, name_flip);
431 BLI_addtail(&bones_names_conflicts, bfn);
432 }
433 }
434
435 /* Second pass to handle the bones that have naming conflicts with other bones.
436 * Note that if the other bone was not selected, its name was not flipped,
437 * so conflict remains and that second rename simply generates a new numbered alternative name.
438 */
439 LISTBASE_FOREACH (BoneFlipNameData *, bfn, &bones_names_conflicts) {
440 ED_armature_bone_rename(bmain, arm, bfn->name, bfn->name_flip);
441 }
442}
443
445
446/* -------------------------------------------------------------------- */
449
451{
452 Main *bmain = CTX_data_main(C);
453 const Scene *scene = CTX_data_scene(C);
454 ViewLayer *view_layer = CTX_data_view_layer(C);
455 Object *ob_active = CTX_data_edit_object(C);
456
457 const bool do_strip_numbers = RNA_boolean_get(op->ptr, "do_strip_numbers");
458
460 scene, view_layer, CTX_wm_view3d(C));
461 for (Object *ob : objects) {
462 bArmature *arm = static_cast<bArmature *>(ob->data);
463
464 /* Paranoia check. */
465 if (ob_active->pose == nullptr) {
466 continue;
467 }
468
469 ListBase bones_names = {nullptr};
470
471 LISTBASE_FOREACH (EditBone *, ebone, arm->edbo) {
472 if (blender::animrig::bone_is_selected(arm, ebone)) {
473 BLI_addtail(&bones_names, BLI_genericNodeN(ebone->name));
474
475 if (arm->flag & ARM_MIRROR_EDIT) {
476 EditBone *flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
477 if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) {
478 BLI_addtail(&bones_names, BLI_genericNodeN(flipbone->name));
479 }
480 }
481 }
482 }
483
484 if (BLI_listbase_is_empty(&bones_names)) {
485 continue;
486 }
487
488 ED_armature_bones_flip_names(bmain, arm, &bones_names, do_strip_numbers);
489
490 BLI_freelistN(&bones_names);
491
492 /* since we renamed stuff... */
494
495 /* copied from #rna_Bone_update_renamed */
496 /* Redraw Outliner / Dope-sheet. */
498
499 /* update animation channels */
501 }
502
503 return OPERATOR_FINISHED;
504}
505
507{
508 /* identifiers */
509 ot->name = "Flip Names";
510 ot->idname = "ARMATURE_OT_flip_names";
511 ot->description = "Flips (and corrects) the axis suffixes of the names of selected bones";
512
513 /* API callbacks. */
516
517 /* flags */
519
520 RNA_def_boolean(ot->srna,
521 "do_strip_numbers",
522 false,
523 "Strip Numbers",
524 "Try to remove right-most dot-number from flipped names.\n"
525 "Warning: May result in incoherent naming in some cases");
526}
527
529
530/* -------------------------------------------------------------------- */
533
535{
536 const Scene *scene = CTX_data_scene(C);
537 ViewLayer *view_layer = CTX_data_view_layer(C);
538 Main *bmain = CTX_data_main(C);
539 char newname[MAXBONENAME];
540 const short axis = RNA_enum_get(op->ptr, "type");
541 bool changed_multi = false;
542
544 scene, view_layer, CTX_wm_view3d(C));
545 for (Object *ob : objects) {
546 bArmature *arm = static_cast<bArmature *>(ob->data);
547 bool changed = false;
548
549 /* Paranoia checks. */
550 if (ELEM(nullptr, ob, ob->pose)) {
551 continue;
552 }
553
554 LISTBASE_FOREACH (EditBone *, ebone, arm->edbo) {
555 if (EBONE_EDITABLE(ebone)) {
556
557 /* We first need to do the flipped bone, then the original one.
558 * Otherwise we can't find the flipped one because of the bone name change. */
559 if (arm->flag & ARM_MIRROR_EDIT) {
560 EditBone *flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
561 if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) {
562 STRNCPY_UTF8(newname, flipbone->name);
563 if (bone_autoside_name(newname, 1, axis, flipbone->head[axis], flipbone->tail[axis])) {
564 ED_armature_bone_rename(bmain, arm, flipbone->name, newname);
565 changed = true;
566 }
567 }
568 }
569
570 STRNCPY_UTF8(newname, ebone->name);
571 if (bone_autoside_name(newname, 1, axis, ebone->head[axis], ebone->tail[axis])) {
572 ED_armature_bone_rename(bmain, arm, ebone->name, newname);
573 changed = true;
574 }
575 }
576 }
577
578 if (!changed) {
579 continue;
580 }
581
582 changed_multi = true;
583
584 /* Since we renamed stuff... */
586
587 /* NOTE: notifier might evolve. */
589 }
590 return changed_multi ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
591}
592
594{
595 static const EnumPropertyItem axis_items[] = {
596 {0, "XAXIS", 0, "X-Axis", "Left/Right"},
597 {1, "YAXIS", 0, "Y-Axis", "Front/Back"},
598 {2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"},
599 {0, nullptr, 0, nullptr, nullptr},
600 };
601
602 /* identifiers */
603 ot->name = "Auto-Name by Axis";
604 ot->idname = "ARMATURE_OT_autoside_names";
605 ot->description =
606 "Automatically renames the selected bones according to which side of the target axis they "
607 "fall on";
608
609 /* API callbacks. */
610 ot->invoke = WM_menu_invoke;
613
614 /* flags */
616
617 /* settings */
618 ot->prop = RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis to tag names with");
619}
620
Functions to deal with Armatures.
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, int32_t slot_handle, 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)
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:463
bDeformGroup * BKE_object_defgroup_find_name(const Object *ob, blender::StringRef name)
Definition deform.cc:526
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)
@ RPT_WARNING
Definition BKE_report.hh:38
#define BLI_assert(a)
Definition BLI_assert.h:46
bool BLI_ghash_haskey(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
Definition BLI_ghash.cc:819
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
Definition BLI_ghash.cc:787
void BLI_ghash_insert(GHash *gh, void *key, void *val)
Definition BLI_ghash.cc:707
LinkData * BLI_genericNodeN(void *data)
Definition listbase.cc:922
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:497
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:693
#define STRNCPY_UTF8(dst, src)
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(blender::FunctionRef< bool(blender::StringRefNull)> unique_check, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(2
#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:1118
@ ID_RECALC_GEOMETRY
Definition DNA_ID.h:1074
#define MAXBONENAME
@ BONE_SELECTED
@ ARM_MIRROR_EDIT
@ CONSTRAINT_TYPE_ACTION
@ eModifierType_Hook
@ eModifierType_UVWarp
Object is a sort of wrapper for general info.
@ PARBONE
@ OB_CAMERA
@ OB_GREASE_PENCIL
@ SPACE_VIEW3D
@ OPERATOR_CANCELLED
@ OPERATOR_FINISHED
#define EBONE_EDITABLE(ebone)
bool ED_operator_editarmature(bContext *C)
#define C
Definition RandGen.cpp:29
#define NC_GEOM
Definition WM_types.hh:393
#define ND_DATA
Definition WM_types.hh:509
#define NC_ANIMATION
Definition WM_types.hh:388
@ OPTYPE_UNDO
Definition WM_types.hh:182
@ OPTYPE_REGISTER
Definition WM_types.hh:180
#define ND_POSE
Definition WM_types.hh:458
#define NA_RENAME
Definition WM_types.hh:588
#define NC_OBJECT
Definition WM_types.hh:379
#define ND_ANIMCHAN
Definition WM_types.hh:496
static void constraint_bone_name_fix(Object *rename_ob, Object *constraint_ob, ListBase *conlist, const char *oldname, const char *newname)
void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep, const char *newnamep)
static wmOperatorStatus armature_autoside_names_exec(bContext *C, wmOperator *op)
static void ed_armature_bone_unique_name(bArmature *arm, char *name)
void ARMATURE_OT_flip_names(wmOperatorType *ot)
static wmOperatorStatus armature_flip_names_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_autoside_names(wmOperatorType *ot)
static bool editbone_unique_check(ListBase *ebones, const StringRefNull name, EditBone *bone)
void ED_armature_ebone_unique_name(ListBase *ebones, char *name, EditBone *bone)
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
constexpr const char * c_str() const
bool bone_is_selected(const bArmature *armature, const Bone *bone)
ListBaseWrapperTemplate< ListBase, T > ListBaseWrapper
const char * name
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]
float head[3]
struct Object * object
Definition DNA_ID.h:414
char name[258]
Definition DNA_ID.h:432
void * next
Definition DNA_ID.h:417
void * first
ListBase screens
Definition BKE_main.hh:292
ListBase objects
Definition BKE_main.hh:280
ustring name
Definition graph/node.h:177
ListBase constraints
struct bPose * pose
ListBase 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
ListBase areabase
struct PointerRNA * ptr
void WM_global_reportf(eReportType type, const char *format,...)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorType * ot
Definition wm_files.cc:4237
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)