Blender V4.3
object_shapekey.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
9#include <cmath>
10#include <cstring>
11
12#ifndef WIN32
13# include <unistd.h>
14#else
15# include <io.h>
16#endif
17
18#include "MEM_guardedalloc.h"
19
20#include "BLI_math_vector.h"
21#include "BLI_utildefines.h"
22
23#include "BLT_translation.hh"
24
25#include "DNA_key_types.h"
26#include "DNA_lattice_types.h"
27#include "DNA_mesh_types.h"
28#include "DNA_object_types.h"
29
30#include "BKE_context.hh"
31#include "BKE_key.hh"
32#include "BKE_lattice.hh"
33#include "BKE_object.hh"
34#include "BKE_report.hh"
35
36#include "DEG_depsgraph.hh"
38
39#include "BLI_sys_types.h" /* for intptr_t support */
40
41#include "ED_curve.hh"
42#include "ED_lattice.hh"
43#include "ED_mesh.hh"
44#include "ED_object.hh"
45
46#include "RNA_access.hh"
47#include "RNA_define.hh"
48
49#include "WM_api.hh"
50#include "WM_types.hh"
51
52#include "object_intern.hh"
53
54namespace blender::ed::object {
55
56/* -------------------------------------------------------------------- */
60bool shape_key_report_if_locked(const Object *obedit, ReportList *reports)
61{
62 KeyBlock *key_block;
63
64 switch (obedit->type) {
65 case OB_MESH:
66 key_block = ED_mesh_get_edit_shape_key(static_cast<Mesh *>(obedit->data));
67 break;
68 case OB_SURF:
70 key_block = ED_curve_get_edit_shape_key(static_cast<Curve *>(obedit->data));
71 break;
72 case OB_LATTICE:
73 key_block = ED_lattice_get_edit_shape_key(static_cast<Lattice *>(obedit->data));
74 break;
75 default:
76 return false;
77 }
78
79 if (key_block && (key_block->flag & KEYBLOCK_LOCKED_SHAPE) != 0) {
80 if (reports) {
81 BKE_reportf(reports, RPT_ERROR, "The active shape key of %s is locked", obedit->id.name + 2);
82 }
83 return true;
84 }
85
86 return false;
87}
88
90{
91 const KeyBlock *kb = BKE_keyblock_from_object(ob);
92
93 if (kb && (kb->flag & KEYBLOCK_LOCKED_SHAPE) != 0) {
94 if (reports) {
95 BKE_reportf(reports, RPT_ERROR, "The active shape key of %s is locked", ob->id.name + 2);
96 }
97 return true;
98 }
99
100 return false;
101}
102
104{
105 const Key *key = BKE_key_from_object(ob);
106
107 if (key) {
108 LISTBASE_FOREACH (const KeyBlock *, kb, &key->block) {
109 if (kb->flag & KEYBLOCK_LOCKED_SHAPE) {
110 return true;
111 }
112 }
113 }
114
115 return false;
116}
117
119{
121 if (reports) {
122 BKE_reportf(reports, RPT_ERROR, "The object %s has locked shape keys", ob->id.name + 2);
123 }
124 return true;
125 }
126
127 return false;
128}
129
132/* -------------------------------------------------------------------- */
136static void ED_object_shape_key_add(bContext *C, Object *ob, const bool from_mix)
137{
138 Main *bmain = CTX_data_main(C);
139 KeyBlock *kb;
140 if ((kb = BKE_object_shapekey_insert(bmain, ob, nullptr, from_mix))) {
141 Key *key = BKE_key_from_object(ob);
142 /* for absolute shape keys, new keys may not be added last */
143 ob->shapenr = BLI_findindex(&key->block, kb) + 1;
144
146 }
147}
148
151/* -------------------------------------------------------------------- */
155static bool object_shapekey_remove(Main *bmain, Object *ob)
156{
157 KeyBlock *kb;
158 Key *key = BKE_key_from_object(ob);
159
160 if (key == nullptr) {
161 return false;
162 }
163
164 kb = static_cast<KeyBlock *>(BLI_findlink(&key->block, ob->shapenr - 1));
165 if (kb) {
166 return BKE_object_shapekey_remove(bmain, ob, kb);
167 }
168
169 return false;
170}
171
173 bContext *C, Object *ob, int *r_totmirr, int *r_totfail, bool use_topology)
174{
175 KeyBlock *kb;
176 Key *key;
177 int totmirr = 0, totfail = 0;
178
179 *r_totmirr = *r_totfail = 0;
180
181 key = BKE_key_from_object(ob);
182 if (key == nullptr) {
183 return false;
184 }
185
186 kb = static_cast<KeyBlock *>(BLI_findlink(&key->block, ob->shapenr - 1));
187
188 if (kb) {
189 char *tag_elem = static_cast<char *>(
190 MEM_callocN(sizeof(char) * kb->totelem, "shape_key_mirror"));
191
192 if (ob->type == OB_MESH) {
193 Mesh *mesh = static_cast<Mesh *>(ob->data);
194 int i1, i2;
195 float *fp1, *fp2;
196 float tvec[3];
197
198 ED_mesh_mirror_spatial_table_begin(ob, nullptr, nullptr);
199
200 for (i1 = 0; i1 < mesh->verts_num; i1++) {
201 i2 = mesh_get_x_mirror_vert(ob, nullptr, i1, use_topology);
202 if (i2 == i1) {
203 fp1 = ((float *)kb->data) + i1 * 3;
204 fp1[0] = -fp1[0];
205 tag_elem[i1] = 1;
206 totmirr++;
207 }
208 else if (i2 != -1) {
209 if (tag_elem[i1] == 0 && tag_elem[i2] == 0) {
210 fp1 = ((float *)kb->data) + i1 * 3;
211 fp2 = ((float *)kb->data) + i2 * 3;
212
213 copy_v3_v3(tvec, fp1);
214 copy_v3_v3(fp1, fp2);
215 copy_v3_v3(fp2, tvec);
216
217 /* flip x axis */
218 fp1[0] = -fp1[0];
219 fp2[0] = -fp2[0];
220 totmirr++;
221 }
222 tag_elem[i1] = tag_elem[i2] = 1;
223 }
224 else {
225 totfail++;
226 }
227 }
228
230 }
231 else if (ob->type == OB_LATTICE) {
232 const Lattice *lt = static_cast<const Lattice *>(ob->data);
233 int i1, i2;
234 float *fp1, *fp2;
235 int u, v, w;
236 /* half but found up odd value */
237 const int pntsu_half = (lt->pntsu / 2) + (lt->pntsu % 2);
238
239 /* Currently edit-mode isn't supported by mesh so ignore here for now too. */
240#if 0
241 if (lt->editlatt) {
242 lt = lt->editlatt->latt;
243 }
244#endif
245
246 for (w = 0; w < lt->pntsw; w++) {
247 for (v = 0; v < lt->pntsv; v++) {
248 for (u = 0; u < pntsu_half; u++) {
249 int u_inv = (lt->pntsu - 1) - u;
250 float tvec[3];
251 if (u == u_inv) {
252 i1 = BKE_lattice_index_from_uvw(lt, u, v, w);
253 fp1 = ((float *)kb->data) + i1 * 3;
254 fp1[0] = -fp1[0];
255 totmirr++;
256 }
257 else {
258 i1 = BKE_lattice_index_from_uvw(lt, u, v, w);
259 i2 = BKE_lattice_index_from_uvw(lt, u_inv, v, w);
260
261 fp1 = ((float *)kb->data) + i1 * 3;
262 fp2 = ((float *)kb->data) + i2 * 3;
263
264 copy_v3_v3(tvec, fp1);
265 copy_v3_v3(fp1, fp2);
266 copy_v3_v3(fp2, tvec);
267 fp1[0] = -fp1[0];
268 fp2[0] = -fp2[0];
269 totmirr++;
270 }
271 }
272 }
273 }
274 }
275
276 MEM_freeN(tag_elem);
277 }
278
279 *r_totmirr = totmirr;
280 *r_totfail = totfail;
281
284
285 return true;
286}
287
290/* -------------------------------------------------------------------- */
295{
296 Object *ob = context_object(C);
297 ID *data = static_cast<ID *>((ob) ? ob->data : nullptr);
298
299 return (ob != nullptr && ID_IS_EDITABLE(ob) && !ID_IS_OVERRIDE_LIBRARY(ob) && data != nullptr &&
300 ID_IS_EDITABLE(data) && !ID_IS_OVERRIDE_LIBRARY(data));
301}
302
304{
305 Object *ob = context_object(C);
306
307 return (shape_key_poll(C) &&
308 /* check a keyblock exists */
309 (BKE_keyblock_from_object(ob) != nullptr));
310}
311
313{
314 Object *ob = context_object(C);
315
316 return (shape_key_poll(C) && ob->mode != OB_MODE_EDIT);
317}
318
320{
321 Object *ob = context_object(C);
322
323 return (shape_key_mode_poll(C) &&
324 /* check a keyblock exists */
325 (BKE_keyblock_from_object(ob) != nullptr));
326}
327
329{
330 /* Same as shape_key_mode_exists_poll above, but ensure we have at least two shapes! */
331 Object *ob = context_object(C);
332 Key *key = BKE_key_from_object(ob);
333
334 return (shape_key_mode_poll(C) && key != nullptr && key->totkey > 1);
335}
336
339/* -------------------------------------------------------------------- */
344{
345 Object *ob = context_object(C);
346 const bool from_mix = RNA_boolean_get(op->ptr, "from_mix");
347
348 ED_object_shape_key_add(C, ob, from_mix);
349
352
353 return OPERATOR_FINISHED;
354}
355
357{
358 /* identifiers */
359 ot->name = "Add Shape Key";
360 ot->idname = "OBJECT_OT_shape_key_add";
361 ot->description = "Add shape key to the object";
362
363 /* api callbacks */
366
367 /* flags */
369
370 /* properties */
372 "from_mix",
373 true,
374 "From Mix",
375 "Create the new shape key from the existing mix of keys");
376}
377
380/* -------------------------------------------------------------------- */
385{
386 Main *bmain = CTX_data_main(C);
387 Object *ob = context_object(C);
388 bool changed = false;
389
390 if (RNA_boolean_get(op->ptr, "all")) {
392 return OPERATOR_CANCELLED;
393 }
394
395 if (RNA_boolean_get(op->ptr, "apply_mix")) {
396 float *arr = BKE_key_evaluate_object_ex(
397 ob, nullptr, nullptr, 0, static_cast<ID *>(ob->data));
398 MEM_freeN(arr);
399 }
400 changed = BKE_object_shapekey_free(bmain, ob);
401 }
402 else {
404 return OPERATOR_CANCELLED;
405 }
406
407 changed = object_shapekey_remove(bmain, ob);
408 }
409
410 if (changed) {
414
415 return OPERATOR_FINISHED;
416 }
417 return OPERATOR_CANCELLED;
418}
419
420static bool shape_key_remove_poll_property(const bContext * /*C*/,
421 wmOperator *op,
422 const PropertyRNA *prop)
423{
424 const char *prop_id = RNA_property_identifier(prop);
425 const bool do_all = RNA_enum_get(op->ptr, "all");
426
427 /* Only show seed for randomize action! */
428 if (STREQ(prop_id, "apply_mix") && !do_all) {
429 return false;
430 }
431 return true;
432}
433
435 wmOperatorType * /*ot*/,
437{
438 const bool do_apply_mix = RNA_boolean_get(ptr, "apply_mix");
439 if (do_apply_mix) {
440 return TIP_("Apply current visible shape to the object data, and delete all shape keys");
441 }
442
443 return "";
444}
445
447{
448 /* identifiers */
449 ot->name = "Remove Shape Key";
450 ot->idname = "OBJECT_OT_shape_key_remove";
451 ot->description = "Remove shape key from the object";
452
453 /* api callbacks */
458
459 /* flags */
461
462 /* properties */
463 RNA_def_boolean(ot->srna, "all", false, "All", "Remove all shape keys");
465 "apply_mix",
466 false,
467 "Apply Mix",
468 "Apply current mix of shape keys to the geometry before removing them");
469}
470
473/* -------------------------------------------------------------------- */
478{
479 Object *ob = context_object(C);
480 Key *key = BKE_key_from_object(ob);
481
482 if (!key || BLI_listbase_is_empty(&key->block)) {
483 return OPERATOR_CANCELLED;
484 }
485
486 LISTBASE_FOREACH (KeyBlock *, kb, &key->block) {
487 kb->curval = clamp_f(0.0f, kb->slidermin, kb->slidermax);
488 }
489
492
493 return OPERATOR_FINISHED;
494}
495
497{
498 /* identifiers */
499 ot->name = "Clear Shape Keys";
500 ot->description =
501 "Reset the weights of all shape keys to 0 or to the closest value respecting the limits";
502 ot->idname = "OBJECT_OT_shape_key_clear";
503
504 /* api callbacks */
507
508 /* flags */
510}
511
512/* starting point and step size could be optional */
514{
515 Object *ob = context_object(C);
516 Key *key = BKE_key_from_object(ob);
517 float cfra = 0.0f;
518
519 if (!key || BLI_listbase_is_empty(&key->block)) {
520 return OPERATOR_CANCELLED;
521 }
522
523 LISTBASE_FOREACH (KeyBlock *, kb, &key->block) {
524 kb->pos = cfra;
525 cfra += 0.1f;
526 }
527
530
531 return OPERATOR_FINISHED;
532}
533
535{
536 /* identifiers */
537 ot->name = "Re-Time Shape Keys";
538 ot->description = "Resets the timing for absolute shape keys";
539 ot->idname = "OBJECT_OT_shape_key_retime";
540
541 /* api callbacks */
544
545 /* flags */
547}
548
551/* -------------------------------------------------------------------- */
556{
557 Object *ob = context_object(C);
558 int totmirr = 0, totfail = 0;
559 bool use_topology = RNA_boolean_get(op->ptr, "use_topology");
560
562 return OPERATOR_CANCELLED;
563 }
564
565 if (!object_shape_key_mirror(C, ob, &totmirr, &totfail, use_topology)) {
566 return OPERATOR_CANCELLED;
567 }
568
569 ED_mesh_report_mirror(op, totmirr, totfail);
570
571 return OPERATOR_FINISHED;
572}
573
575{
576 /* identifiers */
577 ot->name = "Mirror Shape Key";
578 ot->idname = "OBJECT_OT_shape_key_mirror";
579 ot->description = "Mirror the current shape key along the local X axis";
580
581 /* api callbacks */
584
585 /* flags */
587
588 /* properties */
590 ot->srna,
591 "use_topology",
592 false,
593 "Topology Mirror",
594 "Use topology based mirroring (for when both sides of mesh have matching, unique topology)");
595}
596
599/* -------------------------------------------------------------------- */
603enum {
608};
609
611{
612 Object *ob = context_object(C);
613
614 Key *key = BKE_key_from_object(ob);
615 const int type = RNA_enum_get(op->ptr, "type");
616 const int totkey = key->totkey;
617 const int act_index = ob->shapenr - 1;
618 int new_index;
619
620 switch (type) {
621 case KB_MOVE_TOP:
622 /* Replace the ref key only if we're at the top already (only for relative keys) */
623 new_index = (ELEM(act_index, 0, 1) || key->type == KEY_NORMAL) ? 0 : 1;
624 break;
625 case KB_MOVE_BOTTOM:
626 new_index = totkey - 1;
627 break;
628 case KB_MOVE_UP:
629 case KB_MOVE_DOWN:
630 default:
631 new_index = (totkey + act_index + type) % totkey;
632 break;
633 }
634
635 if (!BKE_keyblock_move(ob, act_index, new_index)) {
636 return OPERATOR_CANCELLED;
637 }
638
641
642 return OPERATOR_FINISHED;
643}
644
646{
647 static const EnumPropertyItem slot_move[] = {
648 {KB_MOVE_TOP, "TOP", 0, "Top", "Top of the list"},
649 {KB_MOVE_UP, "UP", 0, "Up", ""},
650 {KB_MOVE_DOWN, "DOWN", 0, "Down", ""},
651 {KB_MOVE_BOTTOM, "BOTTOM", 0, "Bottom", "Bottom of the list"},
652 {0, nullptr, 0, nullptr, nullptr}};
653
654 /* identifiers */
655 ot->name = "Move Shape Key";
656 ot->idname = "OBJECT_OT_shape_key_move";
657 ot->description = "Move the active shape key up/down in the list";
658
659 /* api callbacks */
662
663 /* flags */
665
666 RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", "");
667}
668
671/* -------------------------------------------------------------------- */
675enum {
678};
679
681{
683 const int action = RNA_enum_get(op->ptr, "action");
684 const Key *keys = BKE_key_from_object(ob);
685
686 if (!keys || BLI_listbase_is_empty(&keys->block)) {
687 return OPERATOR_CANCELLED;
688 }
689
690 LISTBASE_FOREACH (KeyBlock *, kb, &keys->block) {
691 switch (action) {
692 case SHAPE_KEY_LOCK:
693 kb->flag |= KEYBLOCK_LOCKED_SHAPE;
694 break;
695 case SHAPE_KEY_UNLOCK:
696 kb->flag &= ~KEYBLOCK_LOCKED_SHAPE;
697 break;
698 default:
699 BLI_assert(0);
700 }
701 }
702
704
705 return OPERATOR_FINISHED;
706}
707
708static std::string shape_key_lock_get_description(bContext * /*C*/,
709 wmOperatorType * /*op*/,
711{
712 const int action = RNA_enum_get(ptr, "action");
713
714 switch (action) {
715 case SHAPE_KEY_LOCK:
716 return TIP_("Lock all shape keys of the active object");
717 break;
718 case SHAPE_KEY_UNLOCK:
719 return TIP_("Unlock all shape keys of the active object");
720 break;
721 default:
722 return "";
723 }
724}
725
727{
728 static const EnumPropertyItem shape_key_lock_actions[] = {
729 {SHAPE_KEY_LOCK, "LOCK", 0, "Lock", "Lock all shape keys"},
730 {SHAPE_KEY_UNLOCK, "UNLOCK", 0, "Unlock", "Unlock all shape keys"},
731 {0, nullptr, 0, nullptr, nullptr},
732 };
733
734 /* identifiers */
735 ot->name = "Change the Lock On Shape Keys";
736 ot->idname = "OBJECT_OT_shape_key_lock";
737 ot->description = "Change the lock state of all shape keys of active object";
738
739 /* api callbacks */
743
744 /* flags */
746
748 "action",
749 shape_key_lock_actions,
751 "Action",
752 "Lock action to execute on vertex groups");
753}
754
757} // namespace blender::ed::object
Object * CTX_data_active_object(const bContext *C)
Main * CTX_data_main(const bContext *C)
KeyBlock * BKE_keyblock_from_object(Object *ob)
Definition key.cc:1905
bool BKE_keyblock_move(Object *ob, int org_index, int new_index)
Definition key.cc:2481
float * BKE_key_evaluate_object_ex(Object *ob, int *r_totelem, float *arr, size_t arr_size, ID *obdata)
Definition key.cc:1522
Key * BKE_key_from_object(Object *ob)
Definition key.cc:1820
int BKE_lattice_index_from_uvw(const Lattice *lt, int u, int v, int w)
Definition lattice.cc:195
General operations, lookup, etc. for blender objects.
KeyBlock * BKE_object_shapekey_insert(Main *bmain, Object *ob, const char *name, bool from_mix)
bool BKE_object_shapekey_free(Main *bmain, Object *ob)
bool BKE_object_shapekey_remove(Main *bmain, Object *ob, KeyBlock *kb)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
#define BLI_assert(a)
Definition BLI_assert.h:50
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float clamp_f(float value, float min, float max)
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define ELEM(...)
#define STREQ(a, b)
#define TIP_(msgid)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ ID_RECALC_GEOMETRY
Definition DNA_ID.h:1041
#define ID_IS_EDITABLE(_id)
Definition DNA_ID.h:658
#define ID_IS_OVERRIDE_LIBRARY(_id)
Definition DNA_ID.h:683
@ KEY_NORMAL
@ KEYBLOCK_LOCKED_SHAPE
@ OB_MODE_EDIT
Object is a sort of wrapper for general info.
@ OB_LATTICE
@ OB_SURF
@ OB_MESH
@ OB_CURVES_LEGACY
KeyBlock * ED_lattice_get_edit_shape_key(const Lattice *latt)
int mesh_get_x_mirror_vert(Object *ob, Mesh *mesh_eval, int index, bool use_topology)
Definition meshtools.cc:901
void ED_mesh_report_mirror(wmOperator *op, int totmirr, int totfail)
void ED_mesh_mirror_spatial_table_begin(Object *ob, BMEditMesh *em, Mesh *mesh_eval)
void ED_mesh_mirror_spatial_table_end(Object *ob)
KeyBlock * ED_mesh_get_edit_shape_key(const Mesh *me)
Read Guarded memory(de)allocation.
@ OPTYPE_UNDO
Definition WM_types.hh:162
@ OPTYPE_REGISTER
Definition WM_types.hh:160
#define ND_DRAW
Definition WM_types.hh:428
#define NC_OBJECT
Definition WM_types.hh:346
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition btQuadWord.h:119
KeyBlock * ED_curve_get_edit_shape_key(const Curve *cu)
Definition editcurve.cc:97
void MEM_freeN(void *vmemh)
Definition mallocn.cc:105
void *(* MEM_callocN)(size_t len, const char *str)
Definition mallocn.cc:42
void OBJECT_OT_shape_key_clear(wmOperatorType *ot)
static int shape_key_move_exec(bContext *C, wmOperator *op)
static void ED_object_shape_key_add(bContext *C, Object *ob, const bool from_mix)
static bool object_shape_key_mirror(bContext *C, Object *ob, int *r_totmirr, int *r_totfail, bool use_topology)
void OBJECT_OT_shape_key_move(wmOperatorType *ot)
static int shape_key_remove_exec(bContext *C, wmOperator *op)
static bool object_shapekey_remove(Main *bmain, Object *ob)
bool shape_key_report_if_locked(const Object *obedit, ReportList *reports)
static int shape_key_mirror_exec(bContext *C, wmOperator *op)
bool shape_key_report_if_any_locked(Object *ob, ReportList *reports)
static bool shape_key_exists_poll(bContext *C)
Object * context_object(const bContext *C)
static bool shape_key_mode_exists_poll(bContext *C)
static bool shape_key_move_poll(bContext *C)
static bool shape_key_mode_poll(bContext *C)
bool shape_key_report_if_active_locked(Object *ob, ReportList *reports)
static bool object_is_any_shape_key_locked(Object *ob)
void OBJECT_OT_shape_key_lock(wmOperatorType *ot)
static bool shape_key_poll(bContext *C)
void OBJECT_OT_shape_key_retime(wmOperatorType *ot)
void OBJECT_OT_shape_key_add(wmOperatorType *ot)
static bool shape_key_remove_poll_property(const bContext *, wmOperator *op, const PropertyRNA *prop)
static std::string shape_key_remove_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
void OBJECT_OT_shape_key_remove(wmOperatorType *ot)
static int shape_key_retime_exec(bContext *C, wmOperator *)
static int shape_key_add_exec(bContext *C, wmOperator *op)
static int shape_key_lock_exec(bContext *C, wmOperator *op)
static std::string shape_key_lock_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
void OBJECT_OT_shape_key_mirror(wmOperatorType *ot)
static int shape_key_clear_exec(bContext *C, wmOperator *)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
const char * RNA_property_identifier(const PropertyRNA *prop)
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)
struct Lattice * latt
Definition DNA_ID.h:413
char name[66]
Definition DNA_ID.h:425
void * data
int totkey
char type
ListBase block
struct EditLatt * editlatt
const char * name
Definition WM_types.hh:990
bool(* poll_property)(const bContext *C, wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1048
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1042
std::string(* get_description)(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
Definition WM_types.hh:1074
const char * idname
Definition WM_types.hh:992
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1006
const char * description
Definition WM_types.hh:996
StructRNA * srna
Definition WM_types.hh:1080
struct ReportList * reports
struct PointerRNA * ptr
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4126
wmOperatorType * ot
Definition wm_files.cc:4125