Blender V4.5
file_intern.hh File Reference

Go to the source code of this file.

Classes

struct  SpaceFile_Runtime

Namespaces

namespace  blender
namespace  blender::asset_system
namespace  blender::ed
namespace  blender::ed::asset_browser

Macros

#define ATTRIBUTE_COLUMN_PADDING   (0.5f * UI_UNIT_X)
#define FILE_LAYOUT_COMPACT(_layout)
#define FILE_LAYOUT_HIDE_DATE(_layout)
#define FILE_LAYOUT_HIDE_SIZE(_layout)

Typedefs

using onReloadFnData = void *
using onReloadFn = void (*)(SpaceFile *space_data, onReloadFnData custom_data)

Functions

bool file_main_region_needs_refresh_before_draw (SpaceFile *sfile)
int file_context (const bContext *C, const char *member, bContextDataResult *result)
void file_calc_previews (const bContext *C, ARegion *region)
void file_draw_list (const bContext *C, ARegion *region)
bool file_draw_hint_if_invalid (const bContext *C, const SpaceFile *sfile, ARegion *region)
void file_draw_check_ex (bContext *C, ScrArea *area)
void file_draw_check (bContext *C)
void file_draw_check_cb (bContext *C, void *arg1, void *arg2)
bool file_draw_check_exists (SpaceFile *sfile)
void FILE_OT_highlight (wmOperatorType *ot)
void FILE_OT_sort_column_ui_context (wmOperatorType *ot)
void FILE_OT_select (wmOperatorType *ot)
void FILE_OT_select_walk (wmOperatorType *ot)
void FILE_OT_select_all (wmOperatorType *ot)
void FILE_OT_select_box (wmOperatorType *ot)
void FILE_OT_select_bookmark (wmOperatorType *ot)
void FILE_OT_bookmark_add (wmOperatorType *ot)
void FILE_OT_bookmark_delete (wmOperatorType *ot)
void FILE_OT_bookmark_cleanup (wmOperatorType *ot)
void FILE_OT_bookmark_move (wmOperatorType *ot)
void FILE_OT_reset_recent (wmOperatorType *ot)
void FILE_OT_hidedot (wmOperatorType *ot)
void FILE_OT_execute (wmOperatorType *ot)
void FILE_OT_external_operation (wmOperatorType *ot)
void file_external_operations_menu_register ()
void FILE_OT_mouse_execute (wmOperatorType *ot)
void FILE_OT_cancel (wmOperatorType *ot)
void FILE_OT_parent (wmOperatorType *ot)
void FILE_OT_directory_new (wmOperatorType *ot)
void FILE_OT_previous (wmOperatorType *ot)
void FILE_OT_next (wmOperatorType *ot)
void FILE_OT_refresh (wmOperatorType *ot)
void FILE_OT_filenum (wmOperatorType *ot)
void FILE_OT_delete (wmOperatorType *ot)
void FILE_OT_rename (wmOperatorType *ot)
void FILE_OT_smoothscroll (wmOperatorType *ot)
void FILE_OT_filepath_drop (wmOperatorType *ot)
void FILE_OT_start_filter (wmOperatorType *ot)
void FILE_OT_edit_directory_path (wmOperatorType *ot)
void FILE_OT_view_selected (wmOperatorType *ot)
void file_directory_enter_handle (bContext *C, void *arg_unused, void *arg_but)
void file_filename_enter_handle (bContext *C, void *arg_unused, void *arg_but)
int file_highlight_set (SpaceFile *sfile, ARegion *region, int mx, int my)
void file_sfile_filepath_set (SpaceFile *sfile, const char *filepath)
void file_sfile_to_operator_ex (bContext *C, Main *bmain, wmOperator *op, SpaceFile *sfile, char *filepath)
void file_sfile_to_operator (bContext *C, Main *bmain, wmOperator *op, SpaceFile *sfile)
void file_operator_to_sfile (Main *bmain, SpaceFile *sfile, wmOperator *op)
void fileselect_refresh_params (SpaceFile *sfile)
void fileselect_file_set (bContext *C, SpaceFile *sfile, int index)
bool file_attribute_column_type_enabled (const FileSelectParams *params, FileAttributeColumnType column, const FileLayout *layout)
bool file_attribute_column_header_is_inside (const View2D *v2d, const FileLayout *layout, int x, int y)
FileAttributeColumnType file_attribute_column_type_find_isect (const View2D *v2d, const FileSelectParams *params, FileLayout *layout, int x)
float file_string_width (const char *str)
float file_font_pointsize ()
void file_select_deselect_all (SpaceFile *sfile, eDirEntry_SelectFlag flag)
int file_select_match (SpaceFile *sfile, const char *pattern, char *matched_file)
int autocomplete_directory (bContext *C, char *str, void *arg_v)
int autocomplete_file (bContext *C, char *str, void *arg_v)
void file_params_smoothscroll_timer_clear (wmWindowManager *wm, wmWindow *win, SpaceFile *sfile)
void file_params_renamefile_clear (FileSelectParams *params)
void file_params_invoke_rename_postscroll (wmWindowManager *wm, wmWindow *win, SpaceFile *sfile)
void file_params_rename_end (wmWindowManager *wm, wmWindow *win, SpaceFile *sfile, const FileDirEntry *rename_file)
void file_params_renamefile_activate (SpaceFile *sfile, FileSelectParams *params)
void file_on_reload_callback_register (SpaceFile *sfile, onReloadFn callback, onReloadFnData custom_data)
void folderlist_free (ListBase *folderlist)
void folderlist_popdir (ListBase *folderlist, char *dir)
void folderlist_pushdir (ListBase *folderlist, const char *dir)
const char * folderlist_peeklastdir (ListBase *folderlist)
bool folderlist_clear_next (SpaceFile *sfile)
void folder_history_list_ensure_for_active_browse_mode (SpaceFile *sfile)
void folder_history_list_free (SpaceFile *sfile)
ListBase folder_history_list_duplicate (ListBase *listbase)
void file_tool_props_region_panels_register (ARegionType *art)
void file_execute_region_panels_register (ARegionType *art)
void file_tools_region_panels_register (ARegionType *art)
void file_tile_boundbox (const ARegion *region, FileLayout *layout, int file, rcti *r_bounds)
void file_path_to_ui_path (const char *path, char *r_path, int r_path_maxncpy)
void blender::ed::asset_browser::file_create_asset_catalog_tree_view_in_layout (const bContext *C, asset_system::AssetLibrary *asset_library, uiLayout *layout, SpaceFile *space_file, FileAssetSelectParams *params)
AssetCatalogFilterSettingsblender::ed::asset_browser::file_create_asset_catalog_filter_settings ()
void blender::ed::asset_browser::file_delete_asset_catalog_filter_settings (AssetCatalogFilterSettings **filter_settings)
bool blender::ed::asset_browser::file_set_asset_catalog_filter_settings (AssetCatalogFilterSettings *filter_settings, eFileSel_Params_AssetCatalogVisibility catalog_visibility, const ::bUUID &catalog_id)
void blender::ed::asset_browser::file_ensure_updated_catalog_filter_data (AssetCatalogFilterSettings *filter_settings, const asset_system::AssetLibrary *asset_library)
bool blender::ed::asset_browser::file_is_asset_visible_in_catalog_filter_settings (const AssetCatalogFilterSettings *filter_settings, const AssetMetaData *asset_data)

Variables

const char * file_context_dir []

Macro Definition Documentation

◆ ATTRIBUTE_COLUMN_PADDING

#define ATTRIBUTE_COLUMN_PADDING   (0.5f * UI_UNIT_X)

◆ FILE_LAYOUT_COMPACT

#define FILE_LAYOUT_COMPACT ( _layout)
Value:
(_layout->flag & FILE_LAYOUT_VER && (_layout->width / UI_SCALE_FAC) < 500)
#define UI_SCALE_FAC
#define FILE_LAYOUT_VER

Definition at line 43 of file file_intern.hh.

Referenced by draw_details_columns(), file_attribute_columns_init(), and file_attribute_columns_widths().

◆ FILE_LAYOUT_HIDE_DATE

#define FILE_LAYOUT_HIDE_DATE ( _layout)
Value:
(_layout->flag & FILE_LAYOUT_VER && (_layout->width / UI_SCALE_FAC) < 250)

Definition at line 45 of file file_intern.hh.

Referenced by file_attribute_column_type_enabled().

◆ FILE_LAYOUT_HIDE_SIZE

#define FILE_LAYOUT_HIDE_SIZE ( _layout)
Value:
(_layout->flag & FILE_LAYOUT_VER && (_layout->width / UI_SCALE_FAC) < 350)

Definition at line 47 of file file_intern.hh.

Referenced by file_attribute_column_type_enabled().

Typedef Documentation

◆ onReloadFn

using onReloadFn = void (*)(SpaceFile *space_data, onReloadFnData custom_data)

Definition at line 191 of file file_intern.hh.

◆ onReloadFnData

using onReloadFnData = void *

Definition at line 190 of file file_intern.hh.

Function Documentation

◆ autocomplete_directory()

◆ autocomplete_file()

◆ file_attribute_column_header_is_inside()

bool file_attribute_column_header_is_inside ( const View2D * v2d,
const FileLayout * layout,
int x,
int y )

Check if the region coordinate defined by x and y are inside the column header.

Definition at line 897 of file filesel.cc.

References FileLayout::attribute_column_header_h, BLI_rcti_isect_pt(), file_attribute_column_header_is_inside(), View2D::mask, x, y, rcti::ymax, and rcti::ymin.

Referenced by file_attribute_column_header_is_inside(), and file_column_sort_ui_context_invoke().

◆ file_attribute_column_type_enabled()

◆ file_attribute_column_type_find_isect()

◆ file_calc_previews()

◆ file_context()

◆ file_directory_enter_handle()

◆ file_draw_check()

◆ file_draw_check_cb()

void file_draw_check_cb ( bContext * C,
void * arg1,
void * arg2 )

◆ file_draw_check_ex()

◆ file_draw_check_exists()

◆ file_draw_hint_if_invalid()

◆ file_draw_list()

void file_draw_list ( const bContext * C,
ARegion * region )

Definition at line 1254 of file file_draw.cc.

References FileDirEntry::asset, blender::ed::asset::asset_preview_or_icon(), ATTRIBUTE_COLUMN_PADDING, FileLayout::attribute_columns, FileDirEntry::attributes, BIFICONID_LAST_STATIC, BLF_batch_draw_begin(), BLF_batch_draw_end(), BLI_assert, BLI_rcti_size_x(), BLI_rcti_size_y(), C, CHECK_ALL, COLUMN_NAME, copy_v4_v4_uchar(), CTX_wm_manager(), CTX_wm_space_file(), CTX_wm_window(), View2D::cur, FileLayout::curr_size, FileSelectParams::display, draw_background(), draw_columnheader_background(), draw_columnheader_columns(), draw_details_columns(), draw_dividers(), draw_tile_background(), ED_fileselect_get_active_params(), ED_fileselect_get_layout(), ED_fileselect_layout_numfiles(), ED_fileselect_layout_offset(), blender::ui::Emboss, file_add_icon_but(), file_add_overlay_icon_but(), file_add_preview_drag_but(), FILE_ATTR_HIDDEN, file_but_enable_drag(), file_but_tooltip_func_set(), file_draw_indicator_icons(), file_draw_list(), file_draw_loading_icon(), file_draw_preview(), file_draw_special_image(), file_draw_string(), file_draw_string_mulitline_clipped(), FILE_IMGDISPLAY, FILE_LAYOUT_HOR, FILE_MAX_LIBEXTRA, file_params_rename_end(), FILE_SEL_EDITING, FILE_SEL_HIGHLIGHTED, FILE_SEL_SELECTED, FILE_VERTICALDISPLAY, filelist_cache_previews_done(), filelist_cache_previews_running(), filelist_cache_previews_update(), filelist_entry_select_get(), filelist_file(), filelist_file_cache_block(), filelist_file_cache_slidingwindow_set(), filelist_file_get_full_path(), filelist_file_is_preview_pending(), filelist_files_ensure(), filelist_get_preview_image(), filelist_geticon_file_type(), filelist_is_ready(), FILENAME_IS_CURRPAR, SpaceFile::files, FileSelectParams::filter_search, FileLayout::flag, FileLayout::flow_columns, FileSelectParams::highlight_file, i, ICON_DEFAULT_WIDTH_SCALE, IFACE_, min_ii(), FileDirEntry::name, NC_SPACE, ND_SPACE_FILE_PARAMS, ND_SPACE_FILE_PREVIEW, SpaceFile::previews_timer, FileLayout::prv_h, FileLayout::prv_w, FileDirEntry::relpath, renamebutton_cb(), FileSelectParams::renamefile, round_fl_to_int(), FileLayout::rows, text_draw_rect_get(), FileLayout::text_line_height, FileLayout::text_lines_count, TH_BACK, TH_HILITE, TH_TEXT, FileSelectParams::thumbnail_size, FileLayout::tile_border_y, tile_draw_rect_get(), FileLayout::tile_h, UI_block_begin(), UI_block_draw(), UI_block_end(), UI_BTYPE_LABEL, UI_BTYPE_TEXT, UI_but_active_only(), UI_BUT_DRAG_FULL_BUT, UI_but_dragflag_enable(), UI_but_flag_disable(), UI_but_flag_enable(), UI_but_func_rename_set(), UI_BUT_NO_UTF8, UI_BUT_UNDO, UI_CNR_NONE, UI_draw_roundbox_corner_set(), UI_fontstyle_draw_simple(), UI_fontstyle_string_width(), UI_GetThemeColor4ubv(), UI_SCALE_FAC, UI_style_get(), UI_STYLE_TEXT_CENTER, UI_STYLE_TEXT_LEFT, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), UNUSED_VARS_NDEBUG, ARegion::v2d, uiStyle::widget, FileAttributeColumn::width, FileLayout::width, WM_event_add_notifier_ex(), WM_event_timer_add_notifier(), WM_event_timer_remove_notifier(), rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, and rcti::ymin.

Referenced by file_draw_list(), and file_main_region_draw().

◆ file_execute_region_panels_register()

◆ file_external_operations_menu_register()

◆ file_filename_enter_handle()

◆ file_font_pointsize()

float file_font_pointsize ( )

◆ file_highlight_set()

◆ file_main_region_needs_refresh_before_draw()

◆ file_on_reload_callback_register()

void file_on_reload_callback_register ( SpaceFile * sfile,
onReloadFn callback,
onReloadFnData custom_data )

Register an on-reload callback function. Note that there can only be one such function at a time; registering a new one will overwrite the previous one.

Definition at line 331 of file space_file.cc.

References file_on_reload_callback_register(), SpaceFile_Runtime::on_reload, SpaceFile_Runtime::on_reload_custom_data, and SpaceFile::runtime.

Referenced by ED_fileselect_activate_by_id(), ED_fileselect_activate_by_relpath(), and file_on_reload_callback_register().

◆ file_operator_to_sfile()

◆ FILE_OT_bookmark_add()

◆ FILE_OT_bookmark_cleanup()

◆ FILE_OT_bookmark_delete()

◆ FILE_OT_bookmark_move()

◆ FILE_OT_cancel()

◆ FILE_OT_delete()

◆ FILE_OT_directory_new()

◆ FILE_OT_edit_directory_path()

◆ FILE_OT_execute()

◆ FILE_OT_external_operation()

◆ FILE_OT_filenum()

◆ FILE_OT_filepath_drop()

◆ FILE_OT_hidedot()

◆ FILE_OT_highlight()

◆ FILE_OT_mouse_execute()

void FILE_OT_mouse_execute ( wmOperatorType * ot)

◆ FILE_OT_next()

◆ FILE_OT_parent()

◆ FILE_OT_previous()

◆ FILE_OT_refresh()

◆ FILE_OT_rename()

◆ FILE_OT_reset_recent()

◆ FILE_OT_select()

◆ FILE_OT_select_all()

◆ FILE_OT_select_bookmark()

◆ FILE_OT_select_box()

◆ FILE_OT_select_walk()

◆ FILE_OT_smoothscroll()

◆ FILE_OT_sort_column_ui_context()

◆ FILE_OT_start_filter()

◆ FILE_OT_view_selected()

◆ file_params_invoke_rename_postscroll()

void file_params_invoke_rename_postscroll ( wmWindowManager * wm,
wmWindow * win,
SpaceFile * sfile )

◆ file_params_rename_end()

void file_params_rename_end ( wmWindowManager * wm,
wmWindow * win,
SpaceFile * sfile,
const FileDirEntry * rename_file )

◆ file_params_renamefile_activate()

◆ file_params_renamefile_clear()

◆ file_params_smoothscroll_timer_clear()

◆ file_path_to_ui_path()

void file_path_to_ui_path ( const char * path,
char * r_path,
int r_path_maxncpy )

If path leads to a .blend, remove the trailing slash (if needed).

Definition at line 32 of file file_utils.cc.

References BKE_blendfile_extension_check(), BLI_path_slash_rstrip(), BLI_strncpy(), FILE_MAX_LIBEXTRA, file_path_to_ui_path(), and STRNCPY().

Referenced by file_draw_invalid_asset_library_hint(), and file_path_to_ui_path().

◆ file_select_deselect_all()

◆ file_select_match()

int file_select_match ( SpaceFile * sfile,
const char * pattern,
char * matched_file )

◆ file_sfile_filepath_set()

void file_sfile_filepath_set ( SpaceFile * sfile,
const char * filepath )

◆ file_sfile_to_operator()

void file_sfile_to_operator ( bContext * C,
Main * bmain,
wmOperator * op,
SpaceFile * sfile )

◆ file_sfile_to_operator_ex()

◆ file_string_width()

float file_string_width ( const char * str)

◆ file_tile_boundbox()

◆ file_tool_props_region_panels_register()

◆ file_tools_region_panels_register()

◆ fileselect_file_set()

◆ fileselect_refresh_params()

void fileselect_refresh_params ( SpaceFile * sfile)

◆ folder_history_list_duplicate()

◆ folder_history_list_ensure_for_active_browse_mode()

◆ folder_history_list_free()

◆ folderlist_clear_next()

◆ folderlist_free()

void folderlist_free ( ListBase * folderlist)

◆ folderlist_peeklastdir()

const char * folderlist_peeklastdir ( ListBase * folderlist)

◆ folderlist_popdir()

void folderlist_popdir ( ListBase * folderlist,
char * dir )

◆ folderlist_pushdir()

Variable Documentation

◆ file_context_dir

const char* file_context_dir[]

Definition at line 134 of file file_intern.hh.