|
Blender V4.3
|
#include <cmath>#include <cstdio>#include <cstring>#include <sys/stat.h>#include <sys/types.h>#include <dirent.h>#include <sys/times.h>#include <unistd.h>#include "AS_asset_representation.hh"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_userdef_types.h"#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_fnmatch.h"#include "BLI_math_base.h"#include "BLI_utildefines.h"#include "BLO_userdef_default.h"#include "BLT_translation.hh"#include "BKE_appdir.hh"#include "BKE_context.hh"#include "BKE_idtype.hh"#include "BKE_main.hh"#include "BKE_preferences.h"#include "BLF_api.hh"#include "ED_fileselect.hh"#include "ED_screen.hh"#include "WM_api.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "UI_interface.hh"#include "UI_interface_icons.hh"#include "UI_view2d.hh"#include "AS_essentials_library.hh"#include "file_intern.hh"#include "filelist.hh"Go to the source code of this file.
Macros | |
| #define | VERTLIST_MAJORCOLUMN_WIDTH (25 * UI_UNIT_X) |
| #define | PARAMS_FLAGS_REMEMBERED (FILE_HIDE_DOT) |
| #define PARAMS_FLAGS_REMEMBERED (FILE_HIDE_DOT) |
Definition at line 628 of file filesel.cc.
Referenced by ED_fileselect_params_to_userdef(), and ED_fileselect_set_params_from_userdef().
Definition at line 70 of file filesel.cc.
Referenced by ED_fileselect_init_layout().
Definition at line 1221 of file filesel.cc.
References AUTOCOMPLETE_FULL_MATCH, AUTOCOMPLETE_NO_MATCH, BLI_path_join, BLI_path_slash_ensure(), BLI_path_split_dir_part(), BLI_stat(), closedir(), CTX_wm_space_file(), dirent::d_name, dirname(), FILE_MAX, FILENAME_IS_CURRPAR, SpaceFile::files, opendir(), readdir(), S_ISDIR, str, UI_autocomplete_begin(), UI_autocomplete_end(), and UI_autocomplete_update_name().
Referenced by ED_file_path_button().
Definition at line 1269 of file filesel.cc.
References AUTOCOMPLETE_NO_MATCH, CTX_wm_space_file(), FILE_MAX, filelist_entry_get_relpath(), filelist_files_ensure(), SpaceFile::files, str, UI_autocomplete_begin(), UI_autocomplete_end(), and UI_autocomplete_update_name().
Referenced by file_panel_execution_buttons_draw().
| void ED_file_change_dir | ( | bContext * | C | ) |
Definition at line 1181 of file filesel.cc.
References CTX_wm_area(), and ED_file_change_dir_ex().
Referenced by bookmark_select_exec(), file_directory_enter_handle(), file_directory_new_exec(), file_execute(), file_filename_enter_handle(), file_next_exec(), file_parent_exec(), file_previous_exec(), and file_select_do().
Support updating the directory even when this isn't the active space needed so RNA properties update function isn't context sensitive, see #70255.
Definition at line 1148 of file filesel.cc.
References CTX_wm_manager(), ED_fileselect_clear(), ED_fileselect_get_active_params(), file_draw_check_ex(), filelist_dir(), filelist_is_dir(), filelist_setdir(), SpaceFile::files, folderlist_clear_next(), folderlist_free(), folderlist_pushdir(), SpaceFile::folders_next, SpaceFile::folders_prev, params, SPACE_FILE, STRNCPY, and UNLIKELY.
Referenced by ED_file_change_dir().
Definition at line 500 of file filesel.cc.
References ED_fileselect_get_asset_params(), ED_fileselect_is_asset_browser(), FILE_SHOW_ASSETS_FROM_CATALOG, NC_SPACE, ND_SPACE_ASSET_PARAMS, params, and WM_main_add_notifier().
Referenced by blender::ed::asset::asset_catalog_new_exec().
Activate and select the file that corresponds to the given ID. Pass deferred=true to wait for the next refresh before activating.
Definition at line 554 of file filesel.cc.
References CHECK_ALL, ED_fileselect_get_active_params(), ED_fileselect_is_asset_browser(), file_on_reload_callback_register(), FILE_SEL_ADD, FILE_SEL_SELECTED, filelist_entry_select_set(), filelist_file_ex(), filelist_file_find_id(), filelist_needs_force_reset(), filelist_pending(), SpaceFile::files, NA_ACTIVATED, NA_SELECTED, NC_ASSET, on_reload_activate_by_id(), params, and WM_main_add_notifier().
Referenced by on_reload_activate_by_id().
| void ED_fileselect_activate_by_relpath | ( | SpaceFile * | sfile, |
| const char * | relative_path ) |
Definition at line 593 of file filesel.cc.
References CHECK_ALL, ED_fileselect_get_active_params(), file_on_reload_callback_register(), FILE_SEL_ADD, FILE_SEL_SELECTED, filelist_entry_select_set(), filelist_file(), filelist_files_ensure(), filelist_needs_force_reset(), filelist_pending(), SpaceFile::files, NC_SPACE, ND_SPACE_FILE_PARAMS, on_reload_select_by_relpath(), params, STREQ, and WM_main_add_notifier().
Referenced by on_reload_select_by_relpath().
Definition at line 481 of file filesel.cc.
References ED_fileselect_get_active_params(), ED_fileselect_is_asset_browser(), filelist_file(), filelist_file_get_id(), SpaceFile::files, and params.
Referenced by file_listener().
| blender::asset_system::AssetLibrary * ED_fileselect_active_asset_library_get | ( | const SpaceFile * | sfile | ) |
Definition at line 472 of file filesel.cc.
References ED_fileselect_is_asset_browser(), filelist_asset_library(), and SpaceFile::files.
Referenced by blender::ed::asset::asset_catalog_delete_exec(), blender::ed::asset::asset_catalog_new_exec(), blender::ed::asset::asset_catalog_operator_poll(), blender::ed::asset::asset_catalogs_save_exec(), and blender::ed::asset::get_catalog_service().
| int ED_fileselect_asset_import_method_get | ( | const SpaceFile * | sfile, |
| const FileDirEntry * | file ) |
Resolve this space's eFileAssetImportMethod to the eAssetImportMethod (note the different type) to be used for the actual import of a specific asset.
Definition at line 512 of file filesel.cc.
References ASSET_IMPORT_APPEND, ASSET_IMPORT_APPEND_REUSE, ASSET_IMPORT_LINK, BLI_assert, BLI_assert_unreachable, ED_fileselect_get_asset_params(), ED_fileselect_is_asset_browser(), FILE_ASSET_IMPORT_APPEND, FILE_ASSET_IMPORT_APPEND_REUSE, FILE_ASSET_IMPORT_FOLLOW_PREFS, FILE_ASSET_IMPORT_LINK, and params.
Referenced by file_but_enable_drag().
| void ED_fileselect_clear | ( | wmWindowManager * | wm, |
| SpaceFile * | sfile ) |
Definition at line 1289 of file filesel.cc.
References ED_fileselect_get_active_params(), filelist_clear(), filelist_freelib(), filelist_readjob_stop(), SpaceFile::files, NC_SPACE, ND_SPACE_FILE_LIST, params, and WM_main_add_notifier().
Referenced by blender::ed::asset::asset_library_refresh_exec(), blender::ed::asset::list::clear(), ED_file_change_dir_ex(), ED_fileselect_exit(), file_delete_exec(), file_directory_new_exec(), file_hidedot_exec(), file_refresh_exec(), and renamebutton_cb().
| void ED_fileselect_deselect_all | ( | SpaceFile * | sfile | ) |
Definition at line 620 of file filesel.cc.
References FILE_SEL_SELECTED, file_select_deselect_all(), NC_SPACE, ND_SPACE_FILE_PARAMS, and WM_main_add_notifier().
| FileSelectParams * ED_fileselect_ensure_active_params | ( | SpaceFile * | sfile | ) |
If needed, create and return the file select parameters for the active browse mode.
Definition at line 361 of file filesel.cc.
References SpaceFile::asset_params, FileAssetSelectParams::base_params, BLI_assert_msg, SpaceFile::browse_mode, FILE_BROWSE_MODE_ASSETS, FILE_BROWSE_MODE_FILES, fileselect_ensure_updated_asset_params(), fileselect_ensure_updated_file_params(), and SpaceFile::params.
Referenced by file_main_region_draw(), file_main_region_message_subscribe(), and file_refresh().
| void ED_fileselect_ensure_default_filepath | ( | bContext * | C, |
| wmOperator * | op, | ||
| const char * | extension ) |
If filepath property is not set on the operator, sets it to the blend file path (or untitled if file is not saved yet) with the given extension.
Definition at line 1466 of file filesel.cc.
References BKE_main_blendfile_path(), BLI_path_extension_replace(), CTX_data_main(), DATA_, FILE_MAX, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set_ex(), and STRNCPY.
Referenced by sequencer_export_subtitles_invoke().
| void ED_fileselect_exit | ( | wmWindowManager * | wm, |
| SpaceFile * | sfile ) |
Definition at line 1303 of file filesel.cc.
References ED_fileselect_clear(), ED_fileselect_params_to_userdef(), ED_fileselect_window_params_get(), EVT_FILESELECT_EXTERNAL_CANCEL, filelist_free(), SpaceFile::files, folder_history_list_free(), MEM_freeN(), SpaceFile::op, wmWindowManager::winactive, WM_event_fileselect_event(), and WM_window_is_temp_screen().
Referenced by file_exit().
| FileSelectParams * ED_fileselect_get_active_params | ( | const SpaceFile * | sfile | ) |
Get the file select parameters for the active browse mode.
Definition at line 380 of file filesel.cc.
References SpaceFile::asset_params, BLI_assert_msg, SpaceFile::browse_mode, FILE_BROWSE_MODE_ASSETS, FILE_BROWSE_MODE_FILES, and SpaceFile::params.
Referenced by bookmark_add_exec(), bookmark_select_exec(), ED_file_change_dir_ex(), ED_fileselect_activate_by_id(), ED_fileselect_activate_by_relpath(), ED_fileselect_active_asset_get(), ED_fileselect_clear(), ED_fileselect_init_layout(), ED_fileselect_params_to_userdef(), file_box_select_modal(), file_column_sort_ui_context_invoke(), file_context(), file_delete_poll(), file_directory_enter_handle(), file_directory_new_exec(), file_draw_check_exists(), file_draw_list(), file_draw_tooltip_custom_func(), file_duplicate(), file_edit_directory_path_exec(), file_execute(), file_expand_directory(), file_filename_enter_handle(), file_filenum_exec(), file_filenum_poll(), file_hidedot_exec(), file_highlight_set(), file_listener(), file_next_exec(), file_operator_to_sfile(), file_os_operations_menu_draw(), file_os_operations_menu_poll(), file_panel_execution_buttons_draw(), file_params_invoke_rename_postscroll(), file_params_rename_end(), file_parent_exec(), file_previous_exec(), file_rename_exec(), file_rename_state_activate(), file_select(), file_select_all_exec(), file_select_do(), file_select_exec(), file_sfile_filepath_set(), file_sfile_to_operator_ex(), file_smoothscroll_invoke(), file_start_filter_exec(), file_view_selected_exec(), file_walk_select_invoke(), file_walk_select_selection_set(), fileselect_file_set(), folderlist_clear_next(), renamebutton_cb(), and wm_context_member_from_ptr().
| FileAssetSelectParams * ED_fileselect_get_asset_params | ( | const SpaceFile * | sfile | ) |
Definition at line 403 of file filesel.cc.
References SpaceFile::asset_params, SpaceFile::browse_mode, and FILE_BROWSE_MODE_ASSETS.
Referenced by ED_fileselect_activate_asset_catalog(), ED_fileselect_asset_import_method_get(), ED_fileselect_is_local_asset_library(), file_context(), file_draw_hint_if_invalid(), file_panel_asset_catalog_buttons_draw(), file_refresh(), and fileselect_refresh_params().
| FileSelectParams * ED_fileselect_get_file_params | ( | const SpaceFile * | sfile | ) |
Definition at line 398 of file filesel.cc.
References SpaceFile::browse_mode, FILE_BROWSE_MODE_FILES, and SpaceFile::params.
| FileLayout * ED_fileselect_get_layout | ( | SpaceFile * | sfile, |
| ARegion * | region ) |
Definition at line 1140 of file filesel.cc.
References ED_fileselect_init_layout(), and SpaceFile::layout.
Referenced by file_box_select_find_last_selected(), file_draw_list(), file_ensure_inside_viewbounds(), file_ensure_selection_inside_viewbounds(), and file_walk_select_do().
| ScrArea * ED_fileselect_handler_area_find | ( | const wmWindow * | win, |
| const wmOperator * | file_operator ) |
Return the File Browser area in which file_operator is active.
Definition at line 1431 of file filesel.cc.
References ED_screen_areas_iter, SpaceFile::op, SPACE_FILE, and WM_window_get_active_screen().
Referenced by WM_event_add_fileselect(), and WM_event_remove_handlers().
Check if there is any area in win that acts as a modal File Browser (SpaceFile.op is set) and return it.
Definition at line 1448 of file filesel.cc.
References ED_screen_areas_iter, SpaceFile::op, SPACE_FILE, and WM_window_get_active_screen().
Referenced by wm_event_find_fileselect_root_window_from_context().
Definition at line 1035 of file filesel.cc.
References FileLayout::attribute_column_header_h, BLI_rctf_size_x(), BLI_rctf_size_y(), View2D::cur, FileLayout::dirty, divide_ceil_u(), ED_fileselect_get_active_params(), ED_fileselect_is_asset_browser(), file_attribute_columns_init(), file_font_pointsize(), FILE_HORIZONTALDISPLAY, FILE_IMGDISPLAY, FILE_LAYOUT_HOR, FILE_LAYOUT_VER, FILE_VERTICALDISPLAY, filelist_files_ensure(), SpaceFile::files, FileLayout::flag, float, FileLayout::flow_columns, FileLayout::height, int, SpaceFile::layout, MEM_callocN, FileLayout::offset_top, params, FileLayout::prv_border_x, FileLayout::prv_border_y, FileLayout::prv_h, FileLayout::prv_w, FileLayout::rows, FileLayout::textheight, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, FileLayout::tile_w, UI_UNIT_X, UI_UNIT_Y, V2D_SCROLL_HEIGHT, VERTLIST_MAJORCOLUMN_WIDTH, and FileLayout::width.
Referenced by ED_fileselect_get_layout(), and file_calc_previews().
| bool ED_fileselect_is_asset_browser | ( | const SpaceFile * | sfile | ) |
Definition at line 467 of file filesel.cc.
References SpaceFile::browse_mode, and FILE_BROWSE_MODE_ASSETS.
Referenced by ED_fileselect_activate_asset_catalog(), ED_fileselect_activate_by_id(), ED_fileselect_active_asset_get(), ED_fileselect_active_asset_library_get(), ED_fileselect_asset_import_method_get(), ED_fileselect_init_layout(), ED_operator_asset_browsing_active(), file_draw_hint_if_invalid(), file_panel_asset_browsing_poll(), and file_refresh().
| bool ED_fileselect_is_file_browser | ( | const SpaceFile * | sfile | ) |
Definition at line 462 of file filesel.cc.
References SpaceFile::browse_mode, and FILE_BROWSE_MODE_FILES.
Referenced by ED_operator_file_browsing_active(), and blender::ed::asset::get_catalog_service().
| bool ED_fileselect_is_local_asset_library | ( | const SpaceFile * | sfile | ) |
Definition at line 408 of file filesel.cc.
References ASSET_LIBRARY_LOCAL, FileAssetSelectParams::asset_library_ref, ED_fileselect_get_asset_params(), and AssetLibraryReference::type.
Referenced by blender::ed::asset::asset_bundle_install_poll().
| bool ED_fileselect_layout_is_inside_pt | ( | const FileLayout * | layout, |
| const View2D * | v2d, | ||
| int | x, | ||
| int | y ) |
Definition at line 857 of file filesel.cc.
References BLI_rcti_isect_pt(), and ED_fileselect_layout_maskrect().
Referenced by file_execute_mouse_invoke(), file_highlight_set(), and file_select_exec().
| bool ED_fileselect_layout_isect_rect | ( | const FileLayout * | layout, |
| const View2D * | v2d, | ||
| const rcti * | rect, | ||
| rcti * | r_dst ) |
Definition at line 864 of file filesel.cc.
References BLI_rcti_isect(), and ED_fileselect_layout_maskrect().
Referenced by file_box_select_exec(), and file_box_select_modal().
| void ED_fileselect_layout_maskrect | ( | const FileLayout * | layout, |
| const View2D * | v2d, | ||
| rcti * | r_rect ) |
Get the currently visible bounds of the layout in screen space. Matches View2D.mask minus the top column-header row.
Definition at line 851 of file filesel.cc.
References View2D::mask, FileLayout::offset_top, and rcti::ymax.
Referenced by ED_fileselect_layout_is_inside_pt(), ED_fileselect_layout_isect_rect(), and file_main_region_draw().
| int ED_fileselect_layout_numfiles | ( | FileLayout * | layout, |
| ARegion * | region ) |
Definition at line 739 of file filesel.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), FILE_LAYOUT_HOR, FileLayout::flag, FileLayout::flow_columns, int, FileLayout::offset_top, FileLayout::rows, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, and FileLayout::tile_w.
Referenced by file_draw_list(), and file_smoothscroll_invoke().
| int ED_fileselect_layout_offset | ( | FileLayout * | layout, |
| int | x, | ||
| int | y ) |
Definition at line 823 of file filesel.cc.
References FILE_LAYOUT_HOR, FileLayout::flag, FileLayout::flow_columns, FileLayout::offset_top, FileLayout::rows, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, FileLayout::tile_w, and x.
Referenced by file_attribute_column_type_find_isect(), file_draw_list(), file_highlight_set(), and file_smoothscroll_invoke().
| FileSelection ED_fileselect_layout_offset_rect | ( | FileLayout * | layout, |
| const rcti * | rect ) |
Definition at line 773 of file filesel.cc.
References CLAMP, FILE_LAYOUT_HOR, FileSelection::first, FileLayout::flag, FileLayout::flow_columns, is_inside(), FileSelection::last, FileLayout::offset_top, FileLayout::rows, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, FileLayout::tile_w, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by find_file_mouse_rect().
| void ED_fileselect_layout_tilepos | ( | const FileLayout * | layout, |
| int | tile, | ||
| int * | x, | ||
| int * | y ) |
Definition at line 874 of file filesel.cc.
References FILE_LAYOUT_HOR, FileLayout::flag, FileLayout::flow_columns, FileLayout::offset_top, FileLayout::rows, tile, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, and FileLayout::tile_w.
Referenced by file_attribute_column_type_find_isect(), file_tile_boundbox(), and tile_draw_rect_get().
| void ED_fileselect_params_to_userdef | ( | SpaceFile * | sfile, |
| const int | temp_win_size[2], | ||
| bool | is_maximized ) |
Update the user-preference data for the file space. In fact, this also contains some non-FileSelectParams data, but we can safely ignore this.
| temp_win_size | If the browser was opened in a temporary window, pass its size here so we can store that in the preferences. Otherwise NULL. |
Definition at line 688 of file filesel.cc.
References UserDef_FileSpaceData::details_flags, UserDef_FileSpaceData::display_type, ED_fileselect_get_active_params(), file_select_use_default_display_type(), file_select_use_default_sort_type(), FILE_SORT_INVERT, UserDef_FileSpaceData::filter_id, UserDef_FileSpaceData::flag, params, PARAMS_FLAGS_REMEMBERED, UserDef_FileSpaceData::sort_type, UserDef_FileSpaceData::temp_win_sizex, UserDef_FileSpaceData::temp_win_sizey, and UserDef_FileSpaceData::thumbnail_size.
Referenced by ED_fileselect_exit(), and wm_handler_fileselect_do().
| void ED_fileselect_set_params_from_userdef | ( | SpaceFile * | sfile | ) |
Definition at line 658 of file filesel.cc.
References SpaceFile::browse_mode, UserDef_FileSpaceData::details_flags, UserDef_FileSpaceData::display_type, FILE_BROWSE_MODE_FILES, file_select_use_default_display_type(), file_select_use_default_sort_type(), FILE_SORT_INVERT, fileselect_ensure_updated_file_params(), UserDef_FileSpaceData::filter_id, UserDef_FileSpaceData::flag, SpaceFile::op, params, PARAMS_FLAGS_REMEMBERED, UserDef_FileSpaceData::sort_type, and UserDef_FileSpaceData::thumbnail_size.
Referenced by wm_handler_fileselect_do().
| void ED_fileselect_window_params_get | ( | const wmWindow * | win, |
| int | r_win_size[2], | ||
| bool * | r_is_maximized ) |
Definition at line 630 of file filesel.cc.
References UI_SCALE_FAC, WM_window_is_maximized(), WM_window_native_pixel_size(), and WM_window_set_dpi().
Referenced by ED_fileselect_exit(), and wm_handler_fileselect_do().
| 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 890 of file filesel.cc.
References FileLayout::attribute_column_header_h, BLI_rcti_isect_pt(), View2D::mask, rcti::ymax, and rcti::ymin.
Referenced by file_column_sort_ui_context_invoke().
| bool file_attribute_column_type_enabled | ( | const FileSelectParams * | params, |
| FileAttributeColumnType | column, | ||
| const FileLayout * | layout ) |
Definition at line 900 of file filesel.cc.
References COLUMN_DATETIME, COLUMN_NAME, COLUMN_SIZE, FILE_DETAILS_DATETIME, FILE_DETAILS_SIZE, FILE_LAYOUT_HIDE_DATE, FILE_LAYOUT_HIDE_SIZE, and params.
Referenced by draw_columnheader_columns(), draw_details_columns(), file_attribute_column_type_find_isect(), and file_attribute_columns_widths().
| FileAttributeColumnType file_attribute_column_type_find_isect | ( | const View2D * | v2d, |
| const FileSelectParams * | params, | ||
| FileLayout * | layout, | ||
| int | x ) |
Find the column type at region coordinate given by x (y doesn't matter for this).
Definition at line 918 of file filesel.cc.
References ATTRIBUTE_COLUMN_MAX, FileLayout::attribute_columns, COLUMN_NONE, ED_fileselect_layout_offset(), ED_fileselect_layout_tilepos(), file_attribute_column_type_enabled(), IN_RANGE, View2D::mask, FileLayout::offset_top, params, FileLayout::tile_border_x, View2D::tot, UI_view2d_region_to_view(), FileAttributeColumn::width, rctf::xmin, rctf::ymax, and rcti::ymax.
Referenced by file_column_sort_ui_context_invoke().
|
static |
Definition at line 1017 of file filesel.cc.
References FileLayout::attribute_columns, COLUMN_DATETIME, COLUMN_NAME, COLUMN_SIZE, file_attribute_columns_widths(), FILE_LAYOUT_COMPACT, FILE_SORT_ALPHA, FILE_SORT_SIZE, FILE_SORT_TIME, N_, FileAttributeColumn::name, params, FileAttributeColumn::sort_type, FileAttributeColumn::text_align, UI_STYLE_TEXT_LEFT, and UI_STYLE_TEXT_RIGHT.
Referenced by ED_fileselect_init_layout().
|
static |
Definition at line 981 of file filesel.cc.
References ATTRIBUTE_COLUMN_MAX, ATTRIBUTE_COLUMN_PADDING, FileLayout::attribute_columns, COLUMN_DATETIME, COLUMN_NAME, COLUMN_SIZE, file_attribute_column_type_enabled(), FILE_IMGDISPLAY, FILE_LAYOUT_COMPACT, file_string_width(), float, pad, params, FileLayout::tile_w, UI_UNIT_X, and FileAttributeColumn::width.
Referenced by file_attribute_columns_init().
| float file_font_pointsize | ( | ) |
Definition at line 965 of file filesel.cc.
References BLF_height(), uiFontStyle::points, UI_fontstyle_set(), UI_SCALE_FAC, UI_style_get(), uiFontStyle::uifont_id, and uiStyle::widget.
Referenced by ED_fileselect_init_layout().
|
static |
Definition at line 1380 of file filesel.cc.
References filelist_file_find_id(), filelist_file_find_path(), and params.
Referenced by file_params_renamefile_activate().
| void file_params_invoke_rename_postscroll | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| SpaceFile * | sfile ) |
Set the renaming-state to FILE_PARAMS_RENAME_POSTSCROLL_PENDING and trigger the smooth-scroll timer. To be used right after a file was renamed. Note that the caller is responsible for setting the correct rename-file info (FileSelectParams.renamefile or FileSelectParams.rename_id).
Definition at line 1343 of file filesel.cc.
References ED_fileselect_get_active_params(), FILE_PARAMS_RENAME_POSTSCROLL_PENDING, file_params_smoothscroll_timer_clear(), params, SpaceFile::scroll_offset, SpaceFile::smoothscroll_timer, TIMER1, and WM_event_timer_add().
Referenced by file_directory_new_exec(), file_listener(), file_params_rename_end(), and renamebutton_cb().
| void file_params_rename_end | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| SpaceFile * | sfile, | ||
| const FileDirEntry * | rename_file ) |
To be executed whenever renaming ends (successfully or not).
Definition at line 1356 of file filesel.cc.
References CHECK_ALL, ED_fileselect_get_active_params(), file_params_invoke_rename_postscroll(), file_params_renamefile_activate(), FILE_SEL_EDITING, FILE_SEL_REMOVE, filelist_entry_select_set(), SpaceFile::files, and params.
Referenced by file_draw_list().
| void file_params_renamefile_activate | ( | SpaceFile * | sfile, |
| FileSelectParams * | params ) |
Helper used by both main update code, and smooth-scroll timer, to try to enable rename editing from FileSelectParams.renamefile name.
Definition at line 1387 of file filesel.cc.
References BLI_assert, CHECK_ALL, file_params_find_renamed(), FILE_PARAMS_RENAME_ACTIVE, FILE_PARAMS_RENAME_PENDING, FILE_PARAMS_RENAME_POSTSCROLL_ACTIVE, FILE_PARAMS_RENAME_POSTSCROLL_PENDING, file_params_renamefile_clear(), FILE_SEL_ADD, FILE_SEL_EDITING, FILE_SEL_HIGHLIGHTED, FILE_SEL_SELECTED, file_select_deselect_all(), filelist_entry_select_set(), filelist_file(), filelist_is_ready(), SpaceFile::files, and params.
Referenced by file_params_rename_end(), file_refresh(), and file_smoothscroll_invoke().
| void file_params_renamefile_clear | ( | FileSelectParams * | params | ) |
Definition at line 1373 of file filesel.cc.
References params.
Referenced by file_params_renamefile_activate(), and file_smoothscroll_invoke().
| void file_params_smoothscroll_timer_clear | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| SpaceFile * | sfile ) |
Definition at line 1337 of file filesel.cc.
References SpaceFile::smoothscroll_timer, and WM_event_timer_remove().
Referenced by file_params_invoke_rename_postscroll(), and file_smoothscroll_invoke().
| void file_select_deselect_all | ( | SpaceFile * | sfile, |
| const eDirEntry_SelectFlag | flag ) |
Definition at line 1187 of file filesel.cc.
References CHECK_ALL, FILE_SEL_REMOVE, filelist_entries_select_index_range_set(), filelist_files_ensure(), SpaceFile::files, FileSelection::first, flag, and FileSelection::last.
Referenced by blender::ed::asset_browser::AssetCatalogDropTarget::drop_assets_into_catalog(), ED_fileselect_deselect_all(), file_box_select_exec(), file_box_select_modal(), file_params_renamefile_activate(), file_select_exec(), and file_walk_select_selection_set().
Definition at line 1196 of file filesel.cc.
References BLI_strncpy(), CHECK_ALL, FILE_MAX, FILE_SEL_ADD, FILE_SEL_SELECTED, filelist_entry_get_relpath(), filelist_entry_select_index_set(), filelist_files_ensure(), and SpaceFile::files.
Referenced by file_filename_enter_handle().
|
static |
Definition at line 642 of file filesel.cc.
References FILE_DEFAULTDISPLAY, SpaceFile::op, wmOperator::ptr, RNA_property_enum_get(), and RNA_struct_find_property().
Referenced by ED_fileselect_params_to_userdef(), and ED_fileselect_set_params_from_userdef().
|
static |
Definition at line 650 of file filesel.cc.
References FILE_SORT_DEFAULT, SpaceFile::op, wmOperator::ptr, RNA_property_enum_get(), and RNA_struct_find_property().
Referenced by ED_fileselect_params_to_userdef(), and ED_fileselect_set_params_from_userdef().
| float file_string_width | ( | const char * | str | ) |
Definition at line 958 of file filesel.cc.
References BLF_DRAW_STR_DUMMY_MAX, BLF_width(), str, UI_fontstyle_set(), UI_style_get(), uiFontStyle::uifont_id, and uiStyle::widget.
Referenced by file_attribute_columns_widths().
|
static |
Definition at line 100 of file filesel.cc.
References ASSET_LIBRARY_ALL, FileAssetSelectParams::asset_library_ref, SpaceFile::asset_params, FileAssetSelectParams::base_params, BLI_assert, SpaceFile::browse_mode, AssetLibraryReference::custom_library_index, FileSelectParams::details_flags, UserDef_FileSpaceData::details_flags, FileSelectParams::display, FileSelectParams::file, FILE_ASSET_IMPORT_FOLLOW_PREFS, FILE_ASSETS_ONLY, FILE_BROWSE_MODE_ASSETS, FILE_FILTER, FILE_IMGDISPLAY, FILE_SELECT_MAX_RECURSIONS, FILE_SORT_ALPHA, UserDef::file_space_data, FILE_TYPE_BLENDERLIB, fileselect_initialize_params_common(), FileSelectParams::filter, FileSelectParams::filter_glob, FileSelectParams::filter_id, FILTER_ID_ALL, FileSelectParams::flag, UserDef_FileSpaceData::flag, FileAssetSelectParams::import_method, MEM_callocN, SpaceFile::op, FileSelectParams::recursion_level, FileSelectParams::sort, FileSelectParams::thumbnail_size, AssetLibraryReference::type, and U_default.
Referenced by ED_fileselect_ensure_active_params().
|
static |
Definition at line 138 of file filesel.cc.
References BKE_main_blendfile_path_from_global(), BLI_assert, BLI_path_abs(), BLI_path_extension_glob_validate(), BLI_path_normalize_dir(), BLI_path_split_dir_file(), BLI_strncpy_utf8(), SpaceFile::browse_mode, FileSelectParams::details_flags, UserDef_FileSpaceData::details_flags, FileSelectParams::dir, UserDef_FileSpaceData::display_type, FileSelectParams::file, FILE_ACTIVE_COLLECTION, FILE_AUTOSELECT, FILE_BROWSE_MODE_FILES, FILE_CHECK_EXISTING, FILE_DEFAULTDISPLAY, FILE_DIRSEL_ONLY, FILE_FILTER, FILE_HIDE_DOT, FILE_HIDE_TOOL_PROPS, FILE_LINK, FILE_LOADLIB, FILE_MAX, FILE_PATH_TOKENS_ALLOW, FILE_SORT_ALPHA, FILE_SORT_DEFAULT, UserDef::file_space_data, FILE_SPECIAL, FILE_TYPE_ALEMBIC, FILE_TYPE_ARCHIVE, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_BTX, FILE_TYPE_COLLADA, FILE_TYPE_FOLDER, FILE_TYPE_FTFONT, FILE_TYPE_IMAGE, FILE_TYPE_MOVIE, FILE_TYPE_OBJECT_IO, FILE_TYPE_OPERATOR, FILE_TYPE_PYSCRIPT, FILE_TYPE_SOUND, FILE_TYPE_TEXT, FILE_TYPE_USD, FILE_TYPE_VOLUME, FILE_UNIX, FILE_VERTICALDISPLAY, fileselect_initialize_params_common(), FileSelectParams::filter_glob, FileSelectParams::filter_id, UserDef_FileSpaceData::filter_id, UserDef_FileSpaceData::flag, int, MEM_callocN, MEM_freeN(), SpaceFile::op, params, SpaceFile::params, wmOperator::ptr, RNA_boolean_get(), RNA_property_boolean_get(), RNA_property_boolean_set(), RNA_property_enum_get(), RNA_property_int_get(), RNA_property_is_set_ex(), RNA_property_string_get_alloc(), RNA_string_get(), RNA_struct_find_property(), RNA_struct_property_is_set_ex(), UserDef_FileSpaceData::sort_type, STRNCPY, FileSelectParams::thumbnail_size, UserDef_FileSpaceData::thumbnail_size, wmOperator::type, U_default, USER_FILTERFILEEXTS, USER_HIDE_DOT, USER_RELPATHS, and WM_operatortype_name().
Referenced by ED_fileselect_ensure_active_params(), and ED_fileselect_set_params_from_userdef().
Sets FileSelectParams.file (name of selected file)
Definition at line 725 of file filesel.cc.
References CTX_data_main(), ED_fileselect_get_active_params(), file_sfile_to_operator(), FILE_TYPE_DIR, filelist_file(), SpaceFile::files, SpaceFile::op, params, and STRNCPY.
Referenced by file_box_select_modal(), file_select_do(), and file_walk_select_selection_set().
|
static |
Definition at line 72 of file filesel.cc.
References BKE_appdir_folder_default(), BKE_main_blendfile_path_from_global(), BLI_path_split_dir_part(), FileLayout::dirty, folder_history_list_ensure_for_active_browse_mode(), folderlist_pushdir(), SpaceFile::folders_prev, SpaceFile::layout, params, and STRNCPY.
Referenced by fileselect_ensure_updated_asset_params(), and fileselect_ensure_updated_file_params().
|
static |
Definition at line 417 of file filesel.cc.
References ASSET_LIBRARY_ALL, ASSET_LIBRARY_CUSTOM, ASSET_LIBRARY_ESSENTIALS, ASSET_LIBRARY_LOCAL, FileAssetSelectParams::asset_library_ref, FileAssetSelectParams::base_params, BKE_preferences_asset_library_find_index(), BLI_assert, blender::StringRefNull::c_str(), AssetLibraryReference::custom_library_index, FileSelectParams::dir, bUserAssetLibrary::dirpath, blender::asset_system::essentials_directory_path(), FILE_ASSET_LIBRARY, FILE_ASSET_LIBRARY_ALL, FILE_MAIN_ASSET, STRNCPY, AssetLibraryReference::type, and FileSelectParams::type.
Referenced by fileselect_refresh_params().
| void fileselect_refresh_params | ( | SpaceFile * | sfile | ) |
Definition at line 454 of file filesel.cc.
References ED_fileselect_get_asset_params(), and fileselect_refresh_asset_params().
Referenced by file_init(), and file_refresh().
Definition at line 768 of file filesel.cc.
Referenced by armature_edit_select_op_apply(), bm_face_bisect_verts(), blender::ed::outliner::collection_visibility_exec(), do_lasso_select_curve__doSelect(), do_lasso_select_lattice__doSelect(), do_lasso_select_mball__doSelectElem(), do_lasso_select_mesh__doSelectEdge_pass0(), do_lasso_select_mesh__doSelectEdge_pass1(), do_lasso_select_mesh__doSelectFace(), do_lasso_select_mesh__doSelectVert(), do_lasso_select_meshobject__doSelectVert(), do_lasso_select_objects(), do_lattice_box_select__doSelect(), do_mesh_box_select__doSelectEdge_pass0(), do_mesh_box_select__doSelectEdge_pass1(), do_mesh_box_select__doSelectFace(), do_mesh_box_select__doSelectVert(), do_meta_box_select(), do_nurbs_box_select__doSelect(), do_object_box_select(), do_paintvert_box_select__doSelectVert(), do_pose_tag_select_op_exec(), ED_fileselect_layout_offset_rect(), ED_select_op_action(), ED_select_op_action_deselected(), edbm_backbuf_check_and_select_edges(), edbm_backbuf_check_and_select_faces(), edbm_backbuf_check_and_select_faces_obmode(), edbm_backbuf_check_and_select_verts(), edbm_backbuf_check_and_select_verts_obmode(), blender::bke::pbvh::pixels::extract_barycentric_pixels(), for_mouse_hit_keys(), MOD_lineart_chain_clip_at_border(), blender::ed::space_node::node_box_select_exec(), PE_lasso_select(), select_key_op(), ui_searchbox_event(), blender::compositor::BoxMaskOperation::update_memory_buffer_partial(), and blender::compositor::EllipseMaskOperation::update_memory_buffer_partial().
|
static |
Definition at line 548 of file filesel.cc.
References ED_fileselect_activate_by_id().
Referenced by ED_fileselect_activate_by_id().
|
static |
Definition at line 587 of file filesel.cc.
References ED_fileselect_activate_by_relpath().
Referenced by ED_fileselect_activate_by_relpath().