Blender V5.0
interface_templates.cc File Reference
#include "BKE_library.hh"
#include "BKE_screen.hh"
#include "BLI_math_color.h"
#include "BLI_string_ref.hh"
#include "ED_fileselect.hh"
#include "ED_screen.hh"
#include "RNA_access.hh"
#include "UI_interface_layout.hh"
#include "interface_intern.hh"
#include "interface_templates_intern.hh"

Go to the source code of this file.

Functions

Search Menu Helpers
int template_search_textbut_width (PointerRNA *ptr, PropertyRNA *name_prop)
int template_search_textbut_height ()
void template_add_button_search_menu (const bContext *C, uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, uiBlockCreateFunc block_func, void *block_argN, const std::optional< blender::StringRef > tip, const bool use_previews, const bool editable, const bool live_icon, uiButArgNFree func_argN_free_fn, uiButArgNCopy func_argN_copy_fn)
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)
Header Template
void uiTemplateHeader (uiLayout *layout, bContext *C)
RNA Path Builder Template
void uiTemplatePathBuilder (uiLayout *layout, PointerRNA *ptr, const StringRefNull propname, PointerRNA *, const std::optional< StringRefNull > text)
Node Socket Icon Template
void uiTemplateNodeSocket (uiLayout *layout, bContext *, const float color[4])
FileSelectParams Path Button Template
void uiTemplateFileSelectPath (uiLayout *layout, bContext *C, FileSelectParams *params)

Function Documentation

◆ template_add_button_search_menu()

void template_add_button_search_menu ( const bContext * C,
uiLayout * layout,
uiBlock * block,
PointerRNA * ptr,
PropertyRNA * prop,
uiBlockCreateFunc block_func,
void * block_argN,
std::optional< blender::StringRef > 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 )

◆ template_common_search_menu()

◆ template_search_textbut_height()

int template_search_textbut_height ( )

◆ template_search_textbut_width()

◆ uiTemplateFileSelectPath()

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

◆ uiTemplateHeader()

void uiTemplateHeader ( uiLayout * layout,
bContext * C )

◆ uiTemplateNodeSocket()

◆ uiTemplatePathBuilder()

void uiTemplatePathBuilder ( uiLayout * layout,
PointerRNA * ptr,
blender::StringRefNull propname,
PointerRNA * root_ptr,
std::optional< blender::StringRefNull > 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 257 of file interface_templates.cc.

References blender::StringRefNull::c_str(), uiLayout::prop(), PROP_STRING, ptr, RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, uiLayout::row(), and UI_ITEM_NONE.

Referenced by graph_panel_driverVar__contextProp(), and graph_panel_driverVar__singleProp().