|
Blender V5.0
|
#include <fmt/format.h>#include <cmath>#include <cstdio>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_defaults.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_userdef_types.h"#include "DNA_view3d_types.h"#include "BLI_listbase.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_rect.h"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_idprop.hh"#include "BKE_idtype.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_preview_image.hh"#include "BKE_screen.hh"#include "BLO_read_write.hh"#include "../editors/asset/ED_asset_shelf.hh"#include "WM_types.hh"#include "CLG_log.h"Go to the source code of this file.
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
Variables | |
| static CLG_LogRef | LOG_BLEND_DOVERSION = {"blend.doversion"} |
ID Type Implementation | |
| IDTypeInfo | IDType_ID_SCR |
| static void | screen_free_data (ID *id) |
| void | BKE_screen_foreach_id_screen_area (LibraryForeachIDData *data, ScrArea *area) |
| static void | screen_foreach_id (ID *id, LibraryForeachIDData *data) |
| static void | screen_blend_write (BlendWriter *writer, ID *id, const void *id_address) |
| bool | BKE_screen_blend_read_data (BlendDataReader *reader, bScreen *screen) |
| static void | screen_blend_read_after_liblink (BlendLibReader *reader, ID *id) |
|
static |
Definition at line 577 of file screen.cc.
References area_region_panels_free_recursive(), BKE_panel_free(), Panel::children, and LISTBASE_FOREACH_MUTABLE.
Referenced by area_region_panels_free_recursive(), and BKE_area_region_panels_free().
Definition at line 859 of file screen.cc.
References BKE_area_find_region_type(), BLI_findlink(), ScrArea::region_active_win, ScrArea::regionbase, ARegion::regiontype, and RGN_TYPE_WINDOW.
Referenced by ED_undo_operator_repeat(), ED_view3d_context_activate(), ED_view3d_context_rv3d(), texture_paint_image_from_view_exec(), and wm_operator_call_internal().
Find a region of type region_type in the currently active space of area.
Definition at line 846 of file screen.cc.
References LISTBASE_FOREACH, and ScrArea::regionbase.
Referenced by blender::ed::asset::shelf::active_shelf_from_area(), ANIM_deselect_keys_in_animation_editors(), ANIM_frame_channel_y_extents(), animchannels_select_filter_invoke(), BKE_area_find_region_active_win(), BKE_spacedata_find_region_type(), blend_file_thumb_from_camera(), blo_do_versions_260(), blo_do_versions_430(), blender::ui::bonedropper_set_draw_callback_region(), buttons_start_filter_exec(), blender::ed::vse::channel_draw_context_init(), clip_refresh(), console_clear_exec(), console_clear_line_exec(), console_delete_exec(), console_history_append_exec(), console_history_cycle_exec(), console_indent_exec(), console_insert_exec(), console_modal_select_apply(), console_move_exec(), console_paste_exec(), console_scrollback_append_exec(), console_select_set_invoke(), console_selectword_invoke(), console_unindent_exec(), context_find_graph_editor(), datadropper_set_draw_callback_region(), do_version_area_change_space_to_space_action(), do_versions_area_ensure_tool_region(), ED_area_type_hud_ensure(), ED_drivers_editor_init(), ed_markers_poll_markers_exist_visible(), ED_screens_header_tools_menu_create(), ED_text_activate_in_screen(), ED_view3d_gizmo_ruler_remove_by_gpencil_layer(), blender::ed::animrig::ensure_asset_ui_visible(), file_refresh(), file_smoothscroll_invoke(), graphkeys_channel_view_pick_invoke(), graphkeys_view_selected_channels_exec(), hud_panel_operator_redo_poll(), hud_region_add(), is_header_azone_location(), menu_items_from_ui_create(), blender::ed::space_node::node_area_listener(), blender::ed::outliner::outliner_deactivate(), blender::ed::outliner::outliner_start_filter_exec(), blender::ed::space_node::viewer_linking::position_viewer_node(), region_scale_toggle_hidden(), region_toggle_exec(), blender::ed::asset::screenshot_preview_exec(), blender::ed::vse::sequencer_refresh(), blender::ed::space_node::snode_set_context(), space_text_scroll_to_cursor_with_area(), blender::ed::spreadsheet::spreadsheet_main_region_draw(), text_autocomplete_modal(), text_has_properties_region(), UI_view2d_fromcontext_rwin(), userpref_execute_region_poll(), userpref_show_exec(), v3d_cursor_snap_draw_fn(), v3d_cursor_snap_poll_fn(), wm_handler_fileselect_do(), wm_keymap_item_find_props(), wm_operator_call_internal(), and WM_window_cursor_keymap_status_refresh().
Definition at line 875 of file screen.cc.
References BLI_rcti_isect_pt_v(), ELEM, LISTBASE_FOREACH, ScrArea::regionbase, RGN_TYPE_ANY, and xy.
Referenced by annotation_draw_modal(), BKE_screen_find_main_region_at_xy(), blender::ui::bonedropper_sample_pt(), datadropper_id_sample_pt(), depthdropper_depth_sample_pt(), eyedropper_color_sample_fl(), eyedropper_cryptomatte_sample_fl(), eyedropper_get_property_button_under_mouse(), blender::ed::sculpt_paint::dyntopo::sample_detail(), v3d_cursor_snap_draw_fn(), wm_dropbox_active(), and wm_handler_op_context_get_if_valid().
Definition at line 350 of file screen.cc.
References BKE_regiontype_from_id(), BLI_duplicatelist(), BLI_listbase_clear(), ARegionType::duplicate, ARegion::flag, MEM_dupallocN(), ARegion::next, panel_list_copy(), ARegion::panels, ARegion::panels_category_active, ARegion::prev, ARegion::regiondata, ARegion::regiontype, RGN_FLAG_TEMP_REGIONDATA, ARegion::runtime, ARegion::ui_lists, ARegion::ui_previews, and ARegion::view_states.
Referenced by ED_area_data_copy(), property_search_all_tabs(), region_copylist(), and region_quadview_exec().
Doesn't free the region itself.
Definition at line 597 of file screen.cc.
References BKE_area_region_panels_free(), BKE_regiontype_from_id(), BLI_freelistN(), ARegion::flag, ARegionType::free, IDP_FreeProperty(), LISTBASE_FOREACH, MEM_SAFE_FREE, ARegion::panels, ARegion::panels_category_active, printf, region_free_gizmomap_callback, ARegion::regiondata, ARegion::regiontype, RGN_FLAG_TEMP_REGIONDATA, ARegion::runtime, ARegion::ui_lists, ARegion::ui_previews, and ARegion::view_states.
Referenced by BKE_screen_area_blend_read_after_liblink(), BKE_screen_area_free(), BKE_spacedata_freelist(), blo_do_versions_250(), blo_do_versions_270(), blo_do_versions_280(), do_version_area_change_space_to_space_action(), ED_area_data_copy(), ED_region_remove(), property_search_all_tabs(), regions_remove_invalid(), screen_free_data(), and ui_region_temp_remove().
| ARegion * BKE_area_region_new | ( | ) |
Definition at line 387 of file screen.cc.
References MEM_callocN(), and ARegion::runtime.
Referenced by action_create(), area_add_header_region(), area_add_window_regions(), blo_do_versions_250(), blo_do_versions_260(), blo_do_versions_280(), buttons_create(), clip_create(), console_create(), do_version_action_editor_properties_region(), do_versions_add_region(), do_versions_add_region_if_not_found(), do_versions_ensure_region(), file_create(), graph_create(), hud_region_add(), image_create(), info_create(), nla_create(), blender::ed::space_node::node_create(), blender::ed::outliner::outliner_create(), script_create(), blender::ed::vse::sequencer_create(), blender::ed::spreadsheet::spreadsheet_create(), statusbar_create(), text_create(), text_has_properties_region(), topbar_create(), ui_region_temp_add(), userpref_create(), and view3d_create().
| void BKE_area_region_panels_free | ( | ListBase * | panels | ) |
Definition at line 585 of file screen.cc.
References area_region_panels_free_recursive(), BLI_listbase_clear(), and LISTBASE_FOREACH_MUTABLE.
Referenced by BKE_area_region_free(), blo_update_defaults_screen(), and ED_region_property_search().
| void BKE_panel_free | ( | Panel * | panel | ) |
Definition at line 563 of file screen.cc.
References Panel::activedata, BLI_remlink(), Panel::drawname, layout_panel_state_delete(), Panel::layout_panel_states, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), MEM_SAFE_FREE, Panel::runtime, and state.
Referenced by area_region_panels_free_recursive(), panel_delete(), ui_paneltype_draw_impl(), and ui_popup_block_free().
| LayoutPanelState * BKE_panel_layout_panel_state_ensure | ( | Panel * | panel, |
| blender::StringRef | idname, | ||
| bool | default_closed ) |
Get the layout panel state for the given idname. If it does not exist yet, initialize a new panel state with the given default value.
Definition at line 520 of file screen.cc.
References BLI_addtail(), BLI_strdupn(), blender::StringRefBase::data(), LAYOUT_PANEL_STATE_FLAG_OPEN, Panel::layout_panel_states, Panel::layout_panel_states_clock, LISTBASE_FOREACH, MEM_callocN(), SET_FLAG_FROM_TEST, blender::StringRefBase::size(), and state.
Referenced by blender::nodes::draw_geometry_nodes_operator_redo_ui(), uiLayout::panel(), and blender::panel_draw().
Create and free panels.
Definition at line 546 of file screen.cc.
References PanelType::idname, MEM_callocN(), Panel::panelname, Panel::runtime, STRNCPY_UTF8, and Panel::type.
Referenced by panel_add_instanced(), panel_list_copy(), UI_panel_begin(), ui_paneltype_draw_impl(), and UI_popup_dummy_panel_set().
| void BKE_region_callback_free_gizmomap_set | ( | void(* | callback )(wmGizmoMap *) | ) |
Gizmo-maps of a region need to be freed with the region. Uses callback to avoid low-level call.
Definition at line 515 of file screen.cc.
References region_free_gizmomap_callback.
Referenced by WM_init().
| void BKE_region_callback_refresh_tag_gizmomap_set | ( | void(* | callback )(wmGizmoMap *) | ) |
Definition at line 482 of file screen.cc.
References region_refresh_tag_gizmomap_callback.
Referenced by WM_init().
| ARegion * BKE_region_find_in_listbase_by_type | ( | const ListBase * | regionbase, |
| const int | region_type ) |
Find a region of type region_type in provided regionbase.
Definition at line 835 of file screen.cc.
References LISTBASE_FOREACH.
Referenced by blo_do_versions_300(), BLO_update_defaults_workspace(), and do_versions_after_linking_300().
| ARegionType * BKE_regiontype_from_id | ( | const SpaceType * | st, |
| int | regionid ) |
Definition at line 267 of file screen.cc.
References LISTBASE_FOREACH, and SpaceType::regiontypes.
Referenced by area_offscreen_init(), BKE_area_region_copy(), BKE_area_region_free(), blender::ui::bonedropper_init(), blender::ui::bonedropper_set_draw_callback_region(), datadropper_init(), datadropper_set_draw_callback_region(), depthdropper_init(), drw_callbacks_post_scene(), ED_area_and_region_types_init(), ED_area_type_hud_ensure(), ED_view3d_buttons_region_layout_ex(), uiLayout::popover_group(), pyrna_callback_classmethod_add(), pyrna_callback_classmethod_remove(), regions_remove_invalid(), wm_xr_raycast_init(), and wm_xr_raycast_uninit().
| void BKE_screen_area_blend_read_after_liblink | ( | BlendLibReader * | reader, |
| ID * | parent_id, | ||
| ScrArea * | area ) |
Called after lib linking process is done, to perform some validation on the read data, or some complex specific reading process that requires the data to be fully read and ID pointers to be valid.
Definition at line 1470 of file screen.cc.
References BKE_area_region_free(), BKE_spacetype_from_id(), SpaceType::blend_read_after_liblink, BLI_freelinkN(), ListBase::first, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, ScrArea::regionbase, regions_remove_invalid(), and ScrArea::spacedata.
Referenced by screen_blend_read_after_liblink(), and window_manager_blend_read_after_liblink().
| void BKE_screen_area_free | ( | ScrArea * | area | ) |
Doesn't free the area itself.
Definition at line 638 of file screen.cc.
References ScrArea::actionzones, BKE_area_region_free(), BKE_spacedata_freelist(), BKE_spacetype_from_id(), BLI_freelistN(), ScrArea::global, LISTBASE_FOREACH, MEM_SAFE_FREE, ScrArea::regionbase, ScrArea::spacedata, and ScrArea::spacetype.
Referenced by BKE_screen_area_map_free(), blo_do_versions_280(), ED_area_offscreen_free(), ED_area_swapspace(), and screen_delarea().
| bool BKE_screen_area_map_blend_read_data | ( | BlendDataReader * | reader, |
| ScrAreaMap * | area_map ) |
Definition at line 1423 of file screen.cc.
References ScrAreaMap::areabase, BKE_screen_sort_scrvert(), BLI_remlink(), BLO_read_struct, BLO_read_struct_list, direct_link_area(), ScrAreaMap::edgebase, LISTBASE_FOREACH, and ScrAreaMap::vertbase.
Referenced by BKE_screen_blend_read_data(), and window_manager_blend_read_data().
| void BKE_screen_area_map_blend_write | ( | BlendWriter * | writer, |
| ScrAreaMap * | area_map ) |
Definition at line 1202 of file screen.cc.
References ScrAreaMap::areabase, BLO_write_struct, BLO_write_struct_list, ScrArea::butspacetype, ScrAreaMap::edgebase, ScrArea::global, LISTBASE_FOREACH, SPACE_EMPTY, ScrArea::spacetype, ScrAreaMap::vertbase, and write_area().
Referenced by screen_blend_write(), and window_manager_blend_write().
| ScrArea * BKE_screen_area_map_find_area_xy | ( | const ScrAreaMap * | areamap, |
| const int | spacetype, | ||
| const int | xy[2] ) |
Definition at line 964 of file screen.cc.
References ScrAreaMap::areabase, ELEM, LISTBASE_FOREACH, SPACE_TYPE_ANY, ScrArea::spacetype, ScrArea::v1, ScrArea::v2, ScrArea::v4, ScrVert::vec, vec2s::x, xy, and vec2s::y.
Referenced by BKE_screen_find_area_xy().
| void BKE_screen_area_map_free | ( | ScrAreaMap * | area_map | ) |
Definition at line 654 of file screen.cc.
References ScrAreaMap::areabase, BKE_screen_area_free(), BLI_freelistN(), ScrAreaMap::edgebase, LISTBASE_FOREACH_MUTABLE, and ScrAreaMap::vertbase.
Referenced by ED_screen_global_areas_refresh(), screen_free_data(), and wm_window_free().
| bool BKE_screen_blend_read_data | ( | BlendDataReader * | reader, |
| bScreen * | screen ) |
Cannot use IDTypeInfo callback yet, because of the return value.
Definition at line 141 of file screen.cc.
References bScreen::active_region, bScreen::animtimer, AREAMAP_FROM_SCREEN, BKE_previewimg_blend_read(), BKE_screen_area_map_blend_read_data(), BLO_read_struct, bScreen::context, ListBase::first, bScreen::id, ListBase::last, ID::name, bScreen::preview, printf, bScreen::regionbase, bScreen::scrubbing, and bScreen::tool_tip.
Referenced by direct_link_id().
Definition at line 913 of file screen.cc.
References bScreen::areabase, BLI_findindex(), LISTBASE_FOREACH, and ScrArea::spacedata.
Definition at line 981 of file screen.cc.
References AREAMAP_FROM_SCREEN, BKE_screen_area_map_find_area_xy(), and xy.
Referenced by BKE_screen_find_main_region_at_xy().
Definition at line 944 of file screen.cc.
References bScreen::areabase, ELEM, LISTBASE_FOREACH, min, size(), SPACE_TYPE_ANY, ScrArea::spacetype, ScrArea::winx, and ScrArea::winy.
Referenced by blender::ed::object::bake_init_api_data(), blend_file_thumb_from_camera(), ED_text_activate_in_screen(), ED_view3d_context_activate(), render_view_open(), texture_paint_image_from_view_exec(), texture_paint_image_from_view_poll(), wm_file_write(), and wm_window_new_exec().
Definition at line 676 of file screen.cc.
References BKE_screen_sort_scrvert(), bScreen::edgebase, LISTBASE_FOREACH, and v2.
Referenced by area_findsharededge(), BKE_screen_remove_unused_scredges(), and screen_geom_vertices_scale_pass().
| ARegion * BKE_screen_find_main_region_at_xy | ( | const bScreen * | screen, |
| const int | space_type, | ||
| const int | xy[2] ) |
Definition at line 1023 of file screen.cc.
References BKE_area_find_region_xy(), BKE_screen_find_area_xy(), RGN_TYPE_WINDOW, and xy.
Definition at line 891 of file screen.cc.
References LISTBASE_FOREACH, and bScreen::regionbase.
Referenced by blender::ed::sculpt_paint::paint_update_mouse_cursor().
| ARegion * BKE_screen_find_region_xy | ( | const bScreen * | screen, |
| const int | regiontype, | ||
| const int | xy[2] ) |
Definition at line 901 of file screen.cc.
References BLI_rcti_isect_pt_v(), ELEM, LISTBASE_FOREACH, bScreen::regionbase, RGN_TYPE_ANY, and xy.
| void BKE_screen_foreach_id_screen_area | ( | LibraryForeachIDData * | data, |
| ScrArea * | area ) |
Callback used by lib_query to walk over all ID usages (mimics foreach_id callback of IDTypeInfo structure).
Definition at line 97 of file screen.cc.
References BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_spacetype_from_id(), data, SpaceType::foreach_id, ScrArea::full, IDWALK_CB_NOP, LISTBASE_FOREACH, and ScrArea::spacedata.
Referenced by screen_foreach_id(), and window_manager_foreach_id().
| void BKE_screen_free_data | ( | bScreen * | screen | ) |
Free (or release) any data used by this screen (does not free the screen itself).
Definition at line 665 of file screen.cc.
References bScreen::id, and screen_free_data().
Referenced by screen_data_copy().
| void BKE_screen_gizmo_tag_refresh | ( | bScreen * | screen | ) |
Definition at line 487 of file screen.cc.
References bScreen::areabase, LISTBASE_FOREACH, region_refresh_tag_gizmomap_callback, and ScrArea::regionbase.
Referenced by setup_app_data().
| void BKE_screen_header_alignment_reset | ( | bScreen * | screen | ) |
Definition at line 1059 of file screen.cc.
References bScreen::areabase, bScreen::do_refresh, ELEM, LISTBASE_FOREACH, ScrArea::regionbase, RGN_ALIGN_BOTTOM, RGN_ALIGN_TOP, RGN_TYPE_FOOTER, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER, SPACE_FILE, SPACE_OUTLINER, SPACE_PROPERTIES, SPACE_USERPREF, ScrArea::spacetype, U, and USER_HEADER_BOTTOM.
Referenced by ED_screens_init().
| bool BKE_screen_is_fullscreen_area | ( | const bScreen * | screen | ) |
Definition at line 1049 of file screen.cc.
References ELEM, SCREENFULL, SCREENMAXIMIZED, and bScreen::state.
Referenced by ED_workspace_layout_delete(), ED_workspace_layout_duplicate(), wm_check_screen_switch_supported(), and workspace_layout_set_poll().
| bool BKE_screen_is_used | ( | const bScreen * | screen | ) |
Definition at line 1054 of file screen.cc.
References bScreen::winid.
Referenced by screen_is_used_by_other_window(), and workspace_layout_set_poll().
| std::optional< std::string > BKE_screen_path_from_screen_to_space | ( | const PointerRNA * | ptr | ) |
Definition at line 924 of file screen.cc.
References bScreen::areabase, BLI_assert_unreachable, BLI_findindex(), GS, ID_SCR, LISTBASE_FOREACH_INDEX, ptr, and ScrArea::spacedata.
| void BKE_screen_remove_double_scredges | ( | bScreen * | screen | ) |
Definition at line 749 of file screen.cc.
References BLI_remlink(), bScreen::edgebase, LISTBASE_FOREACH, MEM_freeN(), ScrEdge::next, ScrEdge::v1, and ScrEdge::v2.
Referenced by area_join_exit(), area_move_exit(), area_split(), area_split_exit(), and blo_do_versions_280().
| void BKE_screen_remove_double_scrverts | ( | bScreen * | screen | ) |
Definition at line 697 of file screen.cc.
References bScreen::areabase, BKE_screen_sort_scrvert(), BLI_remlink(), bScreen::edgebase, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), ScrVert::newv, ScrVert::next, ScrArea::v1, ScrArea::v2, ScrArea::v3, ScrArea::v4, ScrVert::vec, bScreen::vertbase, vec2s::x, and vec2s::y.
Referenced by area_move_exit(), area_split(), area_split_exit(), and screen_area_join_aligned().
| void BKE_screen_remove_unused_scredges | ( | bScreen * | screen | ) |
Definition at line 765 of file screen.cc.
References bScreen::areabase, BKE_screen_find_edge(), BLI_remlink(), bScreen::edgebase, ScrEdge::flag, LISTBASE_FOREACH_INDEX, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), printf, ScrArea::v1, ScrArea::v2, ScrArea::v3, and ScrArea::v4.
Referenced by area_join_exit(), area_split(), and blo_do_versions_280().
| void BKE_screen_remove_unused_scrverts | ( | bScreen * | screen | ) |
Definition at line 810 of file screen.cc.
References BLI_remlink(), bScreen::edgebase, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), and bScreen::vertbase.
Referenced by area_join_exit(), and blo_do_versions_280().
| void BKE_screen_runtime_refresh_for_blendfile | ( | bScreen * | screen | ) |
Refresh any screen data that should be set on file-load with "Load UI" disabled.
Definition at line 502 of file screen.cc.
References bScreen::areabase, ScrArea_Runtime::is_tool_set, LISTBASE_FOREACH, ScrArea::runtime, and ScrArea_Runtime::tool.
Referenced by setup_app_data().
Definition at line 688 of file screen.cc.
References v2.
Referenced by BKE_screen_area_map_blend_read_data(), BKE_screen_find_edge(), BKE_screen_remove_double_scrverts(), screen_data_copy(), and screen_geom_edge_add_ex().
And as patch for 2.48 and older. For the saved 2.50 files without regiondata.
Definition at line 1329 of file screen.cc.
References copy_qt_qt(), copy_v3_v3(), RegionView3D::dist, View3D::gridsubdiv, LISTBASE_FOREACH, MEM_callocN(), RegionView3D::ofs, RegionView3D::persp, RGN_TYPE_WINDOW, RegionView3D::view, and RegionView3D::viewquat.
Referenced by area_add_window_regions(), direct_link_area(), and view3d_space_blend_read_data().
Definition at line 1004 of file screen.cc.
References bScreen::areabase, BKE_screen_view3d_sync(), LISTBASE_FOREACH, SPACE_VIEW3D, and ScrArea::spacedata.
Referenced by ed_marker_camera_bind_exec(), ed_marker_move_apply(), ED_update_for_newframe(), ED_workspace_scene_data_sync(), screen_change_update(), and setup_app_data().
| void BKE_screen_view3d_shading_blend_read_data | ( | BlendDataReader * | reader, |
| View3DShading * | shading ) |
Definition at line 1096 of file screen.cc.
References BLO_read_struct, IDP_BlendDataRead, and View3DShading::prop.
Referenced by direct_link_wm_xr_data(), scene_blend_read_data(), and view3d_space_blend_read_data().
| void BKE_screen_view3d_shading_blend_write | ( | BlendWriter * | writer, |
| View3DShading * | shading ) |
Definition at line 1089 of file screen.cc.
References IDP_BlendWrite(), and View3DShading::prop.
Referenced by scene_blend_write(), view3d_space_blend_write(), and write_wm_xr_data().
| void BKE_screen_view3d_shading_init | ( | View3DShading * | shading | ) |
Definition at line 1017 of file screen.cc.
References DNA_struct_default_get.
Referenced by blo_do_versions_280(), and object_preview_render().
Definition at line 986 of file screen.cc.
References Scene::camera, View3D::camera, LISTBASE_FOREACH, View3D::localvd, RegionView3D::persp, View3D::regionbase, RGN_TYPE_WINDOW, RV3D_CAMOB, RV3D_PERSP, and View3D::scenelock.
Referenced by BKE_screen_view3d_scene_sync(), screen_set_3dview_camera(), and view3d_main_region_listener().
Definition at line 1044 of file screen.cc.
References M_SQRT2, and sqrtf.
Referenced by ED_view3d_camera_view_zoom_scale(), view3d_center_camera_exec(), view3d_set_1_to_1_viewborder(), and view_zoom_to_window_xy_camera().
Definition at line 1039 of file screen.cc.
Referenced by BKE_camera_params_from_view3d(), ED_view3d_camera_view_pan(), ED_view3d_camera_view_zoom_scale(), ED_view3d_win_to_3d(), ED_view3d_win_to_3d_with_shift(), view_zoom_to_window_xy_camera(), and viewzoom_apply_camera().
Definition at line 465 of file screen.cc.
References spacedata_id_remap_cb.
Referenced by WM_init().
| lb_dst | should be empty (will be cleared). |
Definition at line 406 of file screen.cc.
References BKE_spacetype_from_id(), BLI_addtail(), BLI_listbase_clear(), SpaceType::duplicate, LISTBASE_FOREACH, region_copylist(), and SpaceLink::regionbase.
Referenced by ED_area_data_copy().
| void BKE_spacedata_draw_locks | ( | ARegionDrawLockFlags | lock_flags | ) |
Facility to set locks for drawing to survive (render) threads accessing drawing data.
Definition at line 423 of file screen.cc.
References get_space_types(), and LISTBASE_FOREACH.
Referenced by dpaint_bake_startjob(), fluid_bake_startjob(), fluid_free_startjob(), lineart_bake_startjob(), render_drawlock(), and WM_locked_interface_set_with_flags().
| ARegion * BKE_spacedata_find_region_type | ( | const SpaceLink * | slink, |
| const ScrArea * | area, | ||
| int | region_type ) |
Version of BKE_area_find_region_type that also works if slink is not the active space of area.
Definition at line 437 of file screen.cc.
References BKE_area_find_region_type(), BLI_assert, BLI_findindex(), ListBase::first, LISTBASE_FOREACH, ScrArea::regionbase, SpaceLink::regionbase, and ScrArea::spacedata.
Referenced by blo_do_versions_280().
| void BKE_spacedata_freelist | ( | ListBase * | lb | ) |
Definition at line 305 of file screen.cc.
References BKE_area_region_free(), BKE_spacetype_from_id(), BLI_freelistN(), SpaceType::free, and LISTBASE_FOREACH.
Referenced by BKE_screen_area_free(), ED_area_data_copy(), and spacedata_cleanup_exec().
| bool BKE_spacetype_exists | ( | int | spaceid | ) |
Definition at line 294 of file screen.cc.
References BKE_spacetype_from_id().
Referenced by direct_link_area().
| SpaceType * BKE_spacetype_from_id | ( | int | spaceid | ) |
Definition at line 257 of file screen.cc.
References get_space_types().
Referenced by area_init_type_fallback(), area_offscreen_init(), BKE_screen_area_blend_read_after_liblink(), BKE_screen_area_free(), BKE_screen_foreach_id_screen_area(), BKE_spacedata_copylist(), BKE_spacedata_freelist(), BKE_spacetype_exists(), BKE_spacetype_register(), blo_do_versions_250(), blo_do_versions_280(), blender::ui::bonedropper_init(), datadropper_init(), depthdropper_init(), direct_link_area(), do_version_area_change_space_to_space_action(), drw_callbacks_post_scene(), ED_area_and_region_types_init(), ED_area_data_copy(), ED_area_newspace(), ED_spacedata_id_remap(), ED_spacedata_id_remap_single(), ED_view3d_buttons_region_layout_ex(), uiLayout::popover_group(), pyrna_callback_classmethod_add(), pyrna_callback_classmethod_remove(), screen_area_spacelink_add(), wm_xr_raycast_init(), wm_xr_raycast_uninit(), and write_area().
| void BKE_spacetype_register | ( | std::unique_ptr< SpaceType > | st | ) |
Definition at line 282 of file screen.cc.
References BKE_spacetype_from_id(), get_space_types(), SpaceType::name, and printf.
Referenced by ED_spacetype_action(), ED_spacetype_buttons(), ED_spacetype_clip(), ED_spacetype_console(), ED_spacetype_file(), ED_spacetype_image(), ED_spacetype_info(), ED_spacetype_ipo(), ED_spacetype_nla(), ED_spacetype_node(), ED_spacetype_outliner(), ED_spacetype_script(), blender::ed::vse::ED_spacetype_sequencer(), ED_spacetype_statusbar(), ED_spacetype_text(), ED_spacetype_topbar(), ED_spacetype_userpref(), ED_spacetype_view3d(), and blender::ed::spreadsheet::register_spacetype().
| void BKE_spacetypes_free | ( | ) |
Only for quitting blender.
Definition at line 252 of file screen.cc.
References get_space_types().
Referenced by BKE_blender_free().
Definition at line 277 of file screen.cc.
References get_space_types().
Referenced by ED_spacemacros_init(), ED_spacetypes_init(), and ED_spacetypes_keymap().
|
static |
Definition at line 1351 of file screen.cc.
References ScrArea::actionzones, AREA_FLAG_ACTIVE_TOOL_UPDATE, BKE_screen_view3d_do_versions_250(), BKE_spacetype_exists(), BKE_spacetype_from_id(), SpaceType::blend_read_data, BLI_addtail(), BLI_listbase_clear(), BLO_read_struct, BLO_read_struct_list, ScrArea::butspacetype, direct_link_region(), ListBase::first, ScrArea::flag, ScrArea::global, ScrArea::handlers, LISTBASE_FOREACH, MEM_callocN(), ScrArea::region_active_win, ScrArea::regionbase, ScrArea::runtime, SPACE_EMPTY, SPACE_INFO, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, SpaceInfo::spacetype, ScrArea::type, ScrArea::v1, ScrArea::v2, ScrArea::v3, and ScrArea::v4.
Referenced by BKE_screen_area_map_blend_read_data().
|
static |
Definition at line 1239 of file screen.cc.
References BLO_read_string(), BLO_read_struct_list, direct_link_panel_list(), LISTBASE_FOREACH, remove_least_recently_used_panel_states(), and state.
Referenced by direct_link_panel_list(), and direct_link_region().
|
static |
Definition at line 1262 of file screen.cc.
References View2D::alpha_hor, View2D::alpha_vert, BLO_read_struct, BLO_read_struct_list, RegionView3D::clipbb, direct_link_panel_list(), ARegion::flag, IDP_BlendDataRead, LISTBASE_FOREACH, RegionView3D::localvd, MAIN_ID_SESSION_UID_UNSET, MEM_callocN(), ARegion::panels, ARegion::panels_category_active, blender::ed::asset::shelf::region_blend_read_data(), ARegion::regiondata, ARegion::regiontype, RegionView3D::rflag, RGN_FLAG_POLL_FAILED, RGN_FLAG_SEARCH_FILTER_ACTIVE, RGN_FLAG_TEMP_REGIONDATA, RGN_TYPE_ASSET_SHELF, RGN_TYPE_WINDOW, ARegion::runtime, RegionView3D::runtime_viewlock, RV3D_NAVIGATING, RV3D_PAINTING, RegionView3D::smooth_timer, RegionView3D::sms, View2D::sms, SPACE_EMPTY, SPACE_VIEW3D, ARegion::ui_lists, ARegion::ui_previews, ARegion::v2d, RegionView3D::view_render, and ARegion::view_states.
Referenced by direct_link_area().
Keep global; this has to be accessible outside of window-manager.
Definition at line 216 of file screen.cc.
Referenced by BKE_spacedata_draw_locks(), BKE_spacetype_from_id(), BKE_spacetype_register(), BKE_spacetypes_free(), and BKE_spacetypes_list().
|
static |
Definition at line 557 of file screen.cc.
References MEM_freeN(), and state.
Referenced by BKE_panel_free(), and remove_least_recently_used_panel_states().
Definition at line 325 of file screen.cc.
References Panel::activedata, BKE_panel_new(), BLI_addtail(), BLI_listbase_clear(), BLI_strdup(), Panel::children, Panel::drawname, LayoutPanelState::idname, Panel::layout_panel_states, Panel::layout_panel_states_clock, LISTBASE_FOREACH, MEM_dupallocN(), panel_list_copy(), and Panel::runtime.
Referenced by BKE_area_region_copy(), and panel_list_copy().
Definition at line 395 of file screen.cc.
References BKE_area_region_copy(), BLI_addtail(), BLI_listbase_clear(), and LISTBASE_FOREACH.
Referenced by BKE_spacedata_copylist().
Removes all regions whose type cannot be reconstructed. For example files from new versions may be stored with a newly introduced region type that this version cannot handle.
Definition at line 1452 of file screen.cc.
References BKE_area_region_free(), BKE_regiontype_from_id(), BLI_freelinkN(), CLOG_WARN, LISTBASE_FOREACH_MUTABLE, LOG_BLEND_DOVERSION, SpaceType::name, and SpaceType::spaceid.
Referenced by BKE_screen_area_blend_read_after_liblink().
Definition at line 1219 of file screen.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), b, blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), BLI_remlink(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), layout_panel_state_delete(), Panel::layout_panel_states, LISTBASE_FOREACH, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and state.
Referenced by direct_link_panel_list().
|
static |
Definition at line 165 of file screen.cc.
References bScreen::areabase, BKE_screen_area_blend_read_after_liblink(), bScreen::id, and LISTBASE_FOREACH.
|
static |
Definition at line 126 of file screen.cc.
References AREAMAP_FROM_SCREEN, BKE_id_blend_write(), BKE_previewimg_blend_write(), BKE_screen_area_map_blend_write(), BLO_write_struct_at_address_with_filecode, bScreen::id, ID_SCRN, and bScreen::preview.
|
static |
Definition at line 110 of file screen.cc.
References bScreen::areabase, BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_lib_query_foreachid_process_flags_get(), BKE_screen_foreach_id_screen_area(), data, flag, IDWALK_CB_NOP, IDWALK_DO_DEPRECATED_POINTERS, IDWALK_INCLUDE_UI, and LISTBASE_FOREACH.
|
static |
Definition at line 72 of file screen.cc.
References AREAMAP_FROM_SCREEN, BKE_area_region_free(), BKE_previewimg_free(), BKE_screen_area_map_free(), BLI_freelistN(), LISTBASE_FOREACH, MEM_freeN(), bScreen::preview, bScreen::regionbase, and bScreen::tool_tip.
Referenced by BKE_screen_free_data().
|
static |
Definition at line 1167 of file screen.cc.
References BKE_spacetype_from_id(), SpaceType::blend_write, BLO_write_struct, LISTBASE_FOREACH, ScrArea::regionbase, ScrArea::spacedata, ScrArea::spacetype, write_panel_list(), write_region(), and write_uilist().
Referenced by BKE_screen_area_map_blend_write().
|
static |
Definition at line 1152 of file screen.cc.
References BLO_write_string(), BLO_write_struct_at_address, BLO_write_struct_list, LISTBASE_FOREACH, Panel::runtime, Panel::runtime_flag, state, and write_panel_list().
Referenced by write_area(), and write_panel_list().
|
static |
Definition at line 1104 of file screen.cc.
References BLO_write_struct, BLO_write_struct_at_address, RegionView3D::clipbb, ARegion::flag, RegionView3D::localvd, printf, blender::ed::asset::shelf::region_blend_write(), ARegion::regiondata, ARegion::regiontype, RGN_FLAG_TEMP_REGIONDATA, RGN_TYPE_ASSET_SHELF, RGN_TYPE_WINDOW, ARegion::runtime, and SPACE_VIEW3D.
Referenced by write_area().
|
static |
Definition at line 1143 of file screen.cc.
References BLO_write_struct, IDP_BlendWrite(), and uiList::properties.
Referenced by write_area().
| IDTypeInfo IDType_ID_SCR |
|
static |
Definition at line 62 of file screen.cc.
Referenced by regions_remove_invalid().
|
static |
Avoid bad-level calls to #WM_gizmomap_delete.
Definition at line 513 of file screen.cc.
Referenced by BKE_area_region_free(), and BKE_region_callback_free_gizmomap_set().
|
static |
Avoid bad-level calls to WM_gizmomap_tag_refresh.
Definition at line 480 of file screen.cc.
Referenced by BKE_region_callback_refresh_tag_gizmomap_set(), and BKE_screen_gizmo_tag_refresh().