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