25#include "RNA_prototypes.hh"
48 return (sfile && sfile->
op);
74 const char *
hide[] = {
"filepath",
"files",
"directory",
"filename"};
81 hidden_override[i] =
true;
88 uiTemplateOperatorPropertyButs(
94 if (prop && hidden_override[i]) {
99 block_func_set(panel->
layout->
block(),
nullptr,
nullptr,
nullptr);
122 row.
op(
"FILE_OT_cancel",
IFACE_(
"Cancel"), ICON_NONE);
127 const bool overwrite)
135 row.
op(
"FILE_OT_execute", overwrite ?
IFACE_(
"Overwrite") : title, ICON_NONE);
148 const bool windows_layout =
156 &screen->
id, RNA_FileSelectParams, params);
176 overwrite_alert ?
TIP_(
"File name, overwrite existing") :
188 but_extra_rna_ptr = button_extra_operator_icon_add(
191 but_extra_rna_ptr = button_extra_operator_icon_add(
197 if (overwrite_alert) {
200 block_func_set(block,
nullptr,
nullptr,
nullptr);
206 if (windows_layout) {
244 &screen->
id, RNA_FileAssetSelectParams, params);
246 row.
prop(¶ms_ptr,
"asset_library_reference",
UI_ITEM_NONE,
"", ICON_NONE);
252 "asset.bundle_install",
253 "asset_library_reference",
254 IFACE_(
"Copy Bundle to Asset Library..."),
260 PointerRNA ptr = row.
op(
"ASSET_OT_library_refresh",
"", ICON_FILE_REFRESH);
267 C, asset_library, col, sfile, params);
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
Read Blender memory allocation and freeing.
void file_create_asset_catalog_tree_view_in_layout(const bContext *C, asset_system::AssetLibrary *asset_library, ui::Layout &layout, SpaceFile *space_file, FileAssetSelectParams *params)
void panel_drawname_set(Panel *panel, StringRef name)
@ TEMPLATE_OP_PROPS_SHOW_EMPTY
ListBaseT< LayoutPanelState > & popup_persistent_layout_panel_states(StringRef idname)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void file_draw_check_cb(bContext *C, void *arg1, void *arg2)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
static void file_panel_execution_buttons_draw(const bContext *C, Panel *panel)
static void file_panel_execution_execute_button(ui::Layout &layout, const char *title, const bool overwrite)
bool ED_fileselect_is_asset_browser(const SpaceFile *sfile)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
static bool file_panel_asset_browsing_poll(const bContext *C, PanelType *)
int autocomplete_file(bContext *C, char *str, void *arg_v)
asset_system::AssetLibrary * filelist_asset_library(FileList *filelist)
void file_tool_props_region_panels_register(ARegionType *art)
bool WM_operator_name_poll(bContext *C, const char *opstring)
void file_execute_region_panels_register(ARegionType *art)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
static void file_panel_operator(const bContext *C, Panel *panel)
int RNA_property_flag(PropertyRNA *prop)
void CTX_free(bContext *C)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
bContext * CTX_copy(const bContext *C)
FileSelectParams * ED_fileselect_get_active_params(const SpaceFile *sfile)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool file_draw_check_exists(SpaceFile *sfile)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
FileAssetSelectParams * ED_fileselect_get_asset_params(const SpaceFile *sfile)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
static void file_panel_execution_cancel_button(ui::Layout &layout)
static void file_panel_operator_header(const bContext *C, Panel *panel)
static void file_panel_asset_catalog_buttons_draw(const bContext *C, Panel *panel)
SpaceFile * CTX_wm_space_file(const bContext *C)
void file_filename_enter_handle(bContext *C, void *arg_unused, void *arg_but)
bScreen * CTX_wm_screen(const bContext *C)
void file_tools_region_panels_register(ARegionType *art)
static bool file_panel_operator_poll(const bContext *C, PanelType *)
ListBaseT< PanelType > paneltypes
AssetLibraryReference asset_library_ref
eFileSel_Params_Flag flag
char translation_context[BKE_ST_MAXNAME]
void(*) draw(const bContext *C, Panel *panel)
bool(*) poll(const bContext *C, PanelType *pt)
void(*) draw_header(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
ListBaseT< LayoutPanelState > * layout_panel_states_storage
struct Panel_Runtime * runtime
void fixed_size_set(bool fixed_size)
void operator_context_set(wm::OpCallContext opcontext)
PointerRNA op_menu_enum(const bContext *C, wmOperatorType *ot, StringRefNull propname, std::optional< StringRefNull > name, int icon)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void scale_x_set(float scale)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
void red_alert_set(bool red_alert)
Layout & column(bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
void scale_y_set(float scale)
void active_default_set(bool active_default)
struct wmOperatorType * type