Blender  V3.3
armature_naming.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
11 #include <string.h>
12 
13 #include "MEM_guardedalloc.h"
14 
15 #include "DNA_armature_types.h"
16 #include "DNA_camera_types.h"
17 #include "DNA_constraint_types.h"
19 #include "DNA_gpencil_types.h"
20 #include "DNA_object_types.h"
21 
22 #include "BLI_blenlib.h"
23 #include "BLI_ghash.h"
24 #include "BLI_string_utils.h"
25 #include "BLI_utildefines.h"
26 
27 #include "BLT_translation.h"
28 
29 #include "BKE_action.h"
30 #include "BKE_animsys.h"
31 #include "BKE_armature.h"
32 #include "BKE_constraint.h"
33 #include "BKE_context.h"
34 #include "BKE_deform.h"
35 #include "BKE_gpencil_modifier.h"
36 #include "BKE_layer.h"
37 #include "BKE_main.h"
38 #include "BKE_modifier.h"
39 
40 #include "DEG_depsgraph.h"
41 
42 #include "RNA_access.h"
43 #include "RNA_define.h"
44 
45 #include "WM_api.h"
46 #include "WM_types.h"
47 
48 #include "ED_armature.h"
49 #include "ED_screen.h"
50 
51 #include "armature_intern.h"
52 
53 /* -------------------------------------------------------------------- */
57 /* NOTE: there's a ed_armature_bone_unique_name() too! */
58 static bool editbone_unique_check(void *arg, const char *name)
59 {
60  struct {
61  ListBase *lb;
62  void *bone;
63  } *data = arg;
64  EditBone *dupli = ED_armature_ebone_find_name(data->lb, name);
65  return dupli && dupli != data->bone;
66 }
67 
68 void ED_armature_ebone_unique_name(ListBase *ebones, char *name, EditBone *bone)
69 {
70  struct {
71  ListBase *lb;
72  void *bone;
73  } data;
74  data.lb = ebones;
75  data.bone = bone;
76 
77  BLI_uniquename_cb(editbone_unique_check, &data, DATA_("Bone"), '.', name, sizeof(bone->name));
78 }
79 
82 /* -------------------------------------------------------------------- */
86 static bool bone_unique_check(void *arg, const char *name)
87 {
88  return BKE_armature_find_bone_name((bArmature *)arg, name) != NULL;
89 }
90 
91 static void ed_armature_bone_unique_name(bArmature *arm, char *name)
92 {
94  bone_unique_check, (void *)arm, DATA_("Bone"), '.', name, sizeof(((Bone *)NULL)->name));
95 }
96 
99 /* -------------------------------------------------------------------- */
103 /* helper call for armature_bone_rename */
105  ListBase *conlist,
106  const char *oldname,
107  const char *newname)
108 {
109  bConstraint *curcon;
110  bConstraintTarget *ct;
111 
112  for (curcon = conlist->first; curcon; curcon = curcon->next) {
113  ListBase targets = {NULL, NULL};
114 
115  /* constraint targets */
116  if (BKE_constraint_targets_get(curcon, &targets)) {
117  for (ct = targets.first; ct; ct = ct->next) {
118  if (ct->tar == ob) {
119  if (STREQ(ct->subtarget, oldname)) {
120  BLI_strncpy(ct->subtarget, newname, MAXBONENAME);
121  }
122  }
123  }
124 
125  BKE_constraint_targets_flush(curcon, &targets, 0);
126  }
127 
128  /* action constraints */
129  if (curcon->type == CONSTRAINT_TYPE_ACTION) {
130  bActionConstraint *actcon = (bActionConstraint *)curcon->data;
131  BKE_action_fix_paths_rename(&ob->id, actcon->act, "pose.bones", oldname, newname, 0, 0, 1);
132  }
133  }
134 }
135 
137  bArmature *arm,
138  const char *oldnamep,
139  const char *newnamep)
140 {
141  Object *ob;
142  char newname[MAXBONENAME];
143  char oldname[MAXBONENAME];
144 
145  /* names better differ! */
146  if (!STREQLEN(oldnamep, newnamep, MAXBONENAME)) {
147 
148  /* we alter newname string... so make copy */
149  BLI_strncpy(newname, newnamep, MAXBONENAME);
150  /* we use oldname for search... so make copy */
151  BLI_strncpy(oldname, oldnamep, MAXBONENAME);
152 
153  /* now check if we're in editmode, we need to find the unique name */
154  if (arm->edbo) {
155  EditBone *eBone = ED_armature_ebone_find_name(arm->edbo, oldname);
156 
157  if (eBone) {
158  ED_armature_ebone_unique_name(arm->edbo, newname, NULL);
159  BLI_strncpy(eBone->name, newname, MAXBONENAME);
160  }
161  else {
162  return;
163  }
164  }
165  else {
166  Bone *bone = BKE_armature_find_bone_name(arm, oldname);
167 
168  if (bone) {
169  ed_armature_bone_unique_name(arm, newname);
170 
171  if (arm->bonehash) {
173  BLI_ghash_remove(arm->bonehash, bone->name, NULL, NULL);
174  }
175 
176  BLI_strncpy(bone->name, newname, MAXBONENAME);
177 
178  if (arm->bonehash) {
179  BLI_ghash_insert(arm->bonehash, bone->name, bone);
180  }
181  }
182  else {
183  return;
184  }
185  }
186 
187  /* force copy on write to update database */
189 
190  /* do entire dbase - objects */
191  for (ob = bmain->objects.first; ob; ob = ob->id.next) {
192  ModifierData *md;
193 
194  /* we have the object using the armature */
195  if (arm == ob->data) {
196  Object *cob;
197 
198  /* Rename the pose channel, if it exists */
199  if (ob->pose) {
200  bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, oldname);
201  if (pchan) {
202  GHash *gh = ob->pose->chanhash;
203 
204  /* remove the old hash entry, and replace with the new name */
205  if (gh) {
206  BLI_assert(BLI_ghash_haskey(gh, pchan->name));
207  BLI_ghash_remove(gh, pchan->name, NULL, NULL);
208  }
209 
210  BLI_strncpy(pchan->name, newname, MAXBONENAME);
211 
212  if (gh) {
213  BLI_ghash_insert(gh, pchan->name, pchan);
214  }
215  }
216 
218  }
219 
220  /* Update any object constraints to use the new bone name */
221  for (cob = bmain->objects.first; cob; cob = cob->id.next) {
222  if (cob->constraints.first) {
223  constraint_bone_name_fix(ob, &cob->constraints, oldname, newname);
224  }
225  if (cob->pose) {
226  bPoseChannel *pchan;
227  for (pchan = cob->pose->chanbase.first; pchan; pchan = pchan->next) {
228  constraint_bone_name_fix(ob, &pchan->constraints, oldname, newname);
229  }
230  }
231  }
232  }
233 
234  /* See if an object is parented to this armature */
235  if (ob->parent && (ob->parent->data == arm)) {
236  if (ob->partype == PARBONE) {
237  /* bone name in object */
238  if (STREQ(ob->parsubstr, oldname)) {
239  BLI_strncpy(ob->parsubstr, newname, MAXBONENAME);
240  }
241  }
242  }
243 
245  bDeformGroup *dg = BKE_object_defgroup_find_name(ob, oldname);
246  if (dg) {
247  BLI_strncpy(dg->name, newname, MAXBONENAME);
249  }
250  }
251 
252  /* fix modifiers that might be using this name */
253  for (md = ob->modifiers.first; md; md = md->next) {
254  switch (md->type) {
255  case eModifierType_Hook: {
256  HookModifierData *hmd = (HookModifierData *)md;
257 
258  if (hmd->object && (hmd->object->data == arm)) {
259  if (STREQ(hmd->subtarget, oldname)) {
260  BLI_strncpy(hmd->subtarget, newname, MAXBONENAME);
261  }
262  }
263  break;
264  }
265  case eModifierType_UVWarp: {
267 
268  if (umd->object_src && (umd->object_src->data == arm)) {
269  if (STREQ(umd->bone_src, oldname)) {
270  BLI_strncpy(umd->bone_src, newname, MAXBONENAME);
271  }
272  }
273  if (umd->object_dst && (umd->object_dst->data == arm)) {
274  if (STREQ(umd->bone_dst, oldname)) {
275  BLI_strncpy(umd->bone_dst, newname, MAXBONENAME);
276  }
277  }
278  break;
279  }
280  default:
281  break;
282  }
283  }
284 
285  /* fix camera focus */
286  if (ob->type == OB_CAMERA) {
287  Camera *cam = (Camera *)ob->data;
288  if ((cam->dof.focus_object != NULL) && (cam->dof.focus_object->data == arm)) {
289  if (STREQ(cam->dof.focus_subtarget, oldname)) {
290  BLI_strncpy(cam->dof.focus_subtarget, newname, MAXBONENAME);
292  }
293  }
294  }
295 
296  /* fix grease pencil modifiers and vertex groups */
297  if (ob->type == OB_GPENCIL) {
298 
299  bGPdata *gpd = (bGPdata *)ob->data;
300  LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
301  if ((gpl->parent != NULL) && (gpl->parent->data == arm)) {
302  if (STREQ(gpl->parsubstr, oldname)) {
303  BLI_strncpy(gpl->parsubstr, newname, MAXBONENAME);
304  }
305  }
306  }
307 
309  switch (gp_md->type) {
312  if (mmd->object && mmd->object->data == arm) {
313  bDeformGroup *dg = BKE_object_defgroup_find_name(ob, oldname);
314  if (dg) {
315  BLI_strncpy(dg->name, newname, MAXBONENAME);
317  }
318  }
319  break;
320  }
323  if (hgp_md->object && (hgp_md->object->data == arm)) {
324  if (STREQ(hgp_md->subtarget, oldname)) {
325  BLI_strncpy(hgp_md->subtarget, newname, MAXBONENAME);
326  }
327  }
328  break;
329  }
330  default:
331  break;
332  }
333  }
334  }
336  }
337 
338  /* Fix all animdata that may refer to this bone -
339  * we can't just do the ones attached to objects,
340  * since other ID-blocks may have drivers referring to this bone T29822. */
341 
342  /* XXX: the ID here is for armatures,
343  * but most bone drivers are actually on the object instead. */
344  {
345 
346  BKE_animdata_fix_paths_rename_all(&arm->id, "pose.bones", oldname, newname);
347  }
348 
349  /* correct view locking */
350  {
351  bScreen *screen;
352  for (screen = bmain->screens.first; screen; screen = screen->id.next) {
353  ScrArea *area;
354  /* add regions */
355  for (area = screen->areabase.first; area; area = area->next) {
356  SpaceLink *sl;
357  for (sl = area->spacedata.first; sl; sl = sl->next) {
358  if (sl->spacetype == SPACE_VIEW3D) {
359  View3D *v3d = (View3D *)sl;
360  if (v3d->ob_center && v3d->ob_center->data == arm) {
361  if (STREQ(v3d->ob_center_bone, oldname)) {
362  BLI_strncpy(v3d->ob_center_bone, newname, MAXBONENAME);
363  }
364  }
365  }
366  }
367  }
368  }
369  }
370  }
371 }
372 
375 /* -------------------------------------------------------------------- */
379 typedef struct BoneFlipNameData {
381  char *name;
384 
386  bArmature *arm,
387  ListBase *bones_names,
388  const bool do_strip_numbers)
389 {
390  ListBase bones_names_conflicts = {NULL};
391  BoneFlipNameData *bfn;
392 
393  /* First pass: generate flip names, and blindly rename.
394  * If rename did not yield expected result,
395  * store both bone's name and expected flipped one into temp list for second pass. */
396  LISTBASE_FOREACH (LinkData *, link, bones_names) {
397  char name_flip[MAXBONENAME];
398  char *name = link->data;
399 
400  /* WARNING: if do_strip_numbers is set, expect completely mismatched names in cases like
401  * Bone.R, Bone.R.001, Bone.R.002, etc. */
402  BLI_string_flip_side_name(name_flip, name, do_strip_numbers, sizeof(name_flip));
403 
404  ED_armature_bone_rename(bmain, arm, name, name_flip);
405 
406  if (!STREQ(name, name_flip)) {
407  bfn = alloca(sizeof(BoneFlipNameData));
408  bfn->name = name;
409  BLI_strncpy(bfn->name_flip, name_flip, sizeof(bfn->name_flip));
410  BLI_addtail(&bones_names_conflicts, bfn);
411  }
412  }
413 
414  /* Second pass to handle the bones that have naming conflicts with other bones.
415  * Note that if the other bone was not selected, its name was not flipped,
416  * so conflict remains and that second rename simply generates a new numbered alternative name.
417  */
418  for (bfn = bones_names_conflicts.first; bfn; bfn = bfn->next) {
419  ED_armature_bone_rename(bmain, arm, bfn->name, bfn->name_flip);
420  }
421 }
422 
425 /* -------------------------------------------------------------------- */
430 {
431  Main *bmain = CTX_data_main(C);
432  ViewLayer *view_layer = CTX_data_view_layer(C);
433  Object *ob_active = CTX_data_edit_object(C);
434 
435  const bool do_strip_numbers = RNA_boolean_get(op->ptr, "do_strip_numbers");
436 
437  uint objects_len = 0;
439  view_layer, CTX_wm_view3d(C), &objects_len);
440  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
441  Object *ob = objects[ob_index];
442  bArmature *arm = ob->data;
443 
444  /* Paranoia check. */
445  if (ob_active->pose == NULL) {
446  continue;
447  }
448 
449  ListBase bones_names = {NULL};
450 
451  LISTBASE_FOREACH (EditBone *, ebone, arm->edbo) {
452  if (EBONE_VISIBLE(arm, ebone)) {
453  if (ebone->flag & BONE_SELECTED) {
454  BLI_addtail(&bones_names, BLI_genericNodeN(ebone->name));
455 
456  if (arm->flag & ARM_MIRROR_EDIT) {
457  EditBone *flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
458  if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) {
459  BLI_addtail(&bones_names, BLI_genericNodeN(flipbone->name));
460  }
461  }
462  }
463  }
464  }
465 
466  if (BLI_listbase_is_empty(&bones_names)) {
467  continue;
468  }
469 
470  ED_armature_bones_flip_names(bmain, arm, &bones_names, do_strip_numbers);
471 
472  BLI_freelistN(&bones_names);
473 
474  /* since we renamed stuff... */
476 
477  /* copied from #rna_Bone_update_renamed */
478  /* redraw view */
480 
481  /* update animation channels */
483  }
484  MEM_freeN(objects);
485 
486  return OPERATOR_FINISHED;
487 }
488 
490 {
491  /* identifiers */
492  ot->name = "Flip Names";
493  ot->idname = "ARMATURE_OT_flip_names";
494  ot->description = "Flips (and corrects) the axis suffixes of the names of selected bones";
495 
496  /* api callbacks */
499 
500  /* flags */
502 
504  "do_strip_numbers",
505  false,
506  "Strip Numbers",
507  "Try to remove right-most dot-number from flipped names.\n"
508  "Warning: May result in incoherent naming in some cases");
509 }
510 
513 /* -------------------------------------------------------------------- */
518 {
519  ViewLayer *view_layer = CTX_data_view_layer(C);
520  Main *bmain = CTX_data_main(C);
521  char newname[MAXBONENAME];
522  const short axis = RNA_enum_get(op->ptr, "type");
523  bool changed_multi = false;
524 
525  uint objects_len = 0;
527  view_layer, CTX_wm_view3d(C), &objects_len);
528  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
529  Object *ob = objects[ob_index];
530  bArmature *arm = ob->data;
531  bool changed = false;
532 
533  /* Paranoia checks. */
534  if (ELEM(NULL, ob, ob->pose)) {
535  continue;
536  }
537 
538  LISTBASE_FOREACH (EditBone *, ebone, arm->edbo) {
539  if (EBONE_EDITABLE(ebone)) {
540 
541  /* We first need to do the flipped bone, then the original one.
542  * Otherwise we can't find the flipped one because of the bone name change. */
543  if (arm->flag & ARM_MIRROR_EDIT) {
544  EditBone *flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
545  if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) {
546  BLI_strncpy(newname, flipbone->name, sizeof(newname));
547  if (bone_autoside_name(newname, 1, axis, flipbone->head[axis], flipbone->tail[axis])) {
548  ED_armature_bone_rename(bmain, arm, flipbone->name, newname);
549  changed = true;
550  }
551  }
552  }
553 
554  BLI_strncpy(newname, ebone->name, sizeof(newname));
555  if (bone_autoside_name(newname, 1, axis, ebone->head[axis], ebone->tail[axis])) {
556  ED_armature_bone_rename(bmain, arm, ebone->name, newname);
557  changed = true;
558  }
559  }
560  }
561 
562  if (!changed) {
563  continue;
564  }
565 
566  changed_multi = true;
567 
568  /* Since we renamed stuff... */
570 
571  /* NOTE: notifier might evolve. */
573  }
574  MEM_freeN(objects);
575  return changed_multi ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
576 }
577 
579 {
580  static const EnumPropertyItem axis_items[] = {
581  {0, "XAXIS", 0, "X-Axis", "Left/Right"},
582  {1, "YAXIS", 0, "Y-Axis", "Front/Back"},
583  {2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"},
584  {0, NULL, 0, NULL, NULL},
585  };
586 
587  /* identifiers */
588  ot->name = "Auto-Name by Axis";
589  ot->idname = "ARMATURE_OT_autoside_names";
590  ot->description =
591  "Automatically renames the selected bones according to which side of the target axis they "
592  "fall on";
593 
594  /* api callbacks */
598 
599  /* flags */
601 
602  /* settings */
603  ot->prop = RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with");
604 }
605 
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
bool BKE_pose_channels_is_valid(const struct bPose *pose)
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
Definition: anim_data.c:1287
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)
Definition: anim_data.c:915
struct Bone * BKE_armature_find_bone_name(struct bArmature *arm, const char *name)
Definition: armature.c:594
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)
Definition: constraint.c:6186
int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets)
Definition: constraint.c:6157
struct Object * CTX_data_edit_object(const bContext *C)
Definition: context.c:1370
struct ViewLayer * CTX_data_view_layer(const bContext *C)
Definition: context.c:1100
struct View3D * CTX_wm_view3d(const bContext *C)
Definition: context.c:784
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1074
support for deformation groups and hooks.
bool BKE_object_supports_vertex_groups(const struct Object *ob)
struct bDeformGroup * BKE_object_defgroup_find_name(const struct Object *ob, const char *name)
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len)
Definition: BKE_layer.h:542
bool BKE_modifiers_uses_armature(struct Object *ob, struct 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.c:822
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
Definition: BLI_ghash.c:790
void BLI_ghash_insert(GHash *gh, void *key, void *val)
Definition: BLI_ghash.c:710
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
Definition: BLI_listbase.h:269
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
struct LinkData * BLI_genericNodeN(void *data)
Definition: listbase.c:842
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition: listbase.c:466
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:80
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
bool BLI_uniquename_cb(UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_len)
Definition: string_utils.c:233
size_t BLI_string_flip_side_name(char *r_name, const char *from_name, bool strip_number, size_t name_len)
Definition: string_utils.c:112
unsigned int uint
Definition: BLI_sys_types.h:67
#define STREQLEN(a, b, n)
#define ELEM(...)
#define STREQ(a, b)
#define DATA_(msgid)
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_COPY_ON_WRITE
Definition: DNA_ID.h:834
@ ID_RECALC_GEOMETRY
Definition: DNA_ID.h:791
#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.
@ OB_CAMERA
@ OB_GPENCIL
@ PARBONE
@ SPACE_VIEW3D
@ OPERATOR_CANCELLED
@ OPERATOR_FINISHED
#define EBONE_VISIBLE(arm, ebone)
Definition: ED_armature.h:47
#define EBONE_EDITABLE(ebone)
Definition: ED_armature.h:55
bool ED_operator_editarmature(struct bContext *C)
Definition: screen_ops.c:466
Read Guarded memory(de)allocation.
#define C
Definition: RandGen.cpp:25
@ OPTYPE_UNDO
Definition: WM_types.h:148
@ OPTYPE_REGISTER
Definition: WM_types.h:146
#define NC_GEOM
Definition: WM_types.h:343
#define ND_DATA
Definition: WM_types.h:456
#define NC_ANIMATION
Definition: WM_types.h:338
#define ND_POSE
Definition: WM_types.h:407
#define NC_OBJECT
Definition: WM_types.h:329
#define ND_ANIMCHAN
Definition: WM_types.h:444
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)
struct BoneFlipNameData BoneFlipNameData
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)
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
static void area(int d1, int d2, int e1, int e2, float weights[2])
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4863
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:5004
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3783
struct BoneFlipNameData * next
char name_flip[MAXBONENAME]
struct BoneFlipNameData * prev
char name[64]
struct Object * focus_object
struct CameraDOFSettings dof
char name[64]
Definition: BKE_armature.h:43
float tail[3]
Definition: BKE_armature.h:54
float head[3]
Definition: BKE_armature.h:53
struct Object * object
void * next
Definition: DNA_ID.h:369
void * first
Definition: DNA_listBase.h:31
Definition: BKE_main.h:121
ListBase screens
Definition: BKE_main.h:183
ListBase objects
Definition: BKE_main.h:170
struct ModifierData * next
short partype
ListBase constraints
struct bPose * pose
ListBase modifiers
ListBase greasepencil_modifiers
struct Object * parent
void * data
char parsubstr[64]
struct Object * object_dst
struct Object * object_src
char ob_center_bone[64]
struct Object * ob_center
struct bAction * act
struct GHash * bonehash
ListBase * edbo
struct bConstraintTarget * next
struct bConstraint * next
ListBase layers
ListBase constraints
struct bPoseChannel * next
ListBase chanbase
struct GHash * chanhash
ListBase areabase
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:919
const char * name
Definition: WM_types.h:888
const char * idname
Definition: WM_types.h:890
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:943
struct StructRNA * srna
Definition: WM_types.h:969
const char * description
Definition: WM_types.h:893
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:903
PropertyRNA * prop
Definition: WM_types.h:981
struct PointerRNA * ptr
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorType * ot
Definition: wm_files.c:3479
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))