25#include "RNA_prototypes.hh"
45 return (sfile && sfile->
op);
71 const char *hide[] = {
"filepath",
"files",
"directory",
"filename"};
73 bool hidden_override[
ARRAY_SIZE(hide)] = {
false};
78 hidden_override[
i] =
true;
88 if (prop && hidden_override[
i]) {
116 row->
op(
"FILE_OT_cancel",
IFACE_(
"Cancel"), ICON_NONE);
126 row->
op(
"FILE_OT_execute", title, ICON_NONE);
140 const bool windows_layout =
148 &screen->
id, &RNA_FileSelectParams,
params);
169 overwrite_alert ?
TIP_(
"File name, overwrite existing") :
TIP_(
"File name"));
189 if (overwrite_alert) {
198 if (windows_layout) {
236 &screen->
id, &RNA_FileAssetSelectParams,
params);
238 row->
prop(¶ms_ptr,
"asset_library_reference",
UI_ITEM_NONE,
"", ICON_NONE);
244 "asset.bundle_install",
245 "asset_library_reference",
246 IFACE_(
"Copy Bundle to Asset Library..."),
252 row->
op(
"ASSET_OT_library_refresh",
"", ICON_FILE_REFRESH);
bScreen * CTX_wm_screen(const bContext *C)
SpaceFile * CTX_wm_space_file(const bContext *C)
bContext * CTX_copy(const bContext *C)
void CTX_free(bContext *C)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
FileSelectParams * ED_fileselect_get_active_params(const SpaceFile *sfile)
bool ED_fileselect_is_asset_browser(const SpaceFile *sfile)
FileAssetSelectParams * ED_fileselect_get_asset_params(const SpaceFile *sfile)
Read Guarded memory(de)allocation.
uiBut * uiDefButR(uiBlock *block, ButType type, int retval, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
PointerRNA * UI_but_extra_operator_icon_add(uiBut *but, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, int icon)
void UI_panel_drawname_set(Panel *panel, blender::StringRef name)
bool UI_but_is_utf8(const uiBut *but)
@ UI_BUT_LABEL_ALIGN_NONE
void uiTemplateOperatorPropertyButs(const bContext *C, uiLayout *layout, wmOperator *op, eButLabelAlign label_align, short flag)
void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2)
void UI_but_func_complete_set(uiBut *but, uiButCompleteFunc func, void *arg)
@ UI_TEMPLATE_OP_PROPS_SHOW_EMPTY
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
void UI_but_flag_enable(uiBut *but, int flag)
bool UI_but_flag_is_set(uiBut *but, int flag)
int autocomplete_file(bContext *C, char *str, void *arg_v)
void file_filename_enter_handle(bContext *C, void *arg_unused, void *arg_but)
bool file_draw_check_exists(SpaceFile *sfile)
void file_draw_check_cb(bContext *C, void *arg1, void *arg2)
static bool file_panel_operator_poll(const bContext *C, PanelType *)
static bool file_panel_asset_browsing_poll(const bContext *C, PanelType *)
static void file_panel_execution_execute_button(uiLayout *layout, const char *title)
static void file_panel_execution_cancel_button(uiLayout *layout)
void file_execute_region_panels_register(ARegionType *art)
static void file_panel_execution_buttons_draw(const bContext *C, Panel *panel)
static void file_panel_operator_header(const bContext *C, Panel *panel)
static void file_panel_asset_catalog_buttons_draw(const bContext *C, Panel *panel)
void file_tool_props_region_panels_register(ARegionType *art)
static void file_panel_operator(const bContext *C, Panel *panel)
void file_tools_region_panels_register(ARegionType *art)
blender::asset_system::AssetLibrary * filelist_asset_library(FileList *filelist)
void * MEM_callocN(size_t len, const char *str)
void file_create_asset_catalog_tree_view_in_layout(const bContext *C, asset_system::AssetLibrary *asset_library, uiLayout *layout, SpaceFile *space_file, FileAssetSelectParams *params)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
int RNA_property_flag(PropertyRNA *prop)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void(* draw)(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
bool(* poll)(const bContext *C, PanelType *pt)
char translation_context[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
void(* draw_header)(const bContext *C, Panel *panel)
void fixed_size_set(bool fixed_size)
void active_default_set(bool active_default)
void scale_y_set(float scale)
void operator_context_set(blender::wm::OpCallContext opcontext)
uiLayout & column(bool align)
void scale_x_set(float scale)
uiLayout & row(bool align)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
struct wmOperatorType * type
bool WM_operator_name_poll(bContext *C, const char *opstring)
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)