Blender  V2.93
Classes | Macros | Functions
interface_templates.c File Reference
#include <ctype.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_brush_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_constraint_types.h"
#include "DNA_curveprofile_types.h"
#include "DNA_gpencil_modifier_types.h"
#include "DNA_node_types.h"
#include "DNA_object_force_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_shader_fx_types.h"
#include "DNA_texture_types.h"
#include "BLI_alloca.h"
#include "BLI_fnmatch.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_path_util.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_string_search.h"
#include "BLI_timecode.h"
#include "BLI_utildefines.h"
#include "BLF_api.h"
#include "BLT_translation.h"
#include "BKE_action.h"
#include "BKE_colorband.h"
#include "BKE_colortools.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_curveprofile.h"
#include "BKE_global.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_idprop.h"
#include "BKE_idtype.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_lib_override.h"
#include "BKE_linestyle.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_packedFile.h"
#include "BKE_particle.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_shader_fx.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "ED_fileselect.h"
#include "ED_object.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "ED_undo.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
#include "BLO_readfile.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "UI_view2d.h"
#include "interface_intern.h"
#include "PIL_time.h"
#include "DNA_light_types.h"
#include "DNA_material_types.h"
#include "DNA_world_types.h"

Go to the source code of this file.

Classes

struct  TemplateID
 
struct  TemplateSearch
 
struct  uiTemplateOperatorPropertyPollParam
 
struct  RNAUpdateCb
 
struct  IconViewMenuArgs
 
struct  StringCmp
 
struct  _uilist_item
 
struct  uiListLayoutdata
 
struct  ProgressTooltip_Store
 
struct  ComponentMenuArgs
 

Macros

#define TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH   (UI_UNIT_X * 6)
 
#define TEMPLATE_SEARCH_TEXTBUT_HEIGHT   UI_UNIT_Y
 

Functions

void UI_template_fix_linking (void)
 
Header Template
void uiTemplateHeader (uiLayout *layout, bContext *C)
 
Search Menu Helpers
static int template_search_textbut_width (PointerRNA *ptr, PropertyRNA *name_prop)
 
static int template_search_textbut_height (void)
 
static void template_add_button_search_menu (const bContext *C, uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, uiBlockCreateFunc block_func, void *block_argN, const char *const tip, const bool use_previews, const bool editable, const bool live_icon)
 
static uiBlocktemplate_common_search_menu (const bContext *C, ARegion *region, uiButSearchUpdateFn search_update_fn, void *search_arg, uiButHandleFunc search_exec_fn, void *active_item, uiButSearchTooltipFn item_tooltip_fn, const int preview_rows, const int preview_cols, float scale)
 
ID Chooser Template
void uiTemplateAnyID (uiLayout *layout, PointerRNA *ptr, const char *propname, const char *proptypename, const char *text)
 
RNA Path Builder Template
void uiTemplatePathBuilder (uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *UNUSED(root_ptr), const char *text)
 
Modifiers Template

Template for building the panel layout for the active object's modifiers.

static void modifier_panel_id (void *md_link, char *r_name)
 
void uiTemplateModifiers (uiLayout *UNUSED(layout), bContext *C)
 
Grease Pencil Modifiers Template
static void gpencil_modifier_panel_id (void *md_link, char *r_name)
 
void uiTemplateGpencilModifiers (uiLayout *UNUSED(layout), bContext *C)
 
ShaderFx Template

Template for building the panel layout for the active object's grease pencil shader effects.

static void shaderfx_panel_id (void *fx_v, char *r_idname)
 
void uiTemplateShaderFx (uiLayout *UNUSED(layout), bContext *C)
 
Icon Template
void uiTemplateIcon (uiLayout *layout, int icon_value, float icon_scale)
 
Histogram Template
void uiTemplateHistogram (uiLayout *layout, PointerRNA *ptr, const char *propname)
 
Waveform Template
void uiTemplateWaveform (uiLayout *layout, PointerRNA *ptr, const char *propname)
 
Vector-Scope Template
void uiTemplateVectorscope (uiLayout *layout, PointerRNA *ptr, const char *propname)
 
Layer Buttons Template
static void handle_layer_buttons (bContext *C, void *arg1, void *arg2)
 
void uiTemplateLayers (uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *used_ptr, const char *used_propname, int active_layer)
 
List Template
static void uilist_draw_item_default (struct uiList *ui_list, struct bContext *UNUSED(C), struct uiLayout *layout, struct PointerRNA *UNUSED(dataptr), struct PointerRNA *itemptr, int icon, struct PointerRNA *UNUSED(active_dataptr), const char *UNUSED(active_propname), int UNUSED(index), int UNUSED(flt_flag))
 
static void uilist_draw_filter_default (struct uiList *ui_list, struct bContext *UNUSED(C), struct uiLayout *layout)
 
static int cmpstringp (const void *p1, const void *p2)
 
static void uilist_filter_items_default (struct uiList *ui_list, struct bContext *UNUSED(C), struct PointerRNA *dataptr, const char *propname)
 
static void uilist_prepare (uiList *ui_list, int len, int activei, int rows, int maxrows, int columns, uiListLayoutdata *layoutdata)
 
static void uilist_resize_update_cb (bContext *C, void *arg1, void *UNUSED(arg2))
 
static void * uilist_item_use_dynamic_tooltip (PointerRNA *itemptr, const char *propname)
 
static char * uilist_item_tooltip_func (bContext *UNUSED(C), void *argN, const char *tip)
 
void uiTemplateList (uiLayout *layout, bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, const char *propname, PointerRNA *active_dataptr, const char *active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, int columns, bool sort_reverse, bool sort_lock)
 
Reports for Last Operator Template
void uiTemplateReportsBanner (uiLayout *layout, bContext *C)
 
void uiTemplateInputStatus (uiLayout *layout, struct bContext *C)
 
Keymap Template
static void keymap_item_modified (bContext *UNUSED(C), void *kmi_p, void *UNUSED(unused))
 
static void template_keymap_item_properties (uiLayout *layout, const char *title, PointerRNA *ptr)
 
void uiTemplateKeymapItemProperties (uiLayout *layout, PointerRNA *ptr)
 
Event Icon Template
bool uiTemplateEventFromKeymapItem (struct uiLayout *layout, const char *text, const struct wmKeyMapItem *kmi, bool text_fallback)
 
Color Management Template
void uiTemplateColorspaceSettings (uiLayout *layout, PointerRNA *ptr, const char *propname)
 
void uiTemplateColormanagedViewSettings (uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr, const char *propname)
 
Node Socket Icon Template
void uiTemplateNodeSocket (uiLayout *layout, bContext *UNUSED(C), float *color)
 
Cache File Template
void uiTemplateCacheFile (uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname)
 
Recent Files Template
int uiTemplateRecentFiles (uiLayout *layout, int rows)
 
FileSelectParams Path Button Template
void uiTemplateFileSelectPath (uiLayout *layout, bContext *C, FileSelectParams *params)
 

ID Template

#define template_id_context(type)   0
 
void UI_context_active_but_prop_get_templateID (bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
 
static void template_id_cb (bContext *C, void *arg_litem, void *arg_event)
 
static const char * template_id_browse_tip (const StructRNA *type)
 
static uiButtemplate_id_def_new_but (uiBlock *block, const ID *id, const TemplateID *template_ui, StructRNA *type, const char *const newop, const bool editable, const bool id_open, const bool use_tab_but, int but_height)
 
static void template_ID (const bContext *C, uiLayout *layout, TemplateID *template_ui, StructRNA *type, int flag, const char *newop, const char *openop, const char *unlinkop, const char *text, const bool live_icon, const bool hide_buttons)
 
IDUI_context_active_but_get_tab_ID (bContext *C)
 
static void template_ID_tabs (const bContext *C, uiLayout *layout, TemplateID *template, StructRNA *type, int flag, const char *newop, const char *menu)
 
static void ui_template_id (uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, const char *menu, const char *text, int flag, int prv_rows, int prv_cols, int filter, bool use_tabs, float scale, const bool live_icon, const bool hide_buttons)
 
void uiTemplateID (uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, const bool live_icon, const char *text)
 
void uiTemplateIDBrowse (uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, const char *text)
 
void uiTemplateIDPreview (uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols, int filter, const bool hide_buttons)
 
void uiTemplateGpencilColorPreview (uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, int rows, int cols, float scale, int filter)
 
void uiTemplateIDTabs (uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *menu, int filter)
 

Constraints Template

Template for building the panel layout for the active object or bone's constraints.

#define CONSTRAINT_TYPE_PANEL_PREFIX   "OBJECT_PT_"
 
#define CONSTRAINT_BONE_TYPE_PANEL_PREFIX   "BONE_PT_"
 
static bool constraint_panel_is_bone (Panel *panel)
 
static void constraint_reorder (bContext *C, Panel *panel, int new_index)
 
static short get_constraint_expand_flag (const bContext *UNUSED(C), Panel *panel)
 
static void set_constraint_expand_flag (const bContext *UNUSED(C), Panel *panel, short expand_flag)
 
static void object_constraint_panel_id (void *md_link, char *r_name)
 
static void bone_constraint_panel_id (void *md_link, char *r_name)
 
void uiTemplateConstraints (uiLayout *UNUSED(layout), bContext *C, bool use_bone_constraints)
 

Constraint Header Template

#define ERROR_LIBDATA_MESSAGE   TIP_("Can't edit external library data")
 
#define ERROR_LIBDATA_MESSAGE   TIP_("Can't edit external library data")
 
static void constraint_active_func (bContext *UNUSED(C), void *ob_v, void *con_v)
 
static void draw_constraint_header (uiLayout *layout, Object *ob, bConstraint *con)
 
void uiTemplateConstraintHeader (uiLayout *layout, PointerRNA *ptr)
 

Preview Template

#define B_MATPRV   1
 
static void do_preview_buttons (bContext *C, void *arg, int event)
 
void uiTemplatePreview (uiLayout *layout, bContext *C, ID *id, bool show_buttons, ID *parent, MTex *slot, const char *preview_id)
 

ColorPicker Template

#define WHEEL_SIZE   (5 * U.widget_unit)
 
void uiTemplateColorPicker (uiLayout *layout, PointerRNA *ptr, const char *propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic)
 
static void ui_template_palette_menu (bContext *UNUSED(C), uiLayout *layout, void *UNUSED(but_p))
 
void uiTemplatePalette (uiLayout *layout, PointerRNA *ptr, const char *propname, bool UNUSED(colors))
 
void uiTemplateCryptoPicker (uiLayout *layout, PointerRNA *ptr, const char *propname, int icon)
 

Running Jobs Template

#define B_STOPRENDER   1
 
#define B_STOPCAST   2
 
#define B_STOPANIM   3
 
#define B_STOPCOMPO   4
 
#define B_STOPSEQ   5
 
#define B_STOPCLIP   6
 
#define B_STOPFILE   7
 
#define B_STOPOTHER   8
 
static void do_running_jobs (bContext *C, void *UNUSED(arg), int event)
 
static char * progress_tooltip_func (bContext *UNUSED(C), void *argN, const char *UNUSED(tip))
 
void uiTemplateRunningJobs (uiLayout *layout, bContext *C)
 

ColorRamp Template

enum  { CB_FUNC_FLIP , CB_FUNC_DISTRIBUTE_LR , CB_FUNC_DISTRIBUTE_EVENLY , CB_FUNC_RESET }
 
typedef struct RNAUpdateCb RNAUpdateCb
 
static void rna_update_cb (bContext *C, void *arg_cb, void *UNUSED(arg))
 
static void colorband_flip_cb (bContext *C, ColorBand *coba)
 
static void colorband_distribute_cb (bContext *C, ColorBand *coba, bool evenly)
 
static void colorband_tools_dofunc (bContext *C, void *coba_v, int event)
 
static uiBlockcolorband_tools_func (bContext *C, ARegion *region, void *coba_v)
 
static void colorband_add_cb (bContext *C, void *cb_v, void *coba_v)
 
static void colorband_del_cb (bContext *C, void *cb_v, void *coba_v)
 
static void colorband_update_cb (bContext *UNUSED(C), void *bt_v, void *coba_v)
 
static void colorband_buttons_layout (uiLayout *layout, uiBlock *block, ColorBand *coba, const rctf *butr, RNAUpdateCb *cb, int expand)
 
void uiTemplateColorRamp (uiLayout *layout, PointerRNA *ptr, const char *propname, bool expand)
 

CurveMapping Template

enum  {
  UICURVE_FUNC_RESET_NEG , UICURVE_FUNC_RESET_POS , UICURVE_FUNC_RESET_VIEW , UICURVE_FUNC_HANDLE_VECTOR ,
  UICURVE_FUNC_HANDLE_AUTO , UICURVE_FUNC_HANDLE_AUTO_ANIM , UICURVE_FUNC_EXTEND_HOZ , UICURVE_FUNC_EXTEND_EXP
}
 
static void curvemap_buttons_zoom_in (bContext *C, void *cumap_v, void *UNUSED(arg))
 
static void curvemap_buttons_zoom_out (bContext *C, void *cumap_v, void *UNUSED(unused))
 
static void curvemap_buttons_setclip (bContext *UNUSED(C), void *cumap_v, void *UNUSED(arg))
 
static void curvemap_buttons_delete (bContext *C, void *cb_v, void *cumap_v)
 
static uiBlockcurvemap_clipping_func (bContext *C, ARegion *region, void *cumap_v)
 
static void curvemap_tools_dofunc (bContext *C, void *cumap_v, int event)
 
static uiBlockcurvemap_tools_func (bContext *C, ARegion *region, CurveMapping *cumap, bool show_extend, int reset_mode)
 
static uiBlockcurvemap_tools_posslope_func (bContext *C, ARegion *region, void *cumap_v)
 
static uiBlockcurvemap_tools_negslope_func (bContext *C, ARegion *region, void *cumap_v)
 
static uiBlockcurvemap_brush_tools_func (bContext *C, ARegion *region, void *cumap_v)
 
static uiBlockcurvemap_brush_tools_negslope_func (bContext *C, ARegion *region, void *cumap_v)
 
static void curvemap_buttons_redraw (bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
 
static void curvemap_buttons_update (bContext *C, void *arg1_v, void *cumap_v)
 
static void curvemap_buttons_reset (bContext *C, void *cb_v, void *cumap_v)
 
static void curvemap_buttons_layout (uiLayout *layout, PointerRNA *ptr, char labeltype, bool levels, bool brush, bool neg_slope, bool tone, RNAUpdateCb *cb)
 
void uiTemplateCurveMapping (uiLayout *layout, PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
 

Curve Profile Template

enum  { UIPROFILE_FUNC_RESET , UIPROFILE_FUNC_RESET_VIEW }
 
static void CurveProfile_presets_dofunc (bContext *C, void *profile_v, int event)
 
static uiBlockCurveProfile_presets_func (bContext *C, ARegion *region, CurveProfile *profile)
 
static uiBlockCurveProfile_buttons_presets (bContext *C, ARegion *region, void *profile_v)
 
static void CurveProfile_tools_dofunc (bContext *C, void *profile_v, int event)
 
static uiBlockCurveProfile_tools_func (bContext *C, ARegion *region, CurveProfile *profile)
 
static uiBlockCurveProfile_buttons_tools (bContext *C, ARegion *region, void *profile_v)
 
static void CurveProfile_buttons_zoom_in (bContext *C, void *profile_v, void *UNUSED(arg))
 
static void CurveProfile_buttons_zoom_out (bContext *C, void *profile_v, void *UNUSED(arg))
 
static void CurveProfile_clipping_toggle (bContext *C, void *cb_v, void *profile_v)
 
static void CurveProfile_buttons_reverse (bContext *C, void *cb_v, void *profile_v)
 
static void CurveProfile_buttons_delete (bContext *C, void *cb_v, void *profile_v)
 
static void CurveProfile_buttons_update (bContext *C, void *arg1_v, void *profile_v)
 
static void CurveProfile_buttons_reset (bContext *C, void *arg1_v, void *profile_v)
 
static void CurveProfile_buttons_layout (uiLayout *layout, PointerRNA *ptr, RNAUpdateCb *cb)
 
void uiTemplateCurveProfile (uiLayout *layout, PointerRNA *ptr, const char *propname)
 

Search Callbacks

typedef struct TemplateID TemplateID
 
static void template_ID_set_property_exec_fn (bContext *C, void *arg_template, void *item)
 
static bool id_search_allows_id (TemplateID *template_ui, const int flag, ID *id, const char *query)
 
static bool id_search_add (const bContext *C, TemplateID *template_ui, uiSearchItems *items, ID *id)
 
static void id_search_cb (const bContext *C, void *arg_template, const char *str, uiSearchItems *items, const bool UNUSED(is_first))
 
static void id_search_cb_tagged (const bContext *C, void *arg_template, const char *str, uiSearchItems *items)
 
static void id_search_cb_objects_from_scene (const bContext *C, void *arg_template, const char *str, uiSearchItems *items, const bool UNUSED(is_first))
 
static ARegiontemplate_ID_search_menu_item_tooltip (bContext *C, ARegion *region, const rcti *item_rect, void *arg, void *active)
 
static uiBlockid_search_menu (bContext *C, ARegion *region, void *arg_litem)
 

Search Template

typedef struct TemplateSearch TemplateSearch
 
static void template_search_exec_fn (bContext *C, void *arg_template, void *item)
 
static uiBlocktemplate_search_menu (bContext *C, ARegion *region, void *arg_template)
 
static void template_search_add_button_searchmenu (const bContext *C, uiLayout *layout, uiBlock *block, TemplateSearch *template_search, const bool editable, const bool live_icon)
 
static void template_search_add_button_name (uiBlock *block, PointerRNA *active_ptr, const StructRNA *type)
 
static void template_search_add_button_operator (uiBlock *block, const char *const operator_name, const int opcontext, const int icon, const bool editable)
 
static void template_search_buttons (const bContext *C, uiLayout *layout, TemplateSearch *template_search, const char *newop, const char *unlinkop)
 
static PropertyRNAtemplate_search_get_searchprop (PointerRNA *targetptr, PropertyRNA *targetprop, PointerRNA *searchptr, const char *const searchpropname)
 
static TemplateSearchtemplate_search_setup (PointerRNA *ptr, const char *const propname, PointerRNA *searchptr, const char *const searchpropname)
 
void uiTemplateSearch (uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop)
 
void uiTemplateSearchPreview (uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, const int rows, const int cols)
 

Operator Property Buttons Template

typedef struct uiTemplateOperatorPropertyPollParam uiTemplateOperatorPropertyPollParam
 
static bool ui_layout_operator_buts_poll_property (struct PointerRNA *UNUSED(ptr), struct PropertyRNA *prop, void *user_data)
 
static eAutoPropButsReturn template_operator_property_buts_draw_single (const bContext *C, wmOperator *op, uiLayout *layout, const eButLabelAlign label_align, int layout_flags)
 
static void template_operator_property_buts_draw_recursive (const bContext *C, wmOperator *op, uiLayout *layout, const eButLabelAlign label_align, int layout_flags, bool *r_has_advanced)
 
static bool ui_layout_operator_properties_only_booleans (const bContext *C, wmWindowManager *wm, wmOperator *op, int layout_flags)
 
void uiTemplateOperatorPropertyButs (const bContext *C, uiLayout *layout, wmOperator *op, eButLabelAlign label_align, short flag)
 
void uiTemplateOperatorRedoProperties (uiLayout *layout, const bContext *C)
 

Icon viewer Template

typedef struct IconViewMenuArgs IconViewMenuArgs
 
static uiBlockui_icon_view_menu_cb (bContext *C, ARegion *region, void *arg_litem)
 
void uiTemplateIconView (uiLayout *layout, PointerRNA *ptr, const char *propname, bool show_labels, float icon_scale, float icon_scale_popup)
 

Component Menu

typedef struct ComponentMenuArgs ComponentMenuArgs
 
static uiBlockcomponent_menu (bContext *C, ARegion *region, void *args_v)
 
void uiTemplateComponentMenu (uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name)
 

Macro Definition Documentation

◆ B_MATPRV

#define B_MATPRV   1

Definition at line 2756 of file interface_templates.c.

◆ B_STOPANIM

#define B_STOPANIM   3

Definition at line 6545 of file interface_templates.c.

◆ B_STOPCAST

#define B_STOPCAST   2

Definition at line 6544 of file interface_templates.c.

◆ B_STOPCLIP

#define B_STOPCLIP   6

Definition at line 6548 of file interface_templates.c.

◆ B_STOPCOMPO

#define B_STOPCOMPO   4

Definition at line 6546 of file interface_templates.c.

◆ B_STOPFILE

#define B_STOPFILE   7

Definition at line 6549 of file interface_templates.c.

◆ B_STOPOTHER

#define B_STOPOTHER   8

Definition at line 6550 of file interface_templates.c.

◆ B_STOPRENDER

#define B_STOPRENDER   1

Definition at line 6543 of file interface_templates.c.

◆ B_STOPSEQ

#define B_STOPSEQ   5

Definition at line 6547 of file interface_templates.c.

◆ CONSTRAINT_BONE_TYPE_PANEL_PREFIX

#define CONSTRAINT_BONE_TYPE_PANEL_PREFIX   "BONE_PT_"

Definition at line 1999 of file interface_templates.c.

◆ CONSTRAINT_TYPE_PANEL_PREFIX

#define CONSTRAINT_TYPE_PANEL_PREFIX   "OBJECT_PT_"

For building the panel UI for constraints.

Definition at line 1998 of file interface_templates.c.

◆ ERROR_LIBDATA_MESSAGE [1/2]

#define ERROR_LIBDATA_MESSAGE   TIP_("Can't edit external library data")

Definition at line 2617 of file interface_templates.c.

◆ ERROR_LIBDATA_MESSAGE [2/2]

#define ERROR_LIBDATA_MESSAGE   TIP_("Can't edit external library data")

Definition at line 2617 of file interface_templates.c.

◆ template_id_context

#define template_id_context (   type)    0
Returns
a type-based i18n context, needed e.g. by "New" button. In most languages, this adjective takes different form based on gender of type name...

Definition at line 829 of file interface_templates.c.

◆ TEMPLATE_SEARCH_TEXTBUT_HEIGHT

#define TEMPLATE_SEARCH_TEXTBUT_HEIGHT   UI_UNIT_Y

Definition at line 106 of file interface_templates.c.

◆ TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH

#define TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH   (UI_UNIT_X * 6)

Definition at line 105 of file interface_templates.c.

◆ WHEEL_SIZE

#define WHEEL_SIZE   (5 * U.widget_unit)

Definition at line 5188 of file interface_templates.c.

Typedef Documentation

◆ ComponentMenuArgs

◆ IconViewMenuArgs

◆ RNAUpdateCb

typedef struct RNAUpdateCb RNAUpdateCb

◆ TemplateID

typedef struct TemplateID TemplateID

◆ TemplateSearch

◆ uiTemplateOperatorPropertyPollParam

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CB_FUNC_FLIP 
CB_FUNC_DISTRIBUTE_LR 
CB_FUNC_DISTRIBUTE_EVENLY 
CB_FUNC_RESET 

Definition at line 3034 of file interface_templates.c.

◆ anonymous enum

anonymous enum
Enumerator
UICURVE_FUNC_RESET_NEG 
UICURVE_FUNC_RESET_POS 
UICURVE_FUNC_RESET_VIEW 
UICURVE_FUNC_HANDLE_VECTOR 
UICURVE_FUNC_HANDLE_AUTO 
UICURVE_FUNC_HANDLE_AUTO_ANIM 
UICURVE_FUNC_EXTEND_HOZ 
UICURVE_FUNC_EXTEND_EXP 

Definition at line 4000 of file interface_templates.c.

◆ anonymous enum

anonymous enum
Enumerator
UIPROFILE_FUNC_RESET 
UIPROFILE_FUNC_RESET_VIEW 

Definition at line 4694 of file interface_templates.c.

Function Documentation

◆ bone_constraint_panel_id()

static void bone_constraint_panel_id ( void *  md_link,
char *  r_name 
)
static

◆ cmpstringp()

static int cmpstringp ( const void *  p1,
const void *  p2 
)
static

Definition at line 5733 of file interface_templates.c.

References BLI_strcasecmp().

Referenced by uilist_filter_items_default().

◆ colorband_add_cb()

static void colorband_add_cb ( bContext C,
void *  cb_v,
void *  coba_v 
)
static

◆ colorband_buttons_layout()

static void colorband_buttons_layout ( uiLayout layout,
uiBlock block,
ColorBand coba,
const rctf butr,
RNAUpdateCb cb,
int  expand 
)
static

◆ colorband_del_cb()

static void colorband_del_cb ( bContext C,
void *  cb_v,
void *  coba_v 
)
static

◆ colorband_distribute_cb()

static void colorband_distribute_cb ( bContext C,
ColorBand coba,
bool  evenly 
)
static

◆ colorband_flip_cb()

static void colorband_flip_cb ( bContext C,
ColorBand coba 
)
static

◆ colorband_tools_dofunc()

static void colorband_tools_dofunc ( bContext C,
void *  coba_v,
int  event 
)
static

◆ colorband_tools_func()

static uiBlock* colorband_tools_func ( bContext C,
ARegion region,
void *  coba_v 
)
static

◆ colorband_update_cb()

static void colorband_update_cb ( bContext UNUSEDC,
void *  bt_v,
void *  coba_v 
)
static

◆ component_menu()

static uiBlock* component_menu ( bContext C,
ARegion region,
void *  args_v 
)
static

◆ constraint_active_func()

static void constraint_active_func ( bContext UNUSEDC,
void *  ob_v,
void *  con_v 
)
static

Definition at line 2619 of file interface_templates.c.

References ED_object_constraint_active_set().

Referenced by draw_constraint_header().

◆ constraint_panel_is_bone()

static bool constraint_panel_is_bone ( Panel panel)
static

Check if the panel's ID starts with 'BONE', meaning it is a bone constraint.

Definition at line 2004 of file interface_templates.c.

References Panel::panelname.

Referenced by constraint_reorder().

◆ constraint_reorder()

static void constraint_reorder ( bContext C,
Panel panel,
int  new_index 
)
static

◆ curvemap_brush_tools_func()

static uiBlock* curvemap_brush_tools_func ( bContext C,
ARegion region,
void *  cumap_v 
)
static

Definition at line 4193 of file interface_templates.c.

References C, curvemap_tools_func(), and UICURVE_FUNC_RESET_NEG.

Referenced by curvemap_buttons_layout().

◆ curvemap_brush_tools_negslope_func()

static uiBlock* curvemap_brush_tools_negslope_func ( bContext C,
ARegion region,
void *  cumap_v 
)
static

Definition at line 4198 of file interface_templates.c.

References C, curvemap_tools_func(), and UICURVE_FUNC_RESET_POS.

Referenced by curvemap_buttons_layout().

◆ curvemap_buttons_delete()

static void curvemap_buttons_delete ( bContext C,
void *  cb_v,
void *  cumap_v 
)
static

◆ curvemap_buttons_layout()

static void curvemap_buttons_layout ( uiLayout layout,
PointerRNA ptr,
char  labeltype,
bool  levels,
bool  brush,
bool  neg_slope,
bool  tone,
RNAUpdateCb cb 
)
static

◆ curvemap_buttons_redraw()

static void curvemap_buttons_redraw ( bContext C,
void *  UNUSEDarg1,
void *  UNUSEDarg2 
)
static

Definition at line 4203 of file interface_templates.c.

References C, CTX_wm_region(), and ED_region_tag_redraw().

Referenced by curvemap_buttons_layout().

◆ curvemap_buttons_reset()

static void curvemap_buttons_reset ( bContext C,
void *  cb_v,
void *  cumap_v 
)
static

◆ curvemap_buttons_setclip()

static void curvemap_buttons_setclip ( bContext UNUSEDC,
void *  cumap_v,
void *  UNUSEDarg 
)
static

Definition at line 3882 of file interface_templates.c.

References BKE_curvemapping_changed().

Referenced by curvemap_clipping_func().

◆ curvemap_buttons_update()

static void curvemap_buttons_update ( bContext C,
void *  arg1_v,
void *  cumap_v 
)
static

Definition at line 4208 of file interface_templates.c.

References BKE_curvemapping_changed(), C, NULL, and rna_update_cb().

Referenced by curvemap_buttons_layout().

◆ curvemap_buttons_zoom_in()

static void curvemap_buttons_zoom_in ( bContext C,
void *  cumap_v,
void *  UNUSEDarg 
)
static

◆ curvemap_buttons_zoom_out()

static void curvemap_buttons_zoom_out ( bContext C,
void *  cumap_v,
void *  UNUSEDunused 
)
static

◆ curvemap_clipping_func()

static uiBlock* curvemap_clipping_func ( bContext C,
ARegion region,
void *  cumap_v 
)
static

◆ curvemap_tools_dofunc()

static void curvemap_tools_dofunc ( bContext C,
void *  cumap_v,
int  event 
)
static

◆ curvemap_tools_func()

static uiBlock* curvemap_tools_func ( bContext C,
ARegion region,
CurveMapping cumap,
bool  show_extend,
int  reset_mode 
)
static

◆ curvemap_tools_negslope_func()

static uiBlock* curvemap_tools_negslope_func ( bContext C,
ARegion region,
void *  cumap_v 
)
static

Definition at line 4188 of file interface_templates.c.

References C, curvemap_tools_func(), and UICURVE_FUNC_RESET_NEG.

Referenced by curvemap_buttons_layout().

◆ curvemap_tools_posslope_func()

static uiBlock* curvemap_tools_posslope_func ( bContext C,
ARegion region,
void *  cumap_v 
)
static

Definition at line 4183 of file interface_templates.c.

References C, curvemap_tools_func(), and UICURVE_FUNC_RESET_POS.

Referenced by curvemap_buttons_layout().

◆ CurveProfile_buttons_delete()

static void CurveProfile_buttons_delete ( bContext C,
void *  cb_v,
void *  profile_v 
)
static

◆ CurveProfile_buttons_layout()

static void CurveProfile_buttons_layout ( uiLayout layout,
PointerRNA ptr,
RNAUpdateCb cb 
)
static

Definition at line 4871 of file interface_templates.c.

References bounds(), CurveProfile::clip_rect, CurveProfile_buttons_delete(), CurveProfile_buttons_presets(), CurveProfile_buttons_reset(), CurveProfile_buttons_reverse(), CurveProfile_buttons_tools(), CurveProfile_buttons_update(), CurveProfile_buttons_zoom_in(), CurveProfile_buttons_zoom_out(), CurveProfile_clipping_toggle(), PointerRNA::data, ELEM, CurveProfilePoint::flag, CurveProfile::flag, CurveProfilePoint::h1_loc, CurveProfilePoint::h2_loc, max_ii(), MEM_dupallocN, min_ii(), NULL, PointerRNA::owner_id, CurveProfile::path, CurveProfile::path_len, CurveProfile::preset, PROF_DIRTY_PRESET, PROF_H1_SELECT, PROF_H2_SELECT, PROF_PRESET_STEPS, PROF_PRESET_SUPPORTS, PROF_SELECT, PROF_USE_CLIP, ptr, RNA_CurveProfilePoint, RNA_NO_INDEX, RNA_pointer_create(), RNA_struct_find_property(), rna_update_cb(), TIP_, UI_block_emboss_set(), UI_block_funcN_set(), UI_BTYPE_BUT, UI_BTYPE_CURVEPROFILE, UI_BTYPE_NUM, UI_BUT_DISABLED, UI_but_flag_enable(), UI_but_func_set(), UI_but_funcN_set(), UI_but_number_precision_set(), UI_but_number_step_size_set(), UI_EMBOSS, UI_ITEM_R_EXPAND, UI_ITEM_R_ICON_ONLY, UI_LAYOUT_ALIGN_LEFT, UI_LAYOUT_ALIGN_RIGHT, UI_UNIT_X, UI_UNIT_Y, uiDefBlockBut(), uiDefBut(), uiDefButF(), uiDefIconBlockBut(), uiDefIconBut(), uiDefIconTextBut(), uiItemFullR(), uiItemR(), uiLayoutGetBlock(), uiLayoutGetWidth(), uiLayoutRow(), uiLayoutSetAlignment(), uiLayoutSetPropSep(), CurveProfilePoint::x, and CurveProfilePoint::y.

Referenced by uiTemplateCurveProfile().

◆ CurveProfile_buttons_presets()

static uiBlock* CurveProfile_buttons_presets ( bContext C,
ARegion region,
void *  profile_v 
)
static

Definition at line 4688 of file interface_templates.c.

References C, and CurveProfile_presets_func().

Referenced by CurveProfile_buttons_layout().

◆ CurveProfile_buttons_reset()

static void CurveProfile_buttons_reset ( bContext C,
void *  arg1_v,
void *  profile_v 
)
static

◆ CurveProfile_buttons_reverse()

static void CurveProfile_buttons_reverse ( bContext C,
void *  cb_v,
void *  profile_v 
)
static

◆ CurveProfile_buttons_tools()

static uiBlock* CurveProfile_buttons_tools ( bContext C,
ARegion region,
void *  profile_v 
)
static

Definition at line 4760 of file interface_templates.c.

References C, and CurveProfile_tools_func().

Referenced by CurveProfile_buttons_layout().

◆ CurveProfile_buttons_update()

static void CurveProfile_buttons_update ( bContext C,
void *  arg1_v,
void *  profile_v 
)
static

◆ CurveProfile_buttons_zoom_in()

static void CurveProfile_buttons_zoom_in ( bContext C,
void *  profile_v,
void *  UNUSEDarg 
)
static

◆ CurveProfile_buttons_zoom_out()

static void CurveProfile_buttons_zoom_out ( bContext C,
void *  profile_v,
void *  UNUSEDarg 
)
static

◆ CurveProfile_clipping_toggle()

static void CurveProfile_clipping_toggle ( bContext C,
void *  cb_v,
void *  profile_v 
)
static

◆ CurveProfile_presets_dofunc()

static void CurveProfile_presets_dofunc ( bContext C,
void *  profile_v,
int  event 
)
static

◆ CurveProfile_presets_func()

static uiBlock* CurveProfile_presets_func ( bContext C,
ARegion region,
CurveProfile profile 
)
static

◆ CurveProfile_tools_dofunc()

static void CurveProfile_tools_dofunc ( bContext C,
void *  profile_v,
int  event 
)
static

◆ CurveProfile_tools_func()

static uiBlock* CurveProfile_tools_func ( bContext C,
ARegion region,
CurveProfile profile 
)
static

◆ do_preview_buttons()

static void do_preview_buttons ( bContext C,
void *  arg,
int  event 
)
static

Definition at line 2758 of file interface_templates.c.

References B_MATPRV, C, NC_MATERIAL, ND_SHADING_PREVIEW, and WM_event_add_notifier().

Referenced by uiTemplatePreview().

◆ do_running_jobs()

static void do_running_jobs ( bContext C,
void *  UNUSEDarg,
int  event 
)
static

◆ draw_constraint_header()

static void draw_constraint_header ( uiLayout layout,
Object ob,
bConstraint con 
)
static

◆ get_constraint_expand_flag()

static short get_constraint_expand_flag ( const bContext UNUSEDC,
Panel panel 
)
static

Get the expand flag from the active constraint to use for the panel.

Definition at line 2034 of file interface_templates.c.

References PointerRNA::data, bConstraint::ui_expand_flag, and UI_panel_custom_data_get().

Referenced by uiTemplateConstraints().

◆ gpencil_modifier_panel_id()

static void gpencil_modifier_panel_id ( void *  md_link,
char *  r_name 
)
static

Function with void * argument for uiListPanelIDFromDataFunc.

Definition at line 2184 of file interface_templates.c.

References BKE_gpencil_modifierType_panel_id(), and ModifierData::type.

Referenced by uiTemplateGpencilModifiers().

◆ handle_layer_buttons()

static void handle_layer_buttons ( bContext C,
void *  arg1,
void *  arg2 
)
static

◆ id_search_add()

static bool id_search_add ( const bContext C,
TemplateID template_ui,
uiSearchItems items,
ID id 
)
static

◆ id_search_allows_id()

static bool id_search_allows_id ( TemplateID template_ui,
const int  flag,
ID id,
const char *  query 
)
static

◆ id_search_cb()

static void id_search_cb ( const bContext C,
void *  arg_template,
const char *  str,
uiSearchItems items,
const bool   UNUSEDis_first 
)
static

◆ id_search_cb_objects_from_scene()

static void id_search_cb_objects_from_scene ( const bContext C,
void *  arg_template,
const char *  str,
uiSearchItems items,
const bool   UNUSEDis_first 
)
static

◆ id_search_cb_tagged()

static void id_search_cb_tagged ( const bContext C,
void *  arg_template,
const char *  str,
uiSearchItems items 
)
static

◆ id_search_menu()

static uiBlock* id_search_menu ( bContext C,
ARegion region,
void *  arg_litem 
)
static

◆ keymap_item_modified()

static void keymap_item_modified ( bContext UNUSEDC,
void *  kmi_p,
void *  UNUSEDunused 
)
static

Definition at line 6968 of file interface_templates.c.

References NULL, and WM_keyconfig_update_tag().

Referenced by uiTemplateKeymapItemProperties().

◆ modifier_panel_id()

static void modifier_panel_id ( void *  md_link,
char *  r_name 
)
static

Definition at line 1931 of file interface_templates.c.

References BKE_modifier_type_panel_id(), and ModifierData::type.

Referenced by uiTemplateModifiers().

◆ object_constraint_panel_id()

static void object_constraint_panel_id ( void *  md_link,
char *  r_name 
)
static

Function with void * argument for uiListPanelIDFromDataFunc.

Note
Constraint panel types are assumed to be named with the struct name field concatenated to the defined prefix.

Definition at line 2058 of file interface_templates.c.

References BKE_constraint_typeinfo_from_type(), CONSTRAINT_TYPE_PANEL_PREFIX, NULL, bConstraintTypeInfo::structName, and bConstraint::type.

Referenced by uiTemplateConstraints().

◆ progress_tooltip_func()

static char* progress_tooltip_func ( bContext UNUSEDC,
void *  argN,
const char *  UNUSEDtip 
)
static

◆ rna_update_cb()

static void rna_update_cb ( bContext C,
void *  arg_cb,
void *  UNUSEDarg 
)
static

◆ set_constraint_expand_flag()

static void set_constraint_expand_flag ( const bContext UNUSEDC,
Panel panel,
short  expand_flag 
)
static

Save the expand flag for the panel and sub-panels to the constraint.

Definition at line 2045 of file interface_templates.c.

References PointerRNA::data, bConstraint::ui_expand_flag, and UI_panel_custom_data_get().

Referenced by uiTemplateConstraints().

◆ shaderfx_panel_id()

static void shaderfx_panel_id ( void *  fx_v,
char *  r_idname 
)
static

Function with void * argument for uiListPanelIDFromDataFunc.

Definition at line 2258 of file interface_templates.c.

References BKE_shaderfxType_panel_id(), and ShaderFxData::type.

Referenced by uiTemplateShaderFx().

◆ template_add_button_search_menu()

static void template_add_button_search_menu ( const bContext C,
uiLayout layout,
uiBlock block,
PointerRNA ptr,
PropertyRNA prop,
uiBlockCreateFunc  block_func,
void *  block_argN,
const char *const  tip,
const bool  use_previews,
const bool  editable,
const bool  live_icon 
)
static

◆ template_common_search_menu()

static uiBlock* template_common_search_menu ( const bContext C,
ARegion region,
uiButSearchUpdateFn  search_update_fn,
void *  search_arg,
uiButHandleFunc  search_exec_fn,
void *  active_item,
uiButSearchTooltipFn  item_tooltip_fn,
const int  preview_rows,
const int  preview_cols,
float  scale 
)
static

◆ template_ID()

static void template_ID ( const bContext C,
uiLayout layout,
TemplateID template_ui,
StructRNA type,
int  flag,
const char *  newop,
const char *  openop,
const char *  unlinkop,
const char *  text,
const bool  live_icon,
const bool  hide_buttons 
)
static

Definition at line 930 of file interface_templates.c.

References BKE_id_copy_is_allowed(), BKE_lib_id_make_local(), BKE_packedfile_id_check(), BLI_snprintf(), C, CTX_data_main(), PointerRNA::data, ELEM, uiBut::flag, GS, height, id, ID_GR, ID_IS_OVERRIDE_LIBRARY, ID_OB, ID_REAL_USERS, ID_SCE, ID_SCR, id_search_menu(), ID_TE, ID_WS, TemplateID::idcode, IFACE_, ID::lib, LIB_TAG_INDIRECT, MEM_dupallocN, ID::name, NULL, OB_MODE_EDIT, uiBut::opptr, PointerRNA::owner_id, POINTER_FROM_INT, TemplateID::preview, TemplateID::prop, PROP_NEVER_NULL, PROP_NEVER_UNLINK, TemplateID::ptr, RNA_int_set(), RNA_property_editable(), RNA_property_flag(), RNA_property_pointer_get(), RNA_string_set(), RNA_struct_find_property(), RNA_struct_ui_description(), ID::tag, template_add_button_search_menu(), template_id_browse_tip(), template_id_cb(), template_id_def_new_but(), template_search_textbut_height(), template_search_textbut_width(), TIP_, type, PointerRNA::type, UI_block_align_begin(), UI_block_align_end(), UI_BTYPE_BUT, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_TEXT, UI_BUT_DISABLED, UI_but_flag_enable(), UI_but_funcN_set(), UI_but_operator_ptr_get(), UI_BUT_REDALERT, UI_BUT_UNDO, UI_ID_ADD_NEW, UI_ID_ALONE, UI_ID_BROWSE, UI_ID_DELETE, UI_ID_LOCAL, UI_ID_OPEN, UI_ID_OVERRIDE, UI_ID_PREVIEWS, UI_ID_RENAME, UI_MAX_NAME_STR, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButR(), uiDefIconBut(), uiDefIconButO(), uiDefIconButR(), uiDefIconTextBut(), uiDefIconTextButO(), uiItemL_respect_property_split(), uiLayoutGetBlock(), uiLayoutSetContextPointer(), uiTemplateTextureShow(), w(), width, WM_OP_INVOKE_DEFAULT, and WM_OP_INVOKE_REGION_WIN.

Referenced by ui_template_id().

◆ template_id_browse_tip()

static const char* template_id_browse_tip ( const StructRNA type)
static

◆ template_id_cb()

static void template_id_cb ( bContext C,
void *  arg_litem,
void *  arg_event 
)
static

◆ template_id_def_new_but()

static uiBut* template_id_def_new_but ( uiBlock block,
const ID id,
const TemplateID template_ui,
StructRNA type,
const char *const  newop,
const bool  editable,
const bool  id_open,
const bool  use_tab_but,
int  but_height 
)
static

◆ template_ID_search_menu_item_tooltip()

static ARegion* template_ID_search_menu_item_tooltip ( bContext C,
ARegion region,
const rcti item_rect,
void *  arg,
void *  active 
)
static

◆ template_ID_set_property_exec_fn()

static void template_ID_set_property_exec_fn ( bContext C,
void *  arg_template,
void *  item 
)
static

◆ template_ID_tabs()

static void template_ID_tabs ( const bContext C,
uiLayout layout,
TemplateID template,
StructRNA type,
int  flag,
const char *  newop,
const char *  menu 
)
static

◆ template_keymap_item_properties()

static void template_keymap_item_properties ( uiLayout layout,
const char *  title,
PointerRNA ptr 
)
static

◆ template_operator_property_buts_draw_recursive()

static void template_operator_property_buts_draw_recursive ( const bContext C,
wmOperator op,
uiLayout layout,
const eButLabelAlign  label_align,
int  layout_flags,
bool *  r_has_advanced 
)
static

◆ template_operator_property_buts_draw_single()

static eAutoPropButsReturn template_operator_property_buts_draw_single ( const bContext C,
wmOperator op,
uiLayout layout,
const eButLabelAlign  label_align,
int  layout_flags 
)
static

◆ template_search_add_button_name()

static void template_search_add_button_name ( uiBlock block,
PointerRNA active_ptr,
const StructRNA type 
)
static

◆ template_search_add_button_operator()

static void template_search_add_button_operator ( uiBlock block,
const char *const  operator_name,
const int  opcontext,
const int  icon,
const bool  editable 
)
static

◆ template_search_add_button_searchmenu()

static void template_search_add_button_searchmenu ( const bContext C,
uiLayout layout,
uiBlock block,
TemplateSearch template_search,
const bool  editable,
const bool  live_icon 
)
static

◆ template_search_buttons()

static void template_search_buttons ( const bContext C,
uiLayout layout,
TemplateSearch template_search,
const char *  newop,
const char *  unlinkop 
)
static

◆ template_search_exec_fn()

static void template_search_exec_fn ( bContext C,
void *  arg_template,
void *  item 
)
static

◆ template_search_get_searchprop()

static PropertyRNA* template_search_get_searchprop ( PointerRNA targetptr,
PropertyRNA targetprop,
PointerRNA searchptr,
const char *const  searchpropname 
)
static

◆ template_search_menu()

static uiBlock* template_search_menu ( bContext C,
ARegion region,
void *  arg_template 
)
static

◆ template_search_setup()

static TemplateSearch* template_search_setup ( PointerRNA ptr,
const char *const  propname,
PointerRNA searchptr,
const char *const  searchpropname 
)
static

◆ template_search_textbut_height()

static int template_search_textbut_height ( void  )
static

◆ template_search_textbut_width()

static int template_search_textbut_width ( PointerRNA ptr,
PropertyRNA name_prop 
)
static

◆ UI_context_active_but_get_tab_ID()

ID* UI_context_active_but_get_tab_ID ( bContext C)

◆ UI_context_active_but_prop_get_templateID()

void UI_context_active_but_prop_get_templateID ( bContext C,
PointerRNA r_ptr,
PropertyRNA **  r_prop 
)

◆ ui_icon_view_menu_cb()

static uiBlock* ui_icon_view_menu_cb ( bContext C,
ARegion region,
void *  arg_litem 
)
static

◆ ui_layout_operator_buts_poll_property()

static bool ui_layout_operator_buts_poll_property ( struct PointerRNA UNUSEDptr,
struct PropertyRNA prop,
void *  user_data 
)
static

◆ ui_layout_operator_properties_only_booleans()

static bool ui_layout_operator_properties_only_booleans ( const bContext C,
wmWindowManager wm,
wmOperator op,
int  layout_flags 
)
static

◆ UI_template_fix_linking()

void UI_template_fix_linking ( void  )

Definition at line 108 of file interface_templates.c.

Referenced by UI_block_layout_resolve().

◆ ui_template_id()

static void ui_template_id ( uiLayout layout,
const bContext C,
PointerRNA ptr,
const char *  propname,
const char *  newop,
const char *  openop,
const char *  unlinkop,
const char *  menu,
const char *  text,
int  flag,
int  prv_rows,
int  prv_cols,
int  filter,
bool  use_tabs,
float  scale,
const bool  live_icon,
const bool  hide_buttons 
)
static

◆ ui_template_palette_menu()

static void ui_template_palette_menu ( bContext UNUSEDC,
uiLayout layout,
void *  UNUSEDbut_p 
)
static

Definition at line 5397 of file interface_templates.c.

References IFACE_, uiItemEnumO_value(), uiItemL(), and uiLayoutRow().

Referenced by uiTemplatePalette().

◆ uilist_draw_filter_default()

static void uilist_draw_filter_default ( struct uiList ui_list,
struct bContext UNUSEDC,
struct uiLayout layout 
)
static

◆ uilist_draw_item_default()

static void uilist_draw_item_default ( struct uiList ui_list,
struct bContext UNUSEDC,
struct uiLayout layout,
struct PointerRNA UNUSEDdataptr,
struct PointerRNA itemptr,
int  icon,
struct PointerRNA UNUSEDactive_dataptr,
const char *  UNUSEDactive_propname,
int   UNUSEDindex,
int   UNUSEDflt_flag 
)
static

◆ uilist_filter_items_default()

static void uilist_filter_items_default ( struct uiList ui_list,
struct bContext UNUSEDC,
struct PointerRNA dataptr,
const char *  propname 
)
static

◆ uilist_item_tooltip_func()

static char* uilist_item_tooltip_func ( bContext UNUSEDC,
void *  argN,
const char *  tip 
)
static

Definition at line 5948 of file interface_templates.c.

References BLI_sprintfN().

Referenced by uiTemplateList().

◆ uilist_item_use_dynamic_tooltip()

static void* uilist_item_use_dynamic_tooltip ( PointerRNA itemptr,
const char *  propname 
)
static

◆ uilist_prepare()

static void uilist_prepare ( uiList ui_list,
int  len,
int  activei,
int  rows,
int  maxrows,
int  columns,
uiListLayoutdata layoutdata 
)
static

◆ uilist_resize_update_cb()

static void uilist_resize_update_cb ( bContext C,
void *  arg1,
void *  UNUSEDarg2 
)
static

◆ uiTemplateAnyID()

void uiTemplateAnyID ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
const char *  proptypename,
const char *  text 
)

This is for selecting the type of ID-block to use, and then from the relevant type choosing the block to use.

Parameters
propnameproperty identifier for property that ID-pointer gets stored to.
proptypenameproperty identifier for property used to determine the type of ID-pointer that can be used.

Definition at line 1584 of file interface_templates.c.

References IFACE_, PROP_ENUM, PROP_POINTER, ptr, RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, blender::io::alembic::split(), PointerRNA::type, UI_ITEM_R_ICON_ONLY, UI_LAYOUT_ALIGN_EXPAND, UI_LAYOUT_ALIGN_LEFT, uiItemFullR(), uiItemL(), uiLayoutRow(), uiLayoutSetAlignment(), and uiLayoutSplit().

Referenced by graph_panel_driverVar__singleProp().

◆ uiTemplateCacheFile()

void uiTemplateCacheFile ( uiLayout layout,
const bContext C,
PointerRNA ptr,
const char *  propname 
)

◆ uiTemplateColormanagedViewSettings()

void uiTemplateColormanagedViewSettings ( uiLayout layout,
bContext UNUSEDC,
PointerRNA ptr,
const char *  propname 
)

◆ uiTemplateColorPicker()

void uiTemplateColorPicker ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
bool  value_slider,
bool  lock,
bool  lock_luminosity,
bool  cubic 
)

◆ uiTemplateColorRamp()

void uiTemplateColorRamp ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
bool  expand 
)

◆ uiTemplateColorspaceSettings()

void uiTemplateColorspaceSettings ( uiLayout layout,
PointerRNA ptr,
const char *  propname 
)

◆ uiTemplateComponentMenu()

void uiTemplateComponentMenu ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
const char *  name 
)

◆ uiTemplateConstraintHeader()

void uiTemplateConstraintHeader ( uiLayout layout,
PointerRNA ptr 
)

◆ uiTemplateConstraints()

void uiTemplateConstraints ( uiLayout UNUSEDlayout,
bContext C,
bool  use_bone_constraints 
)

◆ uiTemplateCryptoPicker()

void uiTemplateCryptoPicker ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
int  icon 
)

◆ uiTemplateCurveMapping()

void uiTemplateCurveMapping ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
int  type,
bool  levels,
bool  brush,
bool  neg_slope,
bool  tone 
)

◆ uiTemplateCurveProfile()

void uiTemplateCurveProfile ( uiLayout layout,
PointerRNA ptr,
const char *  propname 
)

◆ uiTemplateEventFromKeymapItem()

bool uiTemplateEventFromKeymapItem ( struct uiLayout layout,
const char *  text,
const struct wmKeyMapItem kmi,
bool  text_fallback 
)

◆ uiTemplateFileSelectPath()

void uiTemplateFileSelectPath ( uiLayout layout,
bContext C,
FileSelectParams params 
)

◆ uiTemplateGpencilColorPreview()

void uiTemplateGpencilColorPreview ( uiLayout layout,
bContext C,
PointerRNA ptr,
const char *  propname,
int  rows,
int  cols,
float  scale,
int  filter 
)

◆ uiTemplateGpencilModifiers()

void uiTemplateGpencilModifiers ( uiLayout UNUSEDlayout,
bContext C 
)

◆ uiTemplateHeader()

void uiTemplateHeader ( uiLayout layout,
bContext C 
)

Definition at line 116 of file interface_templates.c.

References C, ED_area_header_switchbutton(), and uiLayoutAbsoluteBlock().

◆ uiTemplateHistogram()

void uiTemplateHistogram ( uiLayout layout,
PointerRNA ptr,
const char *  propname 
)

◆ uiTemplateIcon()

void uiTemplateIcon ( uiLayout layout,
int  icon_value,
float  icon_scale 
)
Parameters
icon_scaleScale of the icon, 1x == button height.

Definition at line 3462 of file interface_templates.c.

References NULL, UI_BTYPE_LABEL, UI_BUT_ICON_PREVIEW, ui_def_but_icon(), UI_HAS_ICON, UI_UNIT_X, UI_UNIT_Y, uiDefIconBut(), and uiLayoutAbsoluteBlock().

◆ uiTemplateIconView()

void uiTemplateIconView ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
bool  show_labels,
float  icon_scale,
float  icon_scale_popup 
)

◆ uiTemplateID()

void uiTemplateID ( uiLayout layout,
const bContext C,
PointerRNA ptr,
const char *  propname,
const char *  newop,
const char *  openop,
const char *  unlinkop,
int  filter,
const bool  live_icon,
const char *  text 
)

Definition at line 1422 of file interface_templates.c.

References C, filter(), NULL, ptr, UI_ID_BROWSE, UI_ID_DELETE, UI_ID_RENAME, and ui_template_id().

Referenced by uiTemplateCacheFile().

◆ uiTemplateIDBrowse()

void uiTemplateIDBrowse ( uiLayout layout,
bContext C,
PointerRNA ptr,
const char *  propname,
const char *  newop,
const char *  openop,
const char *  unlinkop,
int  filter,
const char *  text 
)

Definition at line 1452 of file interface_templates.c.

References C, filter(), NULL, ptr, UI_ID_BROWSE, UI_ID_RENAME, and ui_template_id().

Referenced by node_draw_buttons_group().

◆ uiTemplateIDPreview()

void uiTemplateIDPreview ( uiLayout layout,
bContext C,
PointerRNA ptr,
const char *  propname,
const char *  newop,
const char *  openop,
const char *  unlinkop,
int  rows,
int  cols,
int  filter,
const bool  hide_buttons 
)

◆ uiTemplateIDTabs()

void uiTemplateIDTabs ( uiLayout layout,
bContext C,
PointerRNA ptr,
const char *  propname,
const char *  newop,
const char *  menu,
int  filter 
)

Version of uiTemplateID using tabs.

Definition at line 1543 of file interface_templates.c.

References C, filter(), NULL, ptr, UI_ID_BROWSE, UI_ID_RENAME, and ui_template_id().

◆ uiTemplateInputStatus()

void uiTemplateInputStatus ( uiLayout layout,
struct bContext C 
)

◆ uiTemplateKeymapItemProperties()

void uiTemplateKeymapItemProperties ( uiLayout layout,
PointerRNA ptr 
)

◆ uiTemplateLayers()

void uiTemplateLayers ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
PointerRNA used_ptr,
const char *  used_propname,
int  active_layer 
)

◆ uiTemplateList()

void uiTemplateList ( uiLayout layout,
bContext C,
const char *  listtype_name,
const char *  list_id,
PointerRNA dataptr,
const char *  propname,
PointerRNA active_dataptr,
const char *  active_propname,
const char *  item_dyntip_propname,
int  rows,
int  maxrows,
int  layout_type,
int  columns,
bool  sort_reverse,
bool  sort_lock 
)

Definition at line 5954 of file interface_templates.c.

References BLI_addtail(), BLI_findstring(), BLI_snprintf(), BLI_strncpy(), C, col, uiBut::context, CTX_wm_menu(), CTX_wm_region(), PointerRNA::data, uiListType::draw_filter, uiListType::draw_item, uiList::dyn_data, uiListLayoutdata::end_idx, uiList::filter_flag, uiListType::filter_items, uiList::filter_sort_flag, uiList::flag, _uilist_item::flt_flag, uiListDyn::height, uiListType::idname, _uilist_item::item, uiListDyn::items_filter_flags, uiListDyn::items_filter_neworder, uiListDyn::items_len, uiListDyn::items_shown, uiList::layout_type, len, uiList::list_grip, uiList::list_id, uiList::list_last_activei, uiList::list_scroll, MEM_callocN, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, NULL, _uilist_item::org_idx, PROP_COLLECTION, PROP_INT, uiListDyn::resize, uiListDyn::resize_prev, RNA_PROP_BEGIN, RNA_PROP_END, RNA_property_collection_length(), RNA_property_int_get(), RNA_property_int_set(), RNA_property_pointer_type(), RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), RNA_struct_ui_icon(), RNA_warning, uiListLayoutdata::start_idx, STREQ, TIP_, type, uiList::type, PointerRNA::type, UI_block_emboss_set(), UI_block_flag_disable(), UI_block_flag_enable(), UI_BLOCK_LIST_ITEM, UI_BTYPE_GRIP, UI_BTYPE_LISTROW, UI_BTYPE_NUM, UI_BTYPE_SCROLL, UI_BTYPE_SEPR, UI_BTYPE_TOGGLE, UI_BUT_DISABLED, UI_but_drawflag_enable(), UI_but_flag_disable(), UI_but_flag_enable(), UI_but_func_set(), UI_but_func_tooltip_set(), UI_BUT_NO_TOOLTIP, UI_BUT_UNDO, UI_EMBOSS, UI_EMBOSS_NONE, UI_icon_from_rnaptr(), ui_layout_list_set_labels_active(), UI_LIST_AUTO_SIZE_THRESHOLD, ARegion::ui_lists, UI_MAX_NAME_STR, UI_UL_DEFAULT_CLASS_NAME, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButI(), uiDefButR_prop(), uiDefIconButBitI(), uiDefIconButI(), uiDefIconTextButR_prop(), uiItemL(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutGetContextStore(), uiLayoutListBox(), uiLayoutOverlap(), uiLayoutRow(), uilist_draw_filter_default(), uilist_draw_item_default(), uilist_filter_items_default(), uilist_item_tooltip_func(), uilist_item_use_dynamic_tooltip(), uilist_prepare(), uilist_resize_update_cb(), UILST_FLT_EXCLUDE, UILST_FLT_ITEM, UILST_FLT_SHOW, UILST_FLT_SORT_LOCK, UILST_FLT_SORT_REVERSE, UILST_LAYOUT_COMPACT, UILST_LAYOUT_DEFAULT, UILST_LAYOUT_GRID, UILST_SCROLL_TO_ACTIVE_ITEM, V2D_SCROLL_WIDTH, uiListDyn::visual_height, uiListLayoutdata::visual_items, and WM_uilisttype_find().

Referenced by draw_socket_list(), and node_composit_buts_file_output_ex().

◆ uiTemplateModifiers()

void uiTemplateModifiers ( uiLayout UNUSEDlayout,
bContext C 
)

◆ uiTemplateNodeSocket()

void uiTemplateNodeSocket ( uiLayout layout,
bContext UNUSEDC,
float color 
)

◆ uiTemplateOperatorPropertyButs()

void uiTemplateOperatorPropertyButs ( const bContext C,
uiLayout layout,
wmOperator op,
eButLabelAlign  label_align,
short  flag 
)

Draw Operator property buttons for redoing execution with different settings. This function does not initialize the layout, functions can be called on the layout before and after.

Definition at line 2553 of file interface_templates.c.

References C, CTX_wm_manager(), NULL, template_operator_property_buts_draw_recursive(), ui_layout_operator_properties_only_booleans(), and UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT.

◆ uiTemplateOperatorRedoProperties()

void uiTemplateOperatorRedoProperties ( uiLayout layout,
const bContext C 
)

◆ uiTemplatePalette()

void uiTemplatePalette ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
bool   UNUSEDcolors 
)

◆ uiTemplatePathBuilder()

void uiTemplatePathBuilder ( uiLayout layout,
PointerRNA ptr,
const char *  propname,
PointerRNA UNUSEDroot_ptr,
const char *  text 
)

This is creating/editing RNA-Paths

  • ptr: struct which holds the path property
  • propname: property identifier for property that path gets stored to
  • root_ptr: struct that path gets built from

Definition at line 1900 of file interface_templates.c.

References PROP_STRING, ptr, RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, PointerRNA::type, uiItemR(), and uiLayoutRow().

◆ uiTemplatePreview()

void uiTemplatePreview ( uiLayout layout,
bContext C,
ID id,
bool  show_buttons,
ID parent,
MTex slot,
const char *  preview_id 
)

◆ uiTemplateRecentFiles()

int uiTemplateRecentFiles ( uiLayout layout,
int  rows 
)

◆ uiTemplateReportsBanner()

void uiTemplateReportsBanner ( uiLayout layout,
bContext C 
)

◆ uiTemplateRunningJobs()

void uiTemplateRunningJobs ( uiLayout layout,
bContext C 
)

◆ uiTemplateSearch()

void uiTemplateSearch ( uiLayout layout,
bContext C,
PointerRNA ptr,
const char *  propname,
PointerRNA searchptr,
const char *  searchpropname,
const char *  newop,
const char *  unlinkop 
)

Search menu to pick an item from a collection. A version of uiTemplateID that works for non-ID types.

Definition at line 1843 of file interface_templates.c.

References C, MEM_freeN, NULL, ptr, template_search_buttons(), and template_search_setup().

◆ uiTemplateSearchPreview()

void uiTemplateSearchPreview ( uiLayout layout,
bContext C,
PointerRNA ptr,
const char *  propname,
PointerRNA searchptr,
const char *  searchpropname,
const char *  newop,
const char *  unlinkop,
const int  rows,
const int  cols 
)

◆ uiTemplateShaderFx()

void uiTemplateShaderFx ( uiLayout UNUSEDlayout,
bContext C 
)

◆ uiTemplateVectorscope()

void uiTemplateVectorscope ( uiLayout layout,
PointerRNA ptr,
const char *  propname 
)

◆ uiTemplateWaveform()

void uiTemplateWaveform ( uiLayout layout,
PointerRNA ptr,
const char *  propname 
)