Blender V4.3
interface_templates.cc File Reference
#include <algorithm>
#include <cctype>
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <fmt/format.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_brush_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_collection_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_types.h"
#include "DNA_scene_types.h"
#include "DNA_shader_fx_types.h"
#include "DNA_texture_types.h"
#include "BLI_fileops.h"
#include "BLI_listbase.h"
#include "BLI_math_color.h"
#include "BLI_math_vector.h"
#include "BLI_path_utils.hh"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_string_ref.hh"
#include "BLI_string_utils.hh"
#include "BLI_time.h"
#include "BLI_timecode.h"
#include "BLI_utildefines.h"
#include "BLF_api.hh"
#include "BLT_translation.hh"
#include "BKE_anim_data.hh"
#include "BKE_blender_version.h"
#include "BKE_blendfile.hh"
#include "BKE_colorband.hh"
#include "BKE_colortools.hh"
#include "BKE_constraint.h"
#include "BKE_context.hh"
#include "BKE_curveprofile.h"
#include "BKE_file_handler.hh"
#include "BKE_global.hh"
#include "BKE_idprop.hh"
#include "BKE_idtype.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_override.hh"
#include "BKE_linestyle.h"
#include "BKE_main.hh"
#include "BKE_modifier.hh"
#include "BKE_packedFile.hh"
#include "BKE_report.hh"
#include "BKE_scene.hh"
#include "BKE_screen.hh"
#include "BKE_shader_fx.h"
#include "BKE_workspace.hh"
#include "BLO_readfile.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "DEG_depsgraph_query.hh"
#include "ED_fileselect.hh"
#include "ED_id_management.hh"
#include "ED_info.hh"
#include "ED_object.hh"
#include "ED_render.hh"
#include "ED_screen.hh"
#include "ED_screen_types.hh"
#include "ED_undo.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "IMB_metadata.hh"
#include "IMB_thumbs.hh"
#include "RE_engine.h"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "UI_interface.hh"
#include "UI_interface_icons.hh"
#include "UI_string_search.hh"
#include "interface_intern.hh"
#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  ProgressTooltip_Store
 
struct  ComponentMenuArgs
 

Macros

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

Functions

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 ()
 
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, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
 
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)
 
Search Callbacks
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)
 
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)
 
static ARegiontemplate_ID_search_menu_item_tooltip (bContext *C, ARegion *region, const rcti *item_rect, void *, void *active)
 
static uiBlockid_search_menu (bContext *C, ARegion *region, void *arg_litem)
 
ID Chooser Template
void uiTemplateAnyID (uiLayout *layout, PointerRNA *ptr, const char *propname, const char *proptypename, const char *text)
 
Search Template
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 wmOperatorCallContext 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, const char *text)
 
static PropertyRNAtemplate_search_get_searchprop (PointerRNA *targetptr, PropertyRNA *targetprop, PointerRNA *searchptr, const char *const searchpropname)
 
static bool template_search_setup (TemplateSearch &template_search, PointerRNA *ptr, const char *const propname, PointerRNA *searchptr, const char *const searchpropname)
 
void uiTemplateSearch (uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, const char *text)
 
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, const char *text)
 
RNA Path Builder Template
void uiTemplatePathBuilder (uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *, 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 *, 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 *, bContext *C)
 
Operator Property Buttons Template
static bool ui_layout_operator_buts_poll_property (PointerRNA *, 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)
 
static wmOperatorminimal_operator_create (wmOperatorType *ot, PointerRNA *properties)
 
static void draw_export_controls (bContext *C, uiLayout *layout, const std::string &label, int index, bool valid)
 
static void draw_export_properties (bContext *C, uiLayout *layout, wmOperator *op, const std::string &filename)
 
static void draw_exporter_item (uiList *, const bContext *, uiLayout *layout, PointerRNA *, PointerRNA *itemptr, int, PointerRNA *, const char *, int, int)
 
void uiTemplateCollectionExporters (uiLayout *layout, bContext *C)
 
ColorRamp Template
static void rna_update_cb (bContext &C, const RNAUpdateCb &cb)
 
static void rna_update_cb (bContext *C, void *arg_cb, void *)
 
static void colorband_flip (bContext *C, ColorBand *coba)
 
static void colorband_distribute (bContext *C, ColorBand *coba, bool evenly)
 
static uiBlockcolorband_tools_fn (bContext *C, ARegion *region, void *cb_v)
 
static void colorband_add (bContext &C, const RNAUpdateCb &cb, ColorBand &coba)
 
static void colorband_update_cb (bContext *, void *bt_v, void *coba_v)
 
static void colorband_buttons_layout (uiLayout *layout, uiBlock *block, ColorBand *coba, const rctf *butr, const RNAUpdateCb &cb, int expand)
 
void uiTemplateColorRamp (uiLayout *layout, PointerRNA *ptr, const char *propname, bool expand)
 
Icon Template
void uiTemplateIcon (uiLayout *layout, int icon_value, float icon_scale)
 
Icon viewer Template
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)
 
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)
 
Curve Profile Template
static uiBlockcurve_profile_presets_fn (bContext *C, ARegion *region, void *cb_v)
 
static uiBlockcurve_profile_tools_fn (bContext *C, ARegion *region, void *cb_v)
 
static bool curve_profile_can_zoom_in (CurveProfile *profile)
 
static bool curve_profile_can_zoom_out (CurveProfile *profile)
 
static void curve_profile_zoom_in (bContext *C, CurveProfile *profile)
 
static void curve_profile_zoom_out (bContext *C, CurveProfile *profile)
 
static void CurveProfile_buttons_layout (uiLayout *layout, PointerRNA *ptr, const RNAUpdateCb &cb)
 
void uiTemplateCurveProfile (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)
 
Reports for Last Operator Template
void uiTemplateReportsBanner (uiLayout *layout, bContext *C)
 
static bool uiTemplateInputStatusAzone (uiLayout *layout, const AZone *az, const ARegion *region)
 
void uiTemplateInputStatus (uiLayout *layout, bContext *C)
 
static std::string ui_template_status_tooltip (bContext *C, void *, const char *)
 
void uiTemplateStatusInfo (uiLayout *layout, bContext *C)
 
Keymap Template
static void keymap_item_modified (bContext *, void *kmi_p, void *)
 
static void template_keymap_item_properties (uiLayout *layout, const char *title, PointerRNA *ptr)
 
void uiTemplateKeymapItemProperties (uiLayout *layout, PointerRNA *ptr)
 
Event Icon Template
static const wmKeyMapItemkeymap_item_from_enum_item (const wmKeyMap *keymap, const EnumPropertyItem *item)
 
static bool keymap_item_can_collapse (const wmKeyMapItem *kmi_a, const wmKeyMapItem *kmi_b)
 
int uiTemplateStatusBarModalItem (uiLayout *layout, const wmKeyMap *keymap, const EnumPropertyItem *item)
 
bool uiTemplateEventFromKeymapItem (uiLayout *layout, const char *text, const wmKeyMapItem *kmi, bool text_fallback)
 
Color Management Template
void uiTemplateColorspaceSettings (uiLayout *layout, PointerRNA *ptr, const char *propname)
 
void uiTemplateColormanagedViewSettings (uiLayout *layout, bContext *, PointerRNA *ptr, const char *propname)
 
Component Menu
static uiBlockcomponent_menu (bContext *C, ARegion *region, void *args_v)
 
void uiTemplateComponentMenu (uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name)
 
Node Socket Icon Template
void uiTemplateNodeSocket (uiLayout *layout, bContext *, const float color[4])
 
Cache File Template
void uiTemplateCacheFileVelocity (uiLayout *layout, PointerRNA *fileptr)
 
void uiTemplateCacheFileProcedural (uiLayout *layout, const bContext *C, PointerRNA *fileptr)
 
void uiTemplateCacheFileTimeSettings (uiLayout *layout, PointerRNA *fileptr)
 
static void cache_file_layer_item (uiList *, const bContext *, uiLayout *layout, PointerRNA *, PointerRNA *itemptr, int, PointerRNA *, const char *, int, int)
 
uiListTypeUI_UL_cache_file_layers ()
 
void uiTemplateCacheFileLayers (uiLayout *layout, const bContext *C, PointerRNA *fileptr)
 
bool uiTemplateCacheFilePointer (PointerRNA *ptr, const char *propname, PointerRNA *r_file_ptr)
 
void uiTemplateCacheFile (uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname)
 
Recent Files Template
static void uiTemplateRecentFiles_tooltip_func (bContext &, uiTooltipData &tip, void *argN)
 
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
 
static void template_id_cb (bContext *C, void *arg_litem, void *arg_event)
 
void UI_context_active_but_prop_get_templateID (const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
 
static void template_id_liboverride_hierarchy_collection_root_find_recursive (Collection *collection, const int parent_level, Collection **r_collection_parent_best, int *r_parent_level_best)
 
static void template_id_liboverride_hierarchy_collections_tag_recursive (Collection *root_collection, ID *target_id, const bool do_parents)
 
IDui_template_id_liboverride_hierarchy_make (bContext *C, Main *bmain, ID *owner_id, ID *id, const char **r_undo_push_label)
 
static void template_id_liboverride_hierarchy_make (bContext *C, Main *bmain, TemplateID *template_ui, PointerRNA *idptr, const char **r_undo_push_label)
 
static const char * template_id_browse_tip (const StructRNA *type)
 
static void template_id_workspace_pin_extra_icon (const TemplateID &template_ui, uiBut *but)
 
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_id, 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 uiTemplateAction (uiLayout *layout, const bContext *C, ID *id, const char *newop, const char *unlinkop, 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 *, Panel *panel)
 
static void set_constraint_expand_flag (const bContext *, Panel *panel, short expand_flag)
 
static void object_constraint_panel_id (void *md_link, char *r_idname)
 
static void bone_constraint_panel_id (void *md_link, char *r_idname)
 
void uiTemplateConstraints (uiLayout *, bContext *C, bool use_bone_constraints)
 

Constraint Header Template

#define ERROR_LIBDATA_MESSAGE   N_("Can't edit external library data")
 
#define ERROR_LIBDATA_MESSAGE   N_("Can't edit external library data")
 
static void constraint_active_func (bContext *, void *ob_v, void *con_v)
 
static void constraint_ops_extra_draw (bContext *C, uiLayout *layout, 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)
 

CurveMapping Template

#define CURVE_ZOOM_MAX   (1.0f / 25.0f)
 
static bool curvemap_can_zoom_out (CurveMapping *cumap)
 
static bool curvemap_can_zoom_in (CurveMapping *cumap)
 
static void curvemap_buttons_zoom_in (bContext *C, CurveMapping *cumap)
 
static void curvemap_buttons_zoom_out (bContext *C, CurveMapping *cumap)
 
static uiBlockcurvemap_clipping_func (bContext *C, ARegion *region, void *cumap_v)
 
static uiBlockcurvemap_tools_func (bContext *C, ARegion *region, RNAUpdateCb &cb, bool show_extend, int reset_mode)
 
static uiBlockcurvemap_tools_posslope_func (bContext *C, ARegion *region, void *cb_v)
 
static uiBlockcurvemap_tools_negslope_func (bContext *C, ARegion *region, void *cb_v)
 
static uiBlockcurvemap_brush_tools_func (bContext *C, ARegion *region, void *cb_v)
 
static uiBlockcurvemap_brush_tools_negslope_func (bContext *C, ARegion *region, void *cb_v)
 
static void curvemap_buttons_redraw (bContext &C)
 
static void curvemap_buttons_layout (uiLayout *layout, PointerRNA *ptr, char labeltype, bool levels, bool brush, bool neg_slope, bool tone, const RNAUpdateCb &cb)
 
void uiTemplateCurveMapping (uiLayout *layout, PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
 

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 *, uiLayout *layout, void *)
 
void uiTemplatePalette (uiLayout *layout, PointerRNA *ptr, const char *propname, bool)
 
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 *, int event)
 
static std::string progress_tooltip_func (bContext *, void *argN, const char *)
 
void uiTemplateRunningJobs (uiLayout *layout, bContext *C)
 

Macro Definition Documentation

◆ B_MATPRV

#define B_MATPRV   1

Definition at line 3340 of file interface_templates.cc.

Referenced by do_preview_buttons(), and uiTemplatePreview().

◆ B_STOPANIM

#define B_STOPANIM   3

Definition at line 6074 of file interface_templates.cc.

Referenced by do_running_jobs(), and uiTemplateRunningJobs().

◆ B_STOPCAST

#define B_STOPCAST   2

Definition at line 6073 of file interface_templates.cc.

Referenced by do_running_jobs().

◆ B_STOPCLIP

#define B_STOPCLIP   6

Definition at line 6077 of file interface_templates.cc.

Referenced by do_running_jobs(), and uiTemplateRunningJobs().

◆ B_STOPCOMPO

#define B_STOPCOMPO   4

Definition at line 6075 of file interface_templates.cc.

Referenced by do_running_jobs(), and uiTemplateRunningJobs().

◆ B_STOPFILE

#define B_STOPFILE   7

Definition at line 6078 of file interface_templates.cc.

Referenced by do_running_jobs(), and uiTemplateRunningJobs().

◆ B_STOPOTHER

#define B_STOPOTHER   8

Definition at line 6079 of file interface_templates.cc.

Referenced by do_running_jobs(), and uiTemplateRunningJobs().

◆ B_STOPRENDER

#define B_STOPRENDER   1

Definition at line 6072 of file interface_templates.cc.

Referenced by do_running_jobs(), and uiTemplateRunningJobs().

◆ B_STOPSEQ

#define B_STOPSEQ   5

Definition at line 6076 of file interface_templates.cc.

Referenced by do_running_jobs(), and uiTemplateRunningJobs().

◆ CONSTRAINT_BONE_TYPE_PANEL_PREFIX

#define CONSTRAINT_BONE_TYPE_PANEL_PREFIX   "BONE_PT_"

Definition at line 2499 of file interface_templates.cc.

Referenced by bone_constraint_panel_id().

◆ CONSTRAINT_TYPE_PANEL_PREFIX

#define CONSTRAINT_TYPE_PANEL_PREFIX   "OBJECT_PT_"

For building the panel UI for constraints.

Definition at line 2498 of file interface_templates.cc.

Referenced by object_constraint_panel_id().

◆ CURVE_ZOOM_MAX

#define CURVE_ZOOM_MAX   (1.0f / 25.0f)

Definition at line 4325 of file interface_templates.cc.

Referenced by curve_profile_can_zoom_in(), and curvemap_can_zoom_in().

◆ ERROR_LIBDATA_MESSAGE [1/2]

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

◆ ERROR_LIBDATA_MESSAGE [2/2]

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

Definition at line 2673 of file interface_templates.cc.

◆ 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 1213 of file interface_templates.cc.

Referenced by template_id_def_new_but().

◆ TEMPLATE_SEARCH_TEXTBUT_HEIGHT

#define TEMPLATE_SEARCH_TEXTBUT_HEIGHT   UI_UNIT_Y

Definition at line 114 of file interface_templates.cc.

Referenced by template_search_textbut_height().

◆ TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH

#define TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH   (UI_UNIT_X * 4)

Definition at line 113 of file interface_templates.cc.

Referenced by template_search_textbut_width().

◆ WHEEL_SIZE

#define WHEEL_SIZE   (5 * U.widget_unit)

Definition at line 5625 of file interface_templates.cc.

Referenced by uiTemplateColorPicker().

Function Documentation

◆ bone_constraint_panel_id()

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

◆ cache_file_layer_item()

static void cache_file_layer_item ( uiList * ,
const bContext * ,
uiLayout * layout,
PointerRNA * ,
PointerRNA * itemptr,
int ,
PointerRNA * ,
const char * ,
int ,
int  )
static

Definition at line 7319 of file interface_templates.cc.

References UI_ITEM_R_NO_BG, uiItemR(), and uiLayoutRow().

Referenced by UI_UL_cache_file_layers().

◆ colorband_add()

static void colorband_add ( bContext & C,
const RNAUpdateCb & cb,
ColorBand & coba )
static

◆ colorband_buttons_layout()

◆ colorband_distribute()

static void colorband_distribute ( bContext * C,
ColorBand * coba,
bool evenly )
static

Definition at line 3620 of file interface_templates.cc.

References ColorBand::data, ED_undo_push(), CBData::pos, pos, and ColorBand::tot.

Referenced by colorband_tools_fn().

◆ colorband_flip()

static void colorband_flip ( bContext * C,
ColorBand * coba )
static

◆ colorband_tools_fn()

◆ colorband_update_cb()

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

◆ component_menu()

◆ constraint_active_func()

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

◆ constraint_ops_extra_draw()

◆ 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 2504 of file interface_templates.cc.

References Panel::panelname.

Referenced by constraint_reorder().

◆ constraint_reorder()

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

◆ curve_profile_can_zoom_in()

static bool curve_profile_can_zoom_in ( CurveProfile * profile)
static

◆ curve_profile_can_zoom_out()

static bool curve_profile_can_zoom_out ( CurveProfile * profile)
static

Definition at line 5213 of file interface_templates.cc.

References BLI_rctf_size_x().

Referenced by curve_profile_zoom_out(), and CurveProfile_buttons_layout().

◆ curve_profile_presets_fn()

◆ curve_profile_tools_fn()

◆ curve_profile_zoom_in()

static void curve_profile_zoom_in ( bContext * C,
CurveProfile * profile )
static

◆ curve_profile_zoom_out()

static void curve_profile_zoom_out ( bContext * C,
CurveProfile * profile )
static

◆ curvemap_brush_tools_func()

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

Definition at line 4604 of file interface_templates.cc.

References CURVEMAP_SLOPE_POSITIVE, and curvemap_tools_func().

Referenced by curvemap_buttons_layout().

◆ curvemap_brush_tools_negslope_func()

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

Definition at line 4610 of file interface_templates.cc.

References CURVEMAP_SLOPE_POSITIVE, and curvemap_tools_func().

Referenced by curvemap_buttons_layout().

◆ curvemap_buttons_layout()

static void curvemap_buttons_layout ( uiLayout * layout,
PointerRNA * ptr,
char labeltype,
bool levels,
bool brush,
bool neg_slope,
bool tone,
const RNAUpdateCb & cb )
static
Note
Still unsure how this call evolves.
Parameters
labeltypeUsed for defining which curve-channels to show.

Definition at line 4626 of file interface_templates.cc.

References BKE_curvemap_handle_set(), BKE_curvemap_remove(), BKE_curvemap_reset(), BKE_curvemapping_changed(), BKE_curvemapping_set_black_white(), CurveMapping::black, BLT_I18NCONTEXT_COLOR, bounds(), but_func_argN_copy(), but_func_argN_free(), CurveMapping::clipr, CurveMapping::cm, CM_TOT, CTX_IFACE_, CUMA_DO_CLIP, CUMA_HANDLE_AUTO_ANIM, CUMA_HANDLE_VECTOR, CUMA_SELECT, CUMA_USE_WRAPPING, CurveMapping::cur, CurveMap::curve, CURVE_PRESET_LINE, CURVE_TONE_FILMLIKE, curvemap_brush_tools_func(), curvemap_brush_tools_negslope_func(), curvemap_buttons_redraw(), curvemap_buttons_zoom_in(), curvemap_buttons_zoom_out(), curvemap_can_zoom_in(), curvemap_can_zoom_out(), curvemap_clipping_func(), CURVEMAP_SLOPE_POSITIVE, curvemap_tools_negslope_func(), curvemap_tools_posslope_func(), PointerRNA::data, uiBut::drawflag, ELEM, CurveMapping::flag, CurveMapPoint::flag, uiBut::flag, uiButCurveMapping::gradient_type, HD_AUTO, HD_AUTO_ANIM, HD_VECT, IFACE_, max_ii(), CurveMapping::preset, ptr, rna_update_cb(), SELECT, TIP_, CurveMapping::tone, CurveMap::totpoint, UI_block_emboss_set(), UI_block_funcN_set(), UI_BTYPE_BUT, UI_BTYPE_CURVE, UI_BTYPE_NUM, UI_BTYPE_ROW, UI_but_disable(), 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_GRAD_H, UI_GRAD_NONE, UI_ITEM_R_EXPAND, UI_LAYOUT_ALIGN_LEFT, UI_LAYOUT_ALIGN_RIGHT, UI_SELECT_DRAW, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButF(), uiDefButI(), uiDefIconBlockBut(), uiDefIconBut(), uiItemR(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutGetWidth(), uiLayoutRow(), uiLayoutSetAlignment(), uiLayoutSplit(), CurveMapping::white, CurveMapPoint::x, and CurveMapPoint::y.

Referenced by uiTemplateCurveMapping().

◆ curvemap_buttons_redraw()

static void curvemap_buttons_redraw ( bContext & C)
static

Definition at line 4616 of file interface_templates.cc.

References CTX_wm_region(), and ED_region_tag_redraw().

Referenced by curvemap_buttons_layout().

◆ curvemap_buttons_zoom_in()

◆ curvemap_buttons_zoom_out()

◆ curvemap_can_zoom_in()

static bool curvemap_can_zoom_in ( CurveMapping * cumap)
static

◆ curvemap_can_zoom_out()

static bool curvemap_can_zoom_out ( CurveMapping * cumap)
static

◆ curvemap_clipping_func()

◆ curvemap_tools_func()

◆ curvemap_tools_negslope_func()

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

Definition at line 4598 of file interface_templates.cc.

References CURVEMAP_SLOPE_NEGATIVE, and curvemap_tools_func().

Referenced by curvemap_buttons_layout().

◆ curvemap_tools_posslope_func()

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

Definition at line 4592 of file interface_templates.cc.

References CURVEMAP_SLOPE_POSITIVE, and curvemap_tools_func().

Referenced by curvemap_buttons_layout().

◆ CurveProfile_buttons_layout()

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

◆ do_preview_buttons()

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

Definition at line 3342 of file interface_templates.cc.

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

Referenced by uiTemplatePreview().

◆ do_running_jobs()

◆ draw_constraint_header()

◆ draw_export_controls()

static void draw_export_controls ( bContext * C,
uiLayout * layout,
const std::string & label,
int index,
bool valid )
static

◆ draw_export_properties()

◆ draw_exporter_item()

static void draw_exporter_item ( uiList * ,
const bContext * ,
uiLayout * layout,
PointerRNA * ,
PointerRNA * itemptr,
int ,
PointerRNA * ,
const char * ,
int ,
int  )
static

◆ get_constraint_expand_flag()

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

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

Definition at line 2534 of file interface_templates.cc.

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

Referenced by uiTemplateConstraints().

◆ handle_layer_buttons()

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

◆ id_search_add()

◆ 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  )
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  )
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()

◆ keymap_item_can_collapse()

static bool keymap_item_can_collapse ( const wmKeyMapItem * kmi_a,
const wmKeyMapItem * kmi_b )
static

◆ keymap_item_from_enum_item()

static const wmKeyMapItem * keymap_item_from_enum_item ( const wmKeyMap * keymap,
const EnumPropertyItem * item )
static

◆ keymap_item_modified()

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

Definition at line 6835 of file interface_templates.cc.

References WM_keyconfig_update_tag().

Referenced by uiTemplateKeymapItemProperties().

◆ minimal_operator_create()

◆ modifier_panel_id()

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

Definition at line 2431 of file interface_templates.cc.

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_idname )
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 2558 of file interface_templates.cc.

References BKE_constraint_typeinfo_from_type(), BKE_ST_MAXNAME, BLI_string_join, CONSTRAINT_TYPE_PANEL_PREFIX, bConstraintTypeInfo::struct_name, and bConstraint::type.

Referenced by uiTemplateConstraints().

◆ progress_tooltip_func()

static std::string progress_tooltip_func ( bContext * ,
void * argN,
const char *  )
static

◆ rna_update_cb() [1/2]

◆ rna_update_cb() [2/2]

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

Definition at line 3596 of file interface_templates.cc.

References rna_update_cb().

◆ set_constraint_expand_flag()

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

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

Definition at line 2545 of file interface_templates.cc.

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 2685 of file interface_templates.cc.

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,
uiButArgNFree func_argN_free_fn = MEM_freeN,
uiButArgNCopy func_argN_copy_fn = MEM_dupallocN )
static

◆ template_common_search_menu()

◆ 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 1319 of file interface_templates.cc.

References BKE_id_copy_is_allowed(), BKE_idtype_idcode_is_localizable, BKE_packedfile_id_check(), but_func_argN_copy(), but_func_argN_free(), CTX_data_main(), PointerRNA::data, ED_id_rename(), ELEM, flag, uiBut::flag, GS, ID_GR, ID_IS_ASSET, ID_IS_EDITABLE, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, ID_OB, ID_REAL_USERS, ID_SCE, ID_SCR, id_search_menu(), ID_TAG_INDIRECT, ID_TE, ID_WS, TemplateID::idcode, IFACE_, NA_RENAME, ID::name, NC_ID, 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(), SNPRINTF_RLEN, template_add_button_search_menu(), template_id_browse_tip(), template_id_cb(), template_id_def_new_but(), template_id_workspace_pin_extra_icon(), template_search_textbut_height(), template_search_textbut_width(), TIP_, PointerRNA::type, UI_block_align_begin(), UI_block_align_end(), UI_BTYPE_BUT, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_TEXT, UI_BUT_DISABLED, UI_but_flag_disable(), UI_but_flag_enable(), UI_but_func_rename_full_set(), UI_but_funcN_set(), UI_but_operator_ptr_ensure(), UI_BUT_REDALERT, UI_BUT_UNDO, UI_fontstyle_string_width(), UI_FSTYLE_WIDGET, UI_ID_ADD_NEW, UI_ID_ALONE, UI_ID_BROWSE, UI_ID_DELETE, UI_ID_LOCAL, UI_ID_NOP, 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(), WM_main_add_notifier(), WM_OP_INVOKE_DEFAULT, and WM_OP_INVOKE_REGION_WIN.

Referenced by ui_template_id(), and uiTemplateAction().

◆ template_id_browse_tip()

static const char * template_id_browse_tip ( const StructRNA * type)
static

◆ template_id_cb()

◆ 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_liboverride_hierarchy_collection_root_find_recursive()

static void template_id_liboverride_hierarchy_collection_root_find_recursive ( Collection * collection,
const int parent_level,
Collection ** r_collection_parent_best,
int * r_parent_level_best )
static

◆ template_id_liboverride_hierarchy_collections_tag_recursive()

◆ template_id_liboverride_hierarchy_make()

static void template_id_liboverride_hierarchy_make ( bContext * C,
Main * bmain,
TemplateID * template_ui,
PointerRNA * idptr,
const char ** r_undo_push_label )
static

◆ template_ID_search_menu_item_tooltip()

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

Definition at line 525 of file interface_templates.cc.

References UI_tooltip_create_from_search_item_generic().

Referenced by id_search_menu().

◆ 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()

◆ template_id_workspace_pin_extra_icon()

static void template_id_workspace_pin_extra_icon ( const TemplateID & template_ui,
uiBut * but )
static

Add a superimposed extra icon to but, for workspace pinning. Rather ugly special handling, but this is really a special case at this point, nothing worth generalizing.

Definition at line 1185 of file interface_templates.cc.

References PointerRNA::data, WorkSpace::flags, ID_SCE, TemplateID::idcode, TemplateID::ptr, PointerRNA::type, UI_but_extra_operator_icon_add(), WM_OP_INVOKE_DEFAULT, WM_window_get_active_workspace(), and WORKSPACE_USE_PIN_SCENE.

Referenced by template_ID().

◆ template_keymap_item_properties()

◆ template_operator_property_buts_draw_recursive()

◆ 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

Definition at line 2771 of file interface_templates.cc.

References uiBlock::buttons, C, uiTemplateOperatorPropertyPollParam::C, col, blender::bke::idprop::create_group(), CTX_wm_manager(), CTX_wm_window(), ELEM, uiBlock::flag, wmOperator::flag, wmOperatorType::flag, wmWindowManager::id, wmOperatorType::idname, IFACE_, wmOperator::layout, IDProperty::len, LISTBASE_FOREACH, N_, uiBlock::oldblock, OPTYPE_PRESET, ot, wmOperatorType::poll_property, wmOperatorType::prop, wmOperator::properties, ptr, wmOperator::ptr, RNA_boolean_set(), RNA_pointer_create(), RNA_string_set(), wmOperatorType::srna, TIP_, wmOperator::type, wmOperatorType::ui, UI_BLOCK_KEEP_OPEN, UI_block_lock_clear(), UI_block_lock_set(), UI_block_set_active_operator(), UI_BTYPE_BUT, UI_BTYPE_NUM, UI_BTYPE_TEXT, UI_but_flag_disable(), UI_but_focus_on_enter_event(), UI_but_func_set(), UI_BUT_UNDO, UI_ITEM_NONE, ui_layout_operator_buts_poll_property(), UI_PROP_BUTS_NONE_ADDED, UI_TEMPLATE_OP_PROPS_COMPACT, UI_TEMPLATE_OP_PROPS_HIDE_PRESETS, UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT, UI_TEMPLATE_OP_PROPS_SHOW_EMPTY, UI_TEMPLATE_OP_PROPS_SHOW_TITLE, UI_UNIT_X, UI_UNIT_Y, uiDefAutoButsRNA(), uiDefIconTextBut(), uiItemFullO_ptr(), uiItemL(), uiItemM(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutRow(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), WM_OP_INVOKE_DEFAULT, WM_operator_repeat_check(), WM_operatortype_find(), and WM_operatortype_name().

Referenced by draw_export_properties(), and template_operator_property_buts_draw_recursive().

◆ 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 wmOperatorCallContext 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()

◆ 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()

◆ template_search_setup()

◆ template_search_textbut_height()

static int template_search_textbut_height ( )
static

◆ template_search_textbut_width()

◆ UI_context_active_but_get_tab_ID()

ID * UI_context_active_but_get_tab_ID ( bContext * C)

◆ UI_context_active_but_prop_get_templateID()

◆ ui_icon_view_menu_cb()

◆ ui_layout_operator_buts_poll_property()

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

◆ ui_layout_operator_properties_only_booleans()

◆ 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_id_liboverride_hierarchy_make()

ID * ui_template_id_liboverride_hierarchy_make ( bContext * C,
Main * bmain,
ID * owner_id,
ID * id,
const char ** r_undo_push_label )

◆ ui_template_palette_menu()

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

Definition at line 5818 of file interface_templates.cc.

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

Referenced by uiTemplatePalette().

◆ ui_template_status_tooltip()

static std::string ui_template_status_tooltip ( bContext * C,
void * ,
const char *  )
static

◆ UI_UL_cache_file_layers()

uiListType * UI_UL_cache_file_layers ( )

◆ uiTemplateAction()

void uiTemplateAction ( uiLayout * layout,
const bContext * C,
ID * id,
const char * newop,
const char * unlinkop,
const char * text )

Action selector.

This is a specialization of uiTemplateID, hard-coded to assign Actions to the given ID. Such a specialization is necessary, as the RNA property (id.animation_data.action) does not exist when the ID's adt pointer is nullptr. In that case uiTemplateID will not be able to find the RNA type of that property, which in turn it needs to determine the type of IDs to show.

Definition at line 1902 of file interface_templates.cc.

References BKE_animdata_from_id(), BLI_assert, CTX_data_main(), TemplateID::filter, flag, ID_AC, id_can_have_animdata(), TemplateID::idcode, TemplateID::idlb, TemplateID::prop, PROP_POINTER, TemplateID::prv_cols, TemplateID::prv_rows, TemplateID::ptr, RNA_pointer_create(), RNA_property_type(), RNA_struct_type_find_property(), RNA_warning, TemplateID::scale, template_ID(), UI_ID_ADD_NEW, UI_ID_BROWSE, UI_ID_DELETE, UI_ID_RENAME, UI_TEMPLATE_ID_FILTER_ALL, uiLayoutRow(), and which_libbase().

◆ 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 2068 of file interface_templates.cc.

References IFACE_, PROP_ENUM, PROP_POINTER, ptr, RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, PointerRNA::type, UI_ITEM_NONE, 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 )

Draw the main CacheFile properties and operators (file path, scale, etc.), that is those which do not have their own dedicated template functions.

Definition at line 7406 of file interface_templates.cc.

References BCONTEXT_CONSTRAINT, CTX_wm_space_properties(), PointerRNA::data, IFACE_, SpaceProperties::mainb, ptr, UI_ITEM_NONE, uiItemO(), uiItemR(), uiLayoutRow(), uiLayoutSetContextPointer(), uiLayoutSetPropSep(), uiTemplateCacheFilePointer(), and uiTemplateID().

Referenced by panel_draw().

◆ uiTemplateCacheFileLayers()

void uiTemplateCacheFileLayers ( uiLayout * layout,
const bContext * C,
PointerRNA * fileptr )

◆ uiTemplateCacheFilePointer()

bool uiTemplateCacheFilePointer ( PointerRNA * ptr,
const char * propname,
PointerRNA * r_file_ptr )

Lookup the CacheFile PointerRNA of the given pointer and return it in the output parameter. Returns true if ptr has a RNACacheFile, false otherwise. If false, the output parameter is not initialized.

Definition at line 7384 of file interface_templates.cc.

References printf, PROP_POINTER, ptr, RNA_property_pointer_get(), RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), and PointerRNA::type.

Referenced by override_layers_panel_draw(), render_procedural_panel_draw(), time_panel_draw(), uiTemplateCacheFile(), and velocity_panel_draw().

◆ uiTemplateCacheFileProcedural()

◆ uiTemplateCacheFileTimeSettings()

void uiTemplateCacheFileTimeSettings ( uiLayout * layout,
PointerRNA * fileptr )

◆ uiTemplateCacheFileVelocity()

void uiTemplateCacheFileVelocity ( uiLayout * layout,
PointerRNA * fileptr )

Draw the velocity related properties of the CacheFile.

Definition at line 7220 of file interface_templates.cc.

References RNA_pointer_is_null(), UI_ITEM_NONE, uiItemR(), and uiLayoutSetContextPointer().

Referenced by velocity_panel_draw().

◆ uiTemplateCollectionExporters()

◆ uiTemplateColormanagedViewSettings()

◆ uiTemplateColorPicker()

◆ uiTemplateColorRamp()

◆ uiTemplateColorspaceSettings()

◆ uiTemplateComponentMenu()

◆ uiTemplateConstraintHeader()

◆ uiTemplateConstraints()

◆ uiTemplateCryptoPicker()

◆ uiTemplateCurveMapping()

◆ uiTemplateCurveProfile()

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

◆ uiTemplateEventFromKeymapItem()

bool uiTemplateEventFromKeymapItem ( uiLayout * layout,
const char * text,
const 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 )

Definition at line 2007 of file interface_templates.cc.

References ptr, UI_ID_BROWSE, UI_ID_DELETE, UI_ID_PREVIEWS, and ui_template_id().

◆ uiTemplateHeader()

void uiTemplateHeader ( uiLayout * layout,
bContext * C )

◆ uiTemplateHistogram()

◆ uiTemplateIcon()

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

Definition at line 3998 of file interface_templates.cc.

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

◆ uiTemplateIconView()

◆ 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 1872 of file interface_templates.cc.

References ptr, UI_ID_BROWSE, UI_ID_DELETE, UI_ID_RENAME, and ui_template_id().

Referenced by nla_panel_animdata(), blender::ed::space_node::node_buts_texture(), blender::ed::space_node::node_composit_buts_cryptomatte(), blender::nodes::node_composite_defocus_cc::node_composit_buts_defocus(), blender::ed::space_node::node_composit_buts_image(), blender::nodes::node_composite_keyingscreen_cc::node_composit_buts_keyingscreen(), blender::nodes::node_composite_mask_cc::node_composit_buts_mask(), blender::nodes::node_composite_movieclip_cc::node_composit_buts_movieclip(), blender::nodes::node_composite_movieclip_cc::node_composit_buts_movieclip_ex(), blender::nodes::node_composite_moviedistortion_cc::node_composit_buts_moviedistortion(), blender::nodes::node_composite_planetrackdeform_cc::node_composit_buts_planetrackdeform(), blender::nodes::node_composite_stabilize2d_cc::node_composit_buts_stabilize2d(), blender::nodes::node_composite_trackpos_cc::node_composit_buts_trackpos(), blender::nodes::node_composite_render_layer_cc::node_composit_buts_viewlayers(), blender::nodes::node_geo_image_cc::node_layout(), blender::nodes::node_geo_string_to_curves_cc::node_layout(), blender::ed::space_node::node_shader_buts_tex_environment(), blender::ed::space_node::node_shader_buts_tex_image(), blender::ed::space_node::node_texture_buts_image(), blender::panel_draw(), panel_draw(), panel_draw(), blender::ed::space_node::std_node_socket_draw(), texture_panel_draw(), texture_panel_draw(), uiTemplateCacheFile(), uiTemplateImage(), uiTemplateMovieClip(), and weightvg_ui_common().

◆ 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 )

◆ 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 = UI_TEMPLATE_ID_FILTER_ALL )

Version of uiTemplateID using tabs.

Definition at line 2035 of file interface_templates.cc.

References ptr, UI_ID_BROWSE, UI_ID_RENAME, and ui_template_id().

◆ uiTemplateInputStatus()

◆ uiTemplateInputStatusAzone()

static bool uiTemplateInputStatusAzone ( uiLayout * layout,
const AZone * az,
const ARegion * region )
static

Definition at line 6482 of file interface_templates.cc.

References AZONE_AREA, AZONE_REGION, IFACE_, AZone::type, uiItemL(), and uiItemS_ex().

Referenced by uiTemplateInputStatus().

◆ uiTemplateKeymapItemProperties()

◆ uiTemplateLayers()

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

◆ uiTemplateModifiers()

◆ uiTemplateNodeSocket()

◆ 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 2983 of file interface_templates.cc.

References CTX_wm_manager(), flag, template_operator_property_buts_draw_recursive(), ui_layout_operator_properties_only_booleans(), and UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT.

Referenced by file_panel_operator(), wm_block_create_redo(), wm_block_dialog_create(), and wm_operator_ui_create().

◆ uiTemplateOperatorRedoProperties()

◆ uiTemplatePalette()

◆ uiTemplatePathBuilder()

void uiTemplatePathBuilder ( uiLayout * layout,
PointerRNA * ptr,
const char * propname,
PointerRNA * root_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 2400 of file interface_templates.cc.

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

Referenced by graph_panel_driverVar__contextProp(), and graph_panel_driverVar__singleProp().

◆ uiTemplatePreview()

◆ uiTemplateRecentFiles()

◆ uiTemplateRecentFiles_tooltip_func()

◆ uiTemplateReportsBanner()

◆ uiTemplateRunningJobs()

◆ uiTemplateSearch()

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

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

Definition at line 2354 of file interface_templates.cc.

References ptr, template_search_buttons(), and template_search_setup().

Referenced by nla_panel_actclip().

◆ 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,
const char * text )

◆ uiTemplateShaderFx()

◆ uiTemplateStatusBarModalItem()

◆ uiTemplateStatusInfo()

◆ uiTemplateVectorscope()

◆ uiTemplateWaveform()