Blender  V2.93
MOD_ui_common.c
Go to the documentation of this file.
1 /* This program is free software; you can redistribute it and/or
2  * modify it under the terms of the GNU General Public License
3  * as published by the Free Software Foundation; either version 2
4  * of the License, or (at your option) any later version.
5  *
6  * This program is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  * GNU General Public License for more details.
10  *
11  * You should have received a copy of the GNU General Public License
12  * along with this program; if not, write to the Free Software Foundation,
13  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14  */
15 
20 #include "BLI_listbase.h"
21 #include "BLI_string.h"
22 
23 #include "MEM_guardedalloc.h"
24 
25 #include "BKE_context.h"
26 #include "BKE_modifier.h"
27 #include "BKE_object.h"
28 #include "BKE_screen.h"
29 
30 #include "DNA_object_force_types.h"
31 #include "DNA_object_types.h"
32 #include "DNA_particle_types.h"
33 #include "DNA_scene_types.h"
34 #include "DNA_screen_types.h"
35 
36 #include "ED_object.h"
37 
38 #include "BLT_translation.h"
39 
40 #include "UI_interface.h"
41 #include "UI_resources.h"
42 
43 #include "RNA_access.h"
44 
45 #include "WM_api.h"
46 #include "WM_types.h"
47 
48 #include "MOD_modifiertypes.h"
49 #include "MOD_ui_common.h" /* Self include */
50 
55 static bool modifier_ui_poll(const bContext *C, PanelType *UNUSED(pt))
56 {
58 
59  return (ob != NULL) && (ob->type != OB_GPENCIL);
60 }
61 
62 /* -------------------------------------------------------------------- */
69 static void modifier_reorder(bContext *C, Panel *panel, int new_index)
70 {
71  PointerRNA *md_ptr = UI_panel_custom_data_get(panel);
72  ModifierData *md = (ModifierData *)md_ptr->data;
73 
74  PointerRNA props_ptr;
75  wmOperatorType *ot = WM_operatortype_find("OBJECT_OT_modifier_move_to_index", false);
77  RNA_string_set(&props_ptr, "modifier", md->name);
78  RNA_int_set(&props_ptr, "index", new_index);
80  WM_operator_properties_free(&props_ptr);
81 }
82 
83 static short get_modifier_expand_flag(const bContext *UNUSED(C), Panel *panel)
84 {
85  PointerRNA *md_ptr = UI_panel_custom_data_get(panel);
86  ModifierData *md = (ModifierData *)md_ptr->data;
87  return md->ui_expand_flag;
88 }
89 
90 static void set_modifier_expand_flag(const bContext *UNUSED(C), Panel *panel, short expand_flag)
91 {
92  PointerRNA *md_ptr = UI_panel_custom_data_get(panel);
93  ModifierData *md = (ModifierData *)md_ptr->data;
94  md->ui_expand_flag = expand_flag;
95 }
96 
99 /* -------------------------------------------------------------------- */
107 {
108  ModifierData *md = ptr->data;
109  if (md->error) {
110  uiLayout *row = uiLayoutRow(layout, false);
111  uiItemL(row, IFACE_(md->error), ICON_ERROR);
112  }
113 }
114 
121 #define ERROR_LIBDATA_MESSAGE TIP_("External library data")
123 {
127 
128  if (r_ob_ptr != NULL) {
130  }
131 
132  uiBlock *block = uiLayoutGetBlock(panel->layout);
134 
135  uiLayoutSetContextPointer(panel->layout, "modifier", ptr);
136 
137  return ptr;
138 }
139 
144  PointerRNA *ptr,
145  PointerRNA *ob_ptr,
146  const char *vgroup_prop,
147  const char *invert_vgroup_prop,
148  const char *text)
149 {
150  bool has_vertex_group = RNA_string_length(ptr, vgroup_prop) != 0;
151 
152  uiLayout *row = uiLayoutRow(layout, true);
153  uiItemPointerR(row, ptr, vgroup_prop, ob_ptr, "vertex_groups", text, ICON_NONE);
154  if (invert_vgroup_prop != NULL) {
155  uiLayout *sub = uiLayoutRow(row, true);
156  uiLayoutSetActive(sub, has_vertex_group);
157  uiLayoutSetPropDecorate(sub, false);
158  uiItemR(sub, ptr, invert_vgroup_prop, 0, "", ICON_ARROW_LEFTRIGHT);
159  }
160 }
161 
167 {
168  /* Physic Tab */
169  if (ELEM(md->type,
177  return 1;
178  }
179  /* Particle Tab */
180  if (md->type == eModifierType_ParticleSystem) {
181  return 2;
182  }
183 
184  return 0;
185 }
186 
188 {
189  /* fluid particle modifier can't be deleted here */
190  if (md->type == eModifierType_ParticleSystem) {
191  short particle_type = ((ParticleSystemModifierData *)md)->psys->part->type;
192  if (ELEM(particle_type,
193  PART_FLUID,
203  return false;
204  }
205  }
206  return true;
207 }
208 
209 static void modifier_ops_extra_draw(bContext *C, uiLayout *layout, void *md_v)
210 {
211  PointerRNA op_ptr;
212  uiLayout *row;
213  ModifierData *md = (ModifierData *)md_v;
214 
215  PointerRNA ptr;
217  RNA_pointer_create(&ob->id, &RNA_Modifier, md, &ptr);
218  uiLayoutSetContextPointer(layout, "modifier", &ptr);
220 
221  uiLayoutSetUnitsX(layout, 4.0f);
222 
223  /* Apply. */
224  uiItemO(layout,
226  ICON_CHECKMARK,
227  "OBJECT_OT_modifier_apply");
228 
229  /* Apply as shapekey. */
231  uiItemBooleanO(layout,
232  CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply as Shape Key"),
233  ICON_SHAPEKEY_DATA,
234  "OBJECT_OT_modifier_apply_as_shapekey",
235  "keep_modifier",
236  false);
237 
238  uiItemBooleanO(layout,
239  CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Save as Shape Key"),
240  ICON_SHAPEKEY_DATA,
241  "OBJECT_OT_modifier_apply_as_shapekey",
242  "keep_modifier",
243  true);
244  }
245 
246  /* Duplicate. */
247  if (!ELEM(md->type,
253  uiItemO(layout,
255  ICON_DUPLICATE,
256  "OBJECT_OT_modifier_copy");
257  }
258 
259  uiItemO(layout,
260  CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy to Selected"),
261  0,
262  "OBJECT_OT_modifier_copy_to_selected");
263 
264  uiItemS(layout);
265 
266  /* Move to first. */
267  row = uiLayoutColumn(layout, false);
268  uiItemFullO(row,
269  "OBJECT_OT_modifier_move_to_index",
270  IFACE_("Move to First"),
271  ICON_TRIA_UP,
272  NULL,
274  0,
275  &op_ptr);
276  RNA_int_set(&op_ptr, "index", 0);
277  if (!md->prev) {
278  uiLayoutSetEnabled(row, false);
279  }
280 
281  /* Move to last. */
282  row = uiLayoutColumn(layout, false);
283  uiItemFullO(row,
284  "OBJECT_OT_modifier_move_to_index",
285  IFACE_("Move to Last"),
286  ICON_TRIA_DOWN,
287  NULL,
289  0,
290  &op_ptr);
291  RNA_int_set(&op_ptr, "index", BLI_listbase_count(&ob->modifiers) - 1);
292  if (!md->next) {
293  uiLayoutSetEnabled(row, false);
294  }
295 }
296 
297 static void modifier_panel_header(const bContext *C, Panel *panel)
298 {
299  uiLayout *row, *sub, *name_row;
300  uiLayout *layout = panel->layout;
301 
302  /* Don't use #modifier_panel_get_property_pointers, we don't want to lock the header. */
304  ModifierData *md = (ModifierData *)ptr->data;
305  Object *ob = (Object *)ptr->owner_id;
306 
307  uiLayoutSetContextPointer(panel->layout, "modifier", ptr);
308 
309  const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type);
311  int index = BLI_findindex(&ob->modifiers, md);
312 
313  /* Modifier Icon. */
314  sub = uiLayoutRow(layout, true);
316  if (mti->isDisabled && mti->isDisabled(scene, md, 0)) {
317  uiLayoutSetRedAlert(sub, true);
318  }
319  uiItemStringO(sub,
320  "",
322  "OBJECT_OT_modifier_set_active",
323  "modifier",
324  md->name);
325 
326  row = uiLayoutRow(layout, true);
327 
328  /* Modifier Name.
329  * Count how many buttons are added to the header to check if there is enough space. */
330  int buttons_number = 0;
331  name_row = uiLayoutRow(row, true);
332 
333  /* Display mode switching buttons. */
334  if (ob->type == OB_MESH) {
335  int last_cage_index;
336  int cage_index = BKE_modifiers_get_cage_index(scene, ob, &last_cage_index, 0);
337  if (BKE_modifier_supports_cage(scene, md) && (index <= last_cage_index)) {
338  sub = uiLayoutRow(row, true);
339  if (index < cage_index || !BKE_modifier_couldbe_cage(scene, md)) {
340  uiLayoutSetActive(sub, false);
341  }
342  uiItemR(sub, ptr, "show_on_cage", 0, "", ICON_NONE);
343  buttons_number++;
344  }
345  } /* Tessellation point for curve-typed objects. */
346  else if (ELEM(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
347  /* Some modifiers can work with pre-tessellated curves only. */
349  /* Add button (appearing to be ON) and add tip why this cant be changed. */
350  sub = uiLayoutRow(row, true);
351  uiBlock *block = uiLayoutGetBlock(sub);
352  static int apply_on_spline_always_on_hack = eModifierMode_ApplyOnSpline;
353  uiBut *but = uiDefIconButBitI(block,
356  0,
357  ICON_SURFACE_DATA,
358  0,
359  0,
360  UI_UNIT_X - 2,
361  UI_UNIT_Y,
362  &apply_on_spline_always_on_hack,
363  0.0,
364  0.0,
365  0.0,
366  0.0,
367  TIP_("Apply on Spline"));
369  but, TIP_("This modifier can only deform control points, not the filled curve/surface"));
370  buttons_number++;
371  }
372  else if (mti->type != eModifierTypeType_Constructive) {
373  /* Constructive modifiers tessellates curve before applying. */
374  uiItemR(row, ptr, "use_apply_on_spline", 0, "", ICON_NONE);
375  buttons_number++;
376  }
377  }
378  /* Collision and Surface are always enabled, hide buttons. */
381  sub = uiLayoutRow(row, true);
383  uiItemR(sub, ptr, "show_in_editmode", 0, "", ICON_NONE);
384  buttons_number++;
385  }
386  uiItemR(row, ptr, "show_viewport", 0, "", ICON_NONE);
387  uiItemR(row, ptr, "show_render", 0, "", ICON_NONE);
388  buttons_number += 2;
389  }
390 
391  /* Extra operators menu. */
392  uiItemMenuF(row, "", ICON_DOWNARROW_HLT, modifier_ops_extra_draw, md);
393 
394  /* Delete button. */
396  sub = uiLayoutRow(row, false);
398  uiItemO(sub, "", ICON_X, "OBJECT_OT_modifier_remove");
399  buttons_number++;
400  }
401 
402  /* Switch context buttons. */
403  if (modifier_is_simulation(md) == 1) {
405  row, "", ICON_PROPERTIES, "WM_OT_properties_context_change", "context", "PHYSICS");
406  buttons_number++;
407  }
408  else if (modifier_is_simulation(md) == 2) {
410  row, "", ICON_PROPERTIES, "WM_OT_properties_context_change", "context", "PARTICLES");
411  buttons_number++;
412  }
413 
414  bool display_name = (panel->sizex / UI_UNIT_X - buttons_number > 5) || (panel->sizex == 0);
415  if (display_name) {
416  uiItemR(name_row, ptr, "name", 0, "", ICON_NONE);
417  }
418  else {
420  }
421 
422  /* Extra padding for delete button. */
423  uiItemS(layout);
424 }
425 
428 /* -------------------------------------------------------------------- */
436 {
437  PanelType *panel_type = MEM_callocN(sizeof(PanelType), __func__);
438 
439  BKE_modifier_type_panel_id(type, panel_type->idname);
440  BLI_strncpy(panel_type->label, "", BKE_ST_MAXNAME);
441  BLI_strncpy(panel_type->context, "modifier", BKE_ST_MAXNAME);
443  BLI_strncpy(panel_type->active_property, "is_active", BKE_ST_MAXNAME);
444 
445  panel_type->draw_header = modifier_panel_header;
446  panel_type->draw = draw;
447  panel_type->poll = modifier_ui_poll;
448 
449  /* Give the panel the special flag that says it was built here and corresponds to a
450  * modifier rather than a #PanelType. */
452  panel_type->reorder = modifier_reorder;
455 
456  BLI_addtail(&region_type->paneltypes, panel_type);
457 
458  return panel_type;
459 }
460 
468  const char *name,
469  const char *label,
470  PanelDrawFn draw_header,
471  PanelDrawFn draw,
472  PanelType *parent)
473 {
474  PanelType *panel_type = MEM_callocN(sizeof(PanelType), __func__);
475 
476  BLI_snprintf(panel_type->idname, BKE_ST_MAXNAME, "%s_%s", parent->idname, name);
477  BLI_strncpy(panel_type->label, label, BKE_ST_MAXNAME);
478  BLI_strncpy(panel_type->context, "modifier", BKE_ST_MAXNAME);
480  BLI_strncpy(panel_type->active_property, "is_active", BKE_ST_MAXNAME);
481 
482  panel_type->draw_header = draw_header;
483  panel_type->draw = draw;
484  panel_type->poll = modifier_ui_poll;
486 
487  BLI_assert(parent != NULL);
488  BLI_strncpy(panel_type->parent_id, parent->idname, BKE_ST_MAXNAME);
489  panel_type->parent = parent;
490  BLI_addtail(&parent->children, BLI_genericNodeN(panel_type));
491  BLI_addtail(&region_type->paneltypes, panel_type);
492 
493  return panel_type;
494 }
495 
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1034
bool BKE_modifier_is_non_geometrical(ModifierData *md)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
@ eModifierTypeFlag_SupportsEditmode
Definition: BKE_modifier.h:83
bool BKE_modifier_couldbe_cage(struct Scene *scene, struct ModifierData *md)
bool BKE_modifier_is_same_topology(ModifierData *md)
bool BKE_modifier_supports_cage(struct Scene *scene, struct ModifierData *md)
@ eModifierTypeType_Constructive
Definition: BKE_modifier.h:61
void BKE_modifier_type_panel_id(ModifierType type, char *r_idname)
int BKE_modifiers_get_cage_index(const struct Scene *scene, struct Object *ob, int *r_lastPossibleCageIndex, bool is_virtual)
General operations, lookup, etc. for blender objects.
#define BKE_ST_MAXNAME
Definition: BKE_screen.h:68
@ PANEL_TYPE_DRAW_BOX
Definition: BKE_screen.h:305
@ PANEL_TYPE_INSTANCED
Definition: BKE_screen.h:303
@ PANEL_TYPE_DEFAULT_CLOSED
Definition: BKE_screen.h:297
@ PANEL_TYPE_HEADER_EXPAND
Definition: BKE_screen.h:300
#define BLI_assert(a)
Definition: BLI_assert.h:58
struct LinkData * BLI_genericNodeN(void *data)
Definition: listbase.c:923
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Definition: string.c:108
#define UNUSED(x)
#define ELEM(...)
#define TIP_(msgid)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define IFACE_(msgid)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define ID_IS_LINKED(_id)
Definition: DNA_ID.h:426
@ eModifierMode_ApplyOnSpline
@ eModifierMode_Realtime
ModifierType
@ eModifierType_ParticleSystem
@ eModifierType_MeshDeform
@ eModifierType_Fluidsim
@ eModifierType_Surface
@ eModifierType_Cloth
@ eModifierType_Fluid
@ eModifierType_Hook
@ eModifierType_Collision
@ eModifierType_DynamicPaint
@ eModifierType_Softbody
Object is a sort of wrapper for general info.
@ OB_SURF
@ OB_FONT
@ OB_MESH
@ OB_CURVE
@ OB_GPENCIL
@ PART_FLUID_FLIP
@ PART_FLUID_BUBBLE
@ PART_FLUID_SPRAYBUBBLE
@ PART_FLUID_TRACER
@ PART_FLUID
@ PART_FLUID_FOAM
@ PART_FLUID_SPRAYFOAMBUBBLE
@ PART_FLUID_SPRAYFOAM
@ PART_FLUID_SPRAY
@ PART_FLUID_FOAMBUBBLE
struct Object * ED_object_active_context(const struct bContext *C)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
static short get_modifier_expand_flag(const bContext *UNUSED(C), Panel *panel)
Definition: MOD_ui_common.c:83
static void modifier_reorder(bContext *C, Panel *panel, int new_index)
Definition: MOD_ui_common.c:69
static void modifier_panel_header(const bContext *C, Panel *panel)
PointerRNA * modifier_panel_get_property_pointers(Panel *panel, PointerRNA *r_ob_ptr)
static bool modifier_ui_poll(const bContext *C, PanelType *UNUSED(pt))
Definition: MOD_ui_common.c:55
void modifier_panel_end(uiLayout *layout, PointerRNA *ptr)
static bool modifier_can_delete(ModifierData *md)
static int modifier_is_simulation(ModifierData *md)
static void set_modifier_expand_flag(const bContext *UNUSED(C), Panel *panel, short expand_flag)
Definition: MOD_ui_common.c:90
PanelType * modifier_panel_register(ARegionType *region_type, ModifierType type, PanelDrawFn draw)
void modifier_vgroup_ui(uiLayout *layout, PointerRNA *ptr, PointerRNA *ob_ptr, const char *vgroup_prop, const char *invert_vgroup_prop, const char *text)
PanelType * modifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelType *parent)
#define ERROR_LIBDATA_MESSAGE
static void modifier_ops_extra_draw(bContext *C, uiLayout *layout, void *md_v)
StructRNA RNA_Modifier
StructRNA RNA_Object
#define C
Definition: RandGen.cpp:39
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void UI_but_disable(uiBut *but, const char *disabled_hint)
Definition: interface.c:6102
#define UI_UNIT_Y
void uiLayoutSetActive(uiLayout *layout, bool active)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
@ UI_EMBOSS_NONE
Definition: UI_interface.h:108
void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, struct IDProperty *properties, int context, int flag, struct PointerRNA *r_opptr)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
struct PointerRNA * UI_panel_custom_data_get(const struct Panel *panel)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void uiItemS(uiLayout *layout)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
@ UI_LAYOUT_ALIGN_RIGHT
void uiLayoutSetUnitsX(uiLayout *layout, float unit)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg)
#define UI_UNIT_X
uiBut * uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5371
@ UI_BTYPE_TOGGLE
Definition: UI_interface.h:344
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr)
Definition: interface.c:2211
@ WM_OP_INVOKE_DEFAULT
Definition: WM_types.h:197
const char * label
Scene scene
void(* PanelDrawFn)(const bContext *, struct Panel *)
Definition: fmodifier_ui.c:61
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
Definition: rna_access.c:844
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:146
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
Definition: rna_access.c:6550
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
Definition: rna_access.c:6319
int RNA_struct_ui_icon(const StructRNA *type)
Definition: rna_access.c:738
int RNA_string_length(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6539
bool RNA_pointer_is_null(const PointerRNA *ptr)
Definition: rna_access.c:174
ListBase paneltypes
Definition: BKE_screen.h:216
struct ModifierData * next
struct ModifierData * prev
bool(* isDisabled)(const struct Scene *scene, struct ModifierData *md, bool userRenderParams)
Definition: BKE_modifier.h:312
ModifierTypeFlag flags
Definition: BKE_modifier.h:174
ModifierTypeType type
Definition: BKE_modifier.h:173
ListBase modifiers
short(* get_list_data_expand_flag)(const struct bContext *C, struct Panel *pa)
Definition: BKE_screen.h:278
void(* draw)(const struct bContext *C, struct Panel *panel)
Definition: BKE_screen.h:266
bool(* poll)(const struct bContext *C, struct PanelType *pt)
Definition: BKE_screen.h:260
void(* draw_header)(const struct bContext *C, struct Panel *panel)
Definition: BKE_screen.h:262
char idname[BKE_ST_MAXNAME]
Definition: BKE_screen.h:241
void(* set_list_data_expand_flag)(const struct bContext *C, struct Panel *pa, short expand_flag)
Definition: BKE_screen.h:285
char context[BKE_ST_MAXNAME]
Definition: BKE_screen.h:245
void(* reorder)(struct bContext *C, struct Panel *pa, int new_index)
Definition: BKE_screen.h:271
char translation_context[BKE_ST_MAXNAME]
Definition: BKE_screen.h:244
char active_property[BKE_ST_MAXNAME]
Definition: BKE_screen.h:250
ListBase children
Definition: BKE_screen.h:289
struct PanelType * parent
Definition: BKE_screen.h:288
char label[BKE_ST_MAXNAME]
Definition: BKE_screen.h:242
char parent_id[BKE_ST_MAXNAME]
Definition: BKE_screen.h:248
struct uiLayout * layout
struct StructRNA * type
Definition: RNA_types.h:51
void * data
Definition: RNA_types.h:52
struct ID * owner_id
Definition: RNA_types.h:50
int WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, short context, PointerRNA *properties)
PointerRNA * ptr
Definition: wm_files.c:3157
wmOperatorType * ot
Definition: wm_files.c:3156
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
Definition: wm_operators.c:584
void WM_operator_properties_free(PointerRNA *ptr)
Definition: wm_operators.c:711