|
Blender
V2.93
|
#include <stdio.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_utildefines.h"#include "BKE_appdir.h"#include "BKE_context.h"#include "BKE_global.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_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_intern.h"#include "filelist.h"#include "fsmenu.h"Go to the source code of this file.
Variables | |
| static const char * | file_context_dir [] = {"active_file", "id", NULL} |
| void ED_file_exit | ( | void | ) |
Definition at line 1011 of file space_file.c.
References filelist_free_icons(), fsmenu_free(), and G.
Referenced by WM_exit_ex().
| void ED_file_init | ( | void | ) |
Definition at line 1000 of file space_file.c.
References ED_file_read_bookmarks(), filelist_init_icons(), G, and IMB_thumb_makedirs().
Referenced by WM_init().
| void ED_file_read_bookmarks | ( | void | ) |
Definition at line 1020 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().
| void ED_spacetype_file | ( | void | ) |
Definition at line 911 of file space_file.c.
References BKE_spacetype_register(), BKE_ST_MAXNAME, BLI_addhead(), SpaceType::context, SpaceType::create, ARegionType::draw, SpaceType::dropboxes, SpaceType::duplicate, ED_KEYMAP_HEADER, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, SpaceType::exit, 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_ui_region_draw(), file_ui_region_init(), file_ui_region_listener(), SpaceType::free, HEADERY, SpaceType::id_remap, ARegionType::init, SpaceType::init, SpaceType::keymap, ARegionType::keymapflag, ARegionType::listener, SpaceType::listener, MEM_callocN, ARegionType::message_subscribe, SpaceType::name, SpaceType::operatortypes, ARegionType::prefsizex, ARegionType::prefsizey, SpaceType::refresh, ARegionType::regionid, SpaceType::regiontypes, RGN_TYPE_EXECUTE, RGN_TYPE_HEADER, RGN_TYPE_TOOL_PROPS, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, SPACE_FILE, SpaceType::space_subtype_get, SpaceType::space_subtype_item_extend, SpaceType::space_subtype_set, and SpaceType::spaceid.
Referenced by ED_spacetypes_init().
|
static |
Definition at line 852 of file space_file.c.
References BLI_assert, C, CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_id_pointer_set(), CTX_data_pointer_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(), file, file_context_dir, file_main_region_needs_refresh_before_draw(), filelist_file(), filelist_file_get_id(), SpaceFile::files, bScreen::id, NULL, params, result, and RNA_FileSelectEntry.
Referenced by ED_spacetype_file().
Definition at line 114 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().
|
static |
Definition at line 818 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 212 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 245 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 77 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 776 of file space_file.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_file().
|
static |
Definition at line 764 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 200 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().
|
static |
Definition at line 158 of file space_file.c.
References SpaceFile::asset_params, BLI_assert, filelist_free(), filelist_freelib(), SpaceFile::files, folder_history_list_free(), SpaceFile::layout, MEM_freeN, MEM_SAFE_FREE, NULL, SpaceFile::params, SpaceFile::previews_timer, and SpaceFile::runtime.
Referenced by ED_spacetype_file().
Definition at line 738 of file space_file.c.
References C, and ED_region_header().
Referenced by ED_spacetype_file().
|
static |
Definition at line 728 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 899 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 185 of file space_file.c.
References blender::compositor::area(), FileLayout::dirty, fileselect_refresh_params(), if(), SpaceFile::layout, MEM_callocN, NULL, and SpaceFile::runtime.
Referenced by ED_spacetype_file().
|
static |
Definition at line 679 of file space_file.c.
References SPACE_FILE, and WM_keymap_ensure().
Referenced by ED_spacetype_file().
|
static |
Definition at line 432 of file space_file.c.
References wmNotifier::action, blender::compositor::area(), SpaceFile::browse_mode, wmNotifier::category, wmNotifier::data, ED_area_tag_refresh(), FILE_BROWSE_MODE_ASSETS, file_on_reload_callback_call(), file_reset_filelist_showing_main_data(), filelist_cache_previews_update(), SpaceFile::files, NA_ACTIVATED, NA_ADDED, NA_EDITED, NA_JOB_FINISHED, NA_REMOVED, NA_SELECTED, NC_ASSET, NC_SPACE, ND_SPACE_ASSET_PARAMS, ND_SPACE_CHANGED, ND_SPACE_FILE_LIST, ND_SPACE_FILE_PARAMS, ND_SPACE_FILE_PREVIEW, and params.
Referenced by ED_spacetype_file().
Definition at line 580 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 488 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 502 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, and params.
Referenced by ED_spacetype_file().
|
static |
Definition at line 527 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_FileSelectParams, RNA_pointer_create(), RNA_SpaceFileBrowser, and WM_msg_subscribe_rna().
Referenced by ED_spacetype_file().
|
static |
Definition at line 564 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().
|
static |
Definition at line 411 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 | ( | SpaceFile * | sfile, |
| onReloadFn | callback, | ||
| onReloadFnData | custom_data | ||
| ) |
Definition at line 403 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().
|
static |
Definition at line 647 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_execute(), FILE_OT_filenum(), FILE_OT_filepath_drop(), FILE_OT_hidedot(), FILE_OT_highlight(), 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 317 of file space_file.c.
References blender::compositor::area(), FileAssetSelectParams::asset_library, SpaceFile::bookmarknr, C, CTX_data_scene(), CTX_wm_manager(), CTX_wm_space_file(), CTX_wm_window(), FileLayout::dirty, ED_area_tag_redraw(), ED_fileselect_ensure_active_params(), ED_fileselect_get_asset_params(), ED_fsmenu_get(), FILE_ASSETS_ONLY, file_ensure_valid_region_state(), FILE_FILTER, FILE_HIDE_DOT, FILE_IMGDISPLAY, file_params_renamefile_activate(), FILE_SORT_INVERT, FILE_TAG_REBUILD_MAIN_FILES, filelist_cache_previews_set(), filelist_clear(), 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_setdir(), filelist_setfilter_options(), filelist_setlibrary(), filelist_setrecursion(), filelist_setsorting(), filelist_settype(), filelist_sort(), filelist_tag_force_reset(), 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::layout, NULL, params, SpaceFile::previews_timer, SpaceFile::recentnr, SpaceFile::system_bookmarknr, SpaceFile::systemnr, SpaceFile::tags, and WM_event_remove_timer_notifier().
Referenced by ED_spacetype_file(), and file_main_region_draw().
Definition at line 423 of file space_file.c.
References blender::compositor::area(), file_tag_reset_list(), filelist_needs_reset_on_main_changes(), and SpaceFile::files.
Referenced by file_id_remap(), and file_listener().
|
static |
Definition at line 825 of file space_file.c.
References blender::compositor::area(), and SpaceFile::browse_mode.
Referenced by ED_spacetype_file().
|
static |
Definition at line 837 of file space_file.c.
References FILE_BROWSE_MODE_FILES, RNA_enum_items_add(), RNA_enum_items_add_value(), and rna_enum_space_file_browse_mode_items.
Referenced by ED_spacetype_file().
|
static |
Definition at line 831 of file space_file.c.
References blender::compositor::area(), and SpaceFile::browse_mode.
Referenced by ED_spacetype_file().
Tag the space to recreate the file-list.
Definition at line 311 of file space_file.c.
References blender::compositor::area(), ED_area_tag_refresh(), filelist_tag_force_reset(), and SpaceFile::files.
Referenced by file_reset_filelist_showing_main_data().
Definition at line 94 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 712 of file space_file.c.
References wmNotifier::action, wmNotifier::category, ED_region_tag_redraw(), ELEM, NA_RENAME, NC_ID, and params.
Referenced by ED_spacetype_file().
Definition at line 703 of file space_file.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_file().
|
static |
Definition at line 691 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 708 of file space_file.c.
Referenced by ED_spacetype_file().
Definition at line 759 of file space_file.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_file().
Definition at line 60 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 744 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 781 of file space_file.c.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NC_SPACE, ND_SPACE_FILE_LIST, and params.
Referenced by ED_spacetype_file().
Definition at line 812 of file space_file.c.
References wmDrag::path, wmDropBox::ptr, and RNA_string_set().
Referenced by file_dropboxes().
|
static |
Definition at line 798 of file space_file.c.
References C, CTX_wm_space_file(), wmDrag::type, and WM_DRAG_PATH.
Referenced by file_dropboxes().
|
static |
Definition at line 850 of file space_file.c.
Referenced by file_context().