Blender
V3.3
|
#include <stdio.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_linklist.h"
#include "BLI_utildefines.h"
#include "BKE_appdir.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_types.h"
#include "ED_asset.h"
#include "ED_asset_indexer.h"
#include "ED_fileselect.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "IMB_imbuf_types.h"
#include "IMB_thumbs.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "GPU_framebuffer.h"
#include "file_indexer.h"
#include "file_intern.h"
#include "filelist.h"
#include "fsmenu.h"
Go to the source code of this file.
Variables | |
const char * | file_context_dir [] |
Definition at line 1099 of file space_file.c.
References filelist_free_icons(), fsmenu_free(), and G.
Referenced by WM_exit_ex().
Definition at line 1088 of file space_file.c.
References ED_file_read_bookmarks(), filelist_init_icons(), G, and IMB_thumb_makedirs().
Referenced by WM_init().
Definition at line 1108 of file space_file.c.
References BKE_appdir_folder_id(), BLENDER_BOOKMARK_FILE, BLENDER_USER_CONFIG, BLI_join_dirfile(), ED_fsmenu_get(), FILE_MAX, fsmenu_free(), fsmenu_read_bookmarks(), fsmenu_read_system(), and NULL.
Referenced by ED_file_init(), and wm_history_file_read_exec().
Definition at line 998 of file space_file.c.
References BKE_spacetype_register(), BKE_ST_MAXNAME, BLI_addhead(), ARegionType::draw, ED_KEYMAP_HEADER, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, file_context(), file_create(), file_dropboxes(), file_duplicate(), file_execute_region_panels_register(), file_execution_region_draw(), file_execution_region_init(), file_exit(), file_free(), file_header_region_draw(), file_header_region_init(), file_id_remap(), file_init(), file_keymap(), file_listener(), file_main_region_draw(), file_main_region_init(), file_main_region_listener(), file_main_region_message_subscribe(), file_operatortypes(), file_refresh(), file_space_subtype_get(), file_space_subtype_item_extend(), file_space_subtype_set(), file_tool_props_region_listener(), file_tool_props_region_panels_register(), file_tools_region_draw(), file_tools_region_init(), file_tools_region_listener(), file_tools_region_panels_register(), file_ui_region_draw(), file_ui_region_init(), file_ui_region_listener(), HEADERY, ARegionType::init, ARegionType::keymapflag, ARegionType::listener, MEM_callocN, ARegionType::message_subscribe, ARegionType::prefsizex, ARegionType::prefsizey, ARegionType::regionid, RGN_TYPE_EXECUTE, RGN_TYPE_HEADER, RGN_TYPE_TOOL_PROPS, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, SPACE_FILE, and usdtokens::st().
Referenced by ED_spacetypes_init().
|
static |
TODO temporary AssetHandle design: For now this returns the file entry. Would be better if it was "selected_assets"
and returned the assets (e.g. as AssetHandle
) directly. See comment for AssetHandle for more info.
Definition at line 898 of file space_file.c.
References FileDirEntry::asset_data, FileAssetSelectParams::asset_library_ref, BLI_assert, C, CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_id_pointer_set(), CTX_data_list_add(), CTX_data_pointer_set(), CTX_DATA_TYPE_COLLECTION, CTX_data_type_set(), CTX_RESULT_MEMBER_NOT_FOUND, CTX_RESULT_NO_DATA, CTX_RESULT_OK, CTX_wm_area(), CTX_wm_screen(), CTX_wm_space_file(), ED_area_is_global(), ED_fileselect_get_active_params(), ED_fileselect_get_asset_params(), file, file_context_dir, file_main_region_needs_refresh_before_draw(), filelist_entry_is_selected(), filelist_file(), filelist_file_get_id(), filelist_files_ensure(), SpaceFile::files, bScreen::id, NULL, params, and result.
Referenced by ED_spacetype_file().
Definition at line 105 of file space_file.c.
References View2D::align, ARegion::alignment, BLI_addtail(), ARegion::flag, View2D::keeptot, View2D::keepzoom, View2D::maxzoom, MEM_callocN, View2D::minzoom, SpaceFile::regionbase, ARegion::regiontype, RGN_ALIGN_LEFT, RGN_ALIGN_TOP, RGN_FLAG_DYNAMIC_SIZE, RGN_TYPE_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, View2D::scroll, SPACE_FILE, SpaceFile::spacetype, ARegion::v2d, V2D_ALIGN_NO_NEG_X, V2D_ALIGN_NO_POS_Y, V2D_KEEPASPECT, V2D_KEEPTOT_STRICT, V2D_LIMITZOOM, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, V2D_SCROLL_BOTTOM, and V2D_SCROLL_RIGHT.
Referenced by ED_spacetype_file().
Definition at line 863 of file space_file.c.
References filepath_drop_copy(), filepath_drop_poll(), NULL, RGN_TYPE_WINDOW, SPACE_EMPTY, WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_spacetype_file().
Definition at line 204 of file space_file.c.
References SpaceFile::asset_params, FileSelectParams::dir, ED_fileselect_get_active_params(), filelist_new(), filelist_setdir(), SpaceFile::files, SpaceFile::folder_histories, folder_history_list_duplicate(), SpaceFile::layout, MEM_dupallocN, NULL, SpaceFile::op, SpaceFile::params, SpaceFile::previews_timer, SpaceFile::runtime, SpaceFile::smoothscroll_timer, and FileSelectParams::type.
Referenced by ED_spacetype_file().
|
static |
Definition at line 237 of file space_file.c.
References blender::compositor::area(), BKE_area_find_region_type(), BLI_assert, SpaceFile::browse_mode, C, ED_area_init(), ED_region_remove(), FILE_BROWSE_MODE_ASSETS, file_execute_region_ensure(), FILE_HIDE_TOOL_PROPS, file_tool_props_region_ensure(), file_ui_region_ensure(), ARegion::flag, SpaceFile::op, params, RGN_FLAG_HIDDEN, RGN_TYPE_EXECUTE, RGN_TYPE_TOOL_PROPS, RGN_TYPE_TOOLS, RGN_TYPE_UI, and UNUSED_VARS.
Referenced by file_refresh().
Definition at line 68 of file space_file.c.
References ARegion::alignment, blender::compositor::area(), BKE_area_find_region_type(), BLI_insertlinkafter(), ARegion::flag, MEM_callocN, NULL, ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_FLAG_DYNAMIC_SIZE, and RGN_TYPE_EXECUTE.
Referenced by file_ensure_valid_region_state().
Definition at line 824 of file space_file.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_file().
|
static |
Definition at line 812 of file space_file.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, View2D::keepzoom, SPACE_FILE, ARegion::v2d, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, WM_event_add_keymap_handler_v2d_mask(), and WM_keymap_ensure().
Referenced by ED_spacetype_file().
|
static |
Definition at line 192 of file space_file.c.
References blender::compositor::area(), ED_fileselect_exit(), if(), NULL, SpaceFile::previews_timer, and WM_event_remove_timer_notifier().
Referenced by ED_spacetype_file().
Definition at line 149 of file space_file.c.
References SpaceFile::asset_params, BKE_reports_clear(), BLI_assert, filelist_free(), filelist_freelib(), SpaceFile::files, folder_history_list_free(), SpaceFile_Runtime::is_blendfile_readable_reports, SpaceFile::layout, MEM_freeN, MEM_SAFE_FREE, NULL, SpaceFile::params, SpaceFile::previews_timer, and SpaceFile::runtime.
Referenced by ED_spacetype_file().
Definition at line 786 of file space_file.c.
References C, and ED_region_header().
Referenced by ED_spacetype_file().
|
static |
Definition at line 776 of file space_file.c.
References wmWindowManager::defaultconf, ED_region_header_init(), ARegion::handlers, SPACE_FILE, WM_event_add_keymap_handler_v2d_mask(), and WM_keymap_ensure().
Referenced by ED_spacetype_file().
|
static |
Definition at line 987 of file space_file.c.
References blender::compositor::area(), and file_reset_filelist_showing_main_data().
Referenced by ED_spacetype_file().
|
static |
Definition at line 176 of file space_file.c.
References blender::compositor::area(), BKE_reports_init(), FileLayout::dirty, fileselect_refresh_params(), if(), SpaceFile_Runtime::is_blendfile_readable_reports, SpaceFile::layout, MEM_callocN, NULL, RPT_STORE, and SpaceFile::runtime.
Referenced by ED_spacetype_file().
|
static |
Definition at line 712 of file space_file.c.
References SPACE_FILE, and WM_keymap_ensure().
Referenced by ED_spacetype_file().
|
static |
Definition at line 435 of file space_file.c.
References wmNotifier::action, wmSpaceTypeListenerParams::area, blender::compositor::area(), SpaceFile::browse_mode, wmNotifier::category, wmNotifier::data, ED_area_tag_refresh(), ED_fileselect_active_asset_get(), ED_fileselect_get_active_params(), FILE_BROWSE_MODE_ASSETS, file_on_reload_callback_call(), file_params_invoke_rename_postscroll(), file_reset_filelist_showing_main_data(), filelist_cache_previews_update(), SpaceFile::files, G_MAIN, NA_ACTIVATED, NA_ADDED, NA_EDITED, NA_JOB_FINISHED, NA_REMOVED, NA_RENAME, NA_SELECTED, NC_ASSET, NC_ID, NC_SPACE, ND_SPACE_ASSET_PARAMS, ND_SPACE_CHANGED, ND_SPACE_FILE_LIST, ND_SPACE_FILE_PARAMS, ND_SPACE_FILE_PREVIEW, wmSpaceTypeListenerParams::notifier, params, wmNotifier::reference, and wmSpaceTypeListenerParams::window.
Referenced by ED_spacetype_file().
Definition at line 611 of file space_file.c.
References C, CTX_wm_space_file(), CTX_wm_window(), View2D::cur, ED_fileselect_ensure_active_params(), ED_fileselect_layout_maskrect(), wmWindow::eventstate, file_calc_previews(), file_draw_hint_if_invalid(), file_draw_list(), file_highlight_set(), FILE_IMGDISPLAY, file_main_region_needs_refresh_before_draw(), file_refresh(), FILE_VERTICALDISPLAY, View2D::keepofs, SpaceFile::layout, NULL, params, View2D::scroll, TH_BACK, UI_ThemeClearColor(), UI_view2d_region_reinit(), UI_view2d_scrollers_draw(), UI_view2d_view_ortho(), UI_view2d_view_restore(), ARegion::v2d, V2D_COMMONVIEW_LIST, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_SCROLL_BOTTOM, V2D_SCROLL_RIGHT, ARegion::winx, ARegion::winy, rctf::ymax, and rctf::ymin.
Referenced by ED_spacetype_file().
|
static |
Definition at line 509 of file space_file.c.
References wmWindowManager::defaultconf, ARegion::handlers, SPACE_FILE, UI_view2d_region_reinit(), ARegion::v2d, V2D_COMMONVIEW_LIST, ARegion::winx, ARegion::winy, WM_event_add_keymap_handler_v2d_mask(), and WM_keymap_ensure().
Referenced by ED_spacetype_file().
|
static |
Definition at line 523 of file space_file.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ELEM, NA_ACTIVATED, NA_RENAME, NA_SELECTED, NC_ID, NC_SPACE, ND_SPACE_FILE_LIST, ND_SPACE_FILE_PARAMS, wmRegionListenerParams::notifier, and wmRegionListenerParams::region.
Referenced by ED_spacetype_file().
|
static |
Definition at line 548 of file space_file.c.
References blender::compositor::area(), ED_area_do_msg_notify_tag_refresh(), ED_fileselect_ensure_active_params(), bScreen::id, NULL, wmMsgSubscribeValue::owner, params, ptr, RNA_pointer_create(), RNA_struct_find_property(), and WM_msg_subscribe_rna().
Referenced by ED_spacetype_file().
Definition at line 595 of file space_file.c.
References FILE_TAG_REBUILD_MAIN_FILES, filelist_needs_reading(), filelist_needs_reset_on_main_changes(), SpaceFile::files, and SpaceFile::tags.
Referenced by file_context(), and file_main_region_draw().
Definition at line 415 of file space_file.c.
References NULL, SpaceFile_Runtime::on_reload, SpaceFile_Runtime::on_reload_custom_data, and SpaceFile::runtime.
Referenced by file_listener().
void file_on_reload_callback_register | ( | struct 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 407 of file space_file.c.
References callback, SpaceFile_Runtime::on_reload, SpaceFile_Runtime::on_reload_custom_data, and SpaceFile::runtime.
Referenced by ED_fileselect_activate_by_id(), and ED_fileselect_activate_by_relpath().
Definition at line 678 of file space_file.c.
References 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_filenum(), FILE_OT_filepath_drop(), FILE_OT_hidedot(), FILE_OT_highlight(), FILE_OT_mouse_execute(), 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(), and WM_operatortype_append().
Referenced by ED_spacetype_file().
Definition at line 300 of file space_file.c.
References blender::compositor::area(), FileAssetSelectParams::asset_catalog_visibility, FileAssetSelectParams::asset_library_ref, SpaceFile::bookmarknr, C, FileAssetSelectParams::catalog_id, CTX_wm_manager(), CTX_wm_space_file(), CTX_wm_window(), FileLayout::dirty, ED_area_tag_redraw(), ED_asset_types_supported_as_filter_flags(), ED_fileselect_ensure_active_params(), ED_fileselect_get_asset_params(), ED_fileselect_is_asset_browser(), ED_fsmenu_get(), FILE_ASSETS_ONLY, file_ensure_valid_region_state(), FILE_FILTER, FILE_HIDE_DOT, FILE_IMGDISPLAY, file_indexer_asset, file_indexer_noop, file_params_renamefile_activate(), FILE_SORT_INVERT, FILE_TAG_REBUILD_MAIN_FILES, filelist_cache_previews_set(), filelist_clear_from_reset_tag(), filelist_filter(), filelist_needs_force_reset(), filelist_needs_reading(), filelist_needs_reset_on_main_changes(), filelist_new(), filelist_pending(), filelist_readjob_start(), filelist_readjob_stop(), filelist_set_asset_catalog_filter_options(), filelist_setdir(), filelist_setfilter_options(), filelist_setindexer(), filelist_setlibrary(), filelist_setrecursion(), filelist_setsorting(), filelist_settype(), filelist_sort(), filelist_tag_force_reset_mainfiles(), SpaceFile::files, fileselect_refresh_params(), folder_history_list_ensure_for_active_browse_mode(), FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, fsmenu_get_active_indices(), SpaceFile_Runtime::is_blendfile_status_set, SpaceFile::layout, NC_SPACE, ND_SPACE_FILE_LIST, NULL, params, SpaceFile::previews_timer, SpaceFile::recentnr, SpaceFile::runtime, SpaceFile::system_bookmarknr, SpaceFile::systemnr, SpaceFile::tags, USER_EXPERIMENTAL_TEST, and WM_event_remove_timer_notifier().
Referenced by ED_spacetype_file(), and file_main_region_draw().
Definition at line 427 of file space_file.c.
References blender::compositor::area(), ED_area_tag_refresh(), filelist_needs_reset_on_main_changes(), filelist_tag_force_reset_mainfiles(), and SpaceFile::files.
Referenced by file_id_remap(), and file_listener().
|
static |
Definition at line 870 of file space_file.c.
References blender::compositor::area(), and SpaceFile::browse_mode.
Referenced by ED_spacetype_file().
|
static |
Definition at line 882 of file space_file.c.
References RNA_enum_items_add(), and rna_enum_space_file_browse_mode_items.
Referenced by ED_spacetype_file().
Definition at line 876 of file space_file.c.
References blender::compositor::area(), and SpaceFile::browse_mode.
Referenced by ED_spacetype_file().
Definition at line 85 of file space_file.c.
References ARegion::alignment, blender::compositor::area(), BKE_area_find_region_type(), BLI_insertlinkafter(), ARegion::flag, MEM_callocN, NULL, ARegion::regiontype, RGN_ALIGN_RIGHT, RGN_FLAG_HIDDEN, and RGN_TYPE_TOOL_PROPS.
Referenced by file_ensure_valid_region_state().
|
static |
Definition at line 755 of file space_file.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ELEM, NA_RENAME, NC_ID, NC_SCENE, ND_MODE, wmRegionListenerParams::notifier, and wmRegionListenerParams::region.
Referenced by ED_spacetype_file().
Definition at line 736 of file space_file.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_file().
|
static |
Definition at line 724 of file space_file.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, View2D::scroll, SPACE_FILE, ARegion::v2d, V2D_SCROLL_RIGHT, V2D_SCROLL_VERTICAL_HIDE, WM_event_add_keymap_handler_v2d_mask(), and WM_keymap_ensure().
Referenced by ED_spacetype_file().
|
static |
Definition at line 741 of file space_file.c.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ELEM, NC_SCENE, ND_MODE, wmRegionListenerParams::notifier, and wmRegionListenerParams::region.
Referenced by ED_spacetype_file().
Definition at line 807 of file space_file.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_file().
Definition at line 51 of file space_file.c.
References ARegion::alignment, blender::compositor::area(), BKE_area_find_region_type(), BLI_insertlinkafter(), ARegion::flag, MEM_callocN, NULL, ARegion::regiontype, RGN_ALIGN_TOP, RGN_FLAG_DYNAMIC_SIZE, and RGN_TYPE_UI.
Referenced by file_ensure_valid_region_state().
|
static |
Definition at line 792 of file space_file.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, View2D::keepzoom, SPACE_FILE, ARegion::v2d, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, WM_event_add_keymap_handler_v2d_mask(), and WM_keymap_ensure().
Referenced by ED_spacetype_file().
|
static |
Definition at line 829 of file space_file.c.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NC_SPACE, ND_SPACE_FILE_LIST, wmRegionListenerParams::notifier, and wmRegionListenerParams::region.
Referenced by ED_spacetype_file().
Definition at line 857 of file space_file.c.
References wmDrag::path, wmDropBox::ptr, and RNA_string_set().
Referenced by file_dropboxes().
Definition at line 846 of file space_file.c.
References C, CTX_wm_space_file(), wmDrag::type, and WM_DRAG_PATH.
Referenced by file_dropboxes().
const char* file_context_dir[] |
Definition at line 889 of file space_file.c.
Referenced by bpy_context_members(), and file_context().