30#include "RNA_prototypes.hh"
104#define ERROR_LIBDATA_MESSAGE N_("External library data")
111 if (r_ob_ptr !=
nullptr) {
126 const char *vgroup_prop,
127 const char *invert_vgroup_prop,
133 uiItemPointerR(row,
ptr, vgroup_prop, ob_ptr,
"vertex_groups", text, ICON_GROUP_VERTEX);
134 if (invert_vgroup_prop !=
nullptr) {
191 if (
ELEM(particle_type,
226 "OBJECT_OT_modifier_apply");
229 "OBJECT_OT_modifier_apply",
230 IFACE_(
"Apply (All Keyframes)"),
242 "OBJECT_OT_modifier_apply");
250 "OBJECT_OT_modifier_apply_as_shapekey",
257 "OBJECT_OT_modifier_apply_as_shapekey",
274 "OBJECT_OT_modifier_copy");
280 "OBJECT_OT_modifier_copy_to_selected");
286 "OBJECT_OT_modifier_move_to_index",
297 "OBJECT_OT_modifier_move_to_index",
313 "OBJECT_OT_geometry_nodes_move_to_nodes",
349 "OBJECT_OT_modifier_set_active",
357 int buttons_number = 0;
379 static int apply_on_spline_always_off_hack = 0;
389 &apply_on_spline_always_off_hack,
392 RPT_(
"Apply on Spline"));
394 "This modifier can only deform filled curve/surface, not the control points");
413 &apply_on_spline_always_on_hack,
416 RPT_(
"Apply on Spline"));
418 "This modifier can only deform control points, not the filled curve/surface");
447 uiItemO(sub,
"", ICON_X,
"OBJECT_OT_modifier_remove");
454 row,
"", ICON_PROPERTIES,
"WM_OT_properties_context_change",
"context",
"PHYSICS");
459 row,
"", ICON_PROPERTIES,
"WM_OT_properties_context_change",
"context",
"PARTICLES");
463 bool display_name = (panel->
sizex /
UI_UNIT_X - buttons_number > 5) || (panel->
sizex == 0);
483 PanelType *panel_type = MEM_cnew<PanelType>(__func__);
493 panel_type->
draw = draw;
515 PanelType *panel_type = MEM_cnew<PanelType>(__func__);
525 panel_type->
draw = draw;
530 panel_type->
parent = parent;
Scene * CTX_data_scene(const bContext *C)
bool BKE_modifier_is_non_geometrical(ModifierData *md)
int BKE_modifiers_get_cage_index(const Scene *scene, Object *ob, int *r_lastPossibleCageIndex, bool is_virtual)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
@ eModifierTypeFlag_SupportsEditmode
bool BKE_modifier_supports_cage(Scene *scene, ModifierData *md)
bool BKE_modifier_is_same_topology(ModifierData *md)
void BKE_modifier_type_panel_id(ModifierType type, char *r_idname)
bool BKE_modifier_couldbe_cage(Scene *scene, ModifierData *md)
@ PANEL_TYPE_DEFAULT_CLOSED
@ PANEL_TYPE_HEADER_EXPAND
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
struct LinkData * BLI_genericNodeN(void *data)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define ID_IS_EDITABLE(_id)
@ eModifierMode_ApplyOnSpline
@ eModifierType_ParticleSystem
@ eModifierType_MeshDeform
@ eModifierType_Collision
@ eModifierType_DynamicPaint
Object is a sort of wrapper for general info.
@ PART_FLUID_SPRAYFOAMBUBBLE
Read Guarded memory(de)allocation.
static void modifier_reorder(bContext *C, Panel *panel, int new_index)
PanelType * modifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelType *parent)
static void modifier_panel_header(const bContext *C, Panel *panel)
static int modifier_is_simulation(const ModifierData *md)
void modifier_grease_pencil_curve_header_draw(const bContext *, Panel *panel)
static bool modifier_ui_poll(const bContext *C, PanelType *)
void modifier_grease_pencil_curve_panel_draw(const bContext *, Panel *panel)
void modifier_panel_end(uiLayout *layout, PointerRNA *ptr)
PanelType * modifier_panel_register(ARegionType *region_type, ModifierType type, PanelDrawFn draw)
static bool modifier_can_delete(ModifierData *md)
static void set_modifier_expand_flag(const bContext *, Panel *panel, short expand_flag)
static short get_modifier_expand_flag(const bContext *, Panel *panel)
PointerRNA * modifier_panel_get_property_pointers(Panel *panel, PointerRNA *r_ob_ptr)
void modifier_vgroup_ui(uiLayout *layout, PointerRNA *ptr, PointerRNA *ob_ptr, const char *vgroup_prop, const char *invert_vgroup_prop, const char *text)
#define ERROR_LIBDATA_MESSAGE
static void modifier_ops_extra_draw(bContext *C, uiLayout *layout, void *md_v)
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)
void uiLayoutSetActive(uiLayout *layout, bool active)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, PointerRNA *r_opptr)
void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void uiItemS(uiLayout *layout)
void uiLayoutSetUnitsX(uiLayout *layout, float unit)
void uiItemPointerR(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
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)
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, const char *tip)
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg)
PointerRNA * UI_panel_custom_data_get(const Panel *panel)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
void UI_panel_context_pointer_set(Panel *panel, const char *name, PointerRNA *ptr)
void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *ptr)
void(*)(const bContext *, Panel *) PanelDrawFn
Object * context_active_object(const bContext *C)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
int RNA_struct_ui_icon(const StructRNA *type)
int RNA_string_length(PointerRNA *ptr, const char *name)
bool RNA_pointer_is_null(const PointerRNA *ptr)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
bool(* is_disabled)(const Scene *scene, ModifierData *md, bool use_render_params)
void(* reorder)(bContext *C, Panel *pa, int new_index)
void(* set_list_data_expand_flag)(const bContext *C, Panel *pa, short expand_flag)
void(* draw)(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
bool(* poll)(const bContext *C, PanelType *pt)
char pin_to_last_property[BKE_ST_MAXNAME]
char context[BKE_ST_MAXNAME]
char translation_context[BKE_ST_MAXNAME]
char active_property[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
short(* get_list_data_expand_flag)(const bContext *C, Panel *pa)
char parent_id[BKE_ST_MAXNAME]
void(* draw_header)(const bContext *C, Panel *panel)
int WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_free(PointerRNA *ptr)