|
Blender V4.3
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLT_translation.hh"#include "BKE_collection.hh"#include "BKE_global.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_lib_remap.hh"#include "BKE_main.hh"#include "BKE_material.h"#include "BKE_multires.hh"#include "BKE_object.hh"#include "BKE_packedFile.hh"#include "BKE_paint.hh"#include "BKE_scene.hh"#include "BKE_screen.hh"#include "BKE_undo_system.hh"#include "DEG_depsgraph.hh"#include "DNA_gpencil_legacy_types.h"#include "ED_armature.hh"#include "ED_asset.hh"#include "ED_gpencil_legacy.hh"#include "ED_image.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "ED_paint.hh"#include "ED_screen.hh"#include "ED_sculpt.hh"#include "ED_space_api.hh"#include "ED_util.hh"#include "ED_view3d.hh"#include "GPU_immediate.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "RNA_access.hh"#include "WM_api.hh"#include "WM_types.hh"Go to the source code of this file.
Functions | |
| void | ED_editors_init_for_undo (Main *bmain) |
| void | ED_editors_init (bContext *C) |
| void | ED_editors_exit (Main *bmain, bool do_undo_system) |
| bool | ED_editors_flush_edits_for_object_ex (Main *bmain, Object *ob, bool for_render, bool check_needs_flush) |
| bool | ED_editors_flush_edits_for_object (Main *bmain, Object *ob) |
| bool | ED_editors_flush_edits_ex (Main *bmain, bool for_render, bool check_needs_flush) |
| bool | ED_editors_flush_edits (Main *bmain) |
| void | apply_keyb_grid (bool shift, bool ctrl, float *val, float fac1, float fac2, float fac3, int invert) |
| void | unpack_menu (bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, PackedFile *pf) |
| void | ED_spacedata_id_remap (ScrArea *area, SpaceLink *sl, const blender::bke::id::IDRemapper &mappings) |
| void | ED_spacedata_id_remap_single (ScrArea *area, SpaceLink *sl, ID *old_id, ID *new_id) |
| void apply_keyb_grid | ( | bool | shift, |
| bool | ctrl, | ||
| float * | val, | ||
| float | fac1, | ||
| float | fac2, | ||
| float | fac3, | ||
| int | invert ) |
Now only used in 2D spaces, like time, f-curve, NLA, image, etc.
Definition at line 338 of file ed_util.cc.
References floorf, and invert().
Referenced by ed_marker_move_modal().
| void ED_editors_exit | ( | Main * | bmain, |
| bool | do_undo_system ) |
Frees all edit-mode stuff.
Definition at line 218 of file ed_util.cc.
References BKE_undosys_stack_destroy(), DEG_id_tag_update(), ED_mesh_mirror_spatial_table_end(), ED_mesh_mirror_topo_table_end(), G_MAIN, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, LISTBASE_FOREACH, Main::objects, and wmWindowManager::undo_stack.
Referenced by memfile_undosys_step_decode(), WM_exit_ex(), and wm_file_read_setup_wm_init().
| bool ED_editors_flush_edits | ( | Main * | bmain | ) |
Definition at line 331 of file ed_util.cc.
References ED_editors_flush_edits_ex().
Referenced by ed_flush_edits_exec(), scene_add(), WM_autosave_write(), WM_exit_ex(), wm_file_write(), and wm_homefile_write_exec().
| bool ED_editors_flush_edits_ex | ( | Main * | bmain, |
| bool | for_render, | ||
| bool | check_needs_flush ) |
Flush any temp data from object editing to DNA before writing files, rendering, copying, etc.
Definition at line 315 of file ed_util.cc.
References ED_editors_flush_edits_for_object_ex(), Main::is_memfile_undo_flush_needed, LISTBASE_FOREACH, and Main::objects.
Referenced by ED_editors_flush_edits(), memfile_undosys_step_encode(), and screen_render_invoke().
Definition at line 310 of file ed_util.cc.
References ED_editors_flush_edits_for_object_ex().
| bool ED_editors_flush_edits_for_object_ex | ( | Main * | bmain, |
| Object * | ob, | ||
| bool | for_render, | ||
| bool | check_needs_flush ) |
Definition at line 260 of file ed_util.cc.
References BKE_object_data_editmode_flush_ptr_get(), BKE_sculptsession_bm_to_me(), BKE_sculptsession_bm_to_me_for_render(), SculptSession::cache, Object::data, Object::mode, multires_flush_sculpt_updates(), SculptSession::needs_flush_to_id, OB_MODE_EDIT, OB_MODE_SCULPT, and Object::sculpt.
Referenced by ED_editors_flush_edits_ex(), and ED_editors_flush_edits_for_object().
| void ED_editors_init | ( | bContext * | C | ) |
Definition at line 94 of file ed_util.cc.
References BKE_collection_has_object_recursive(), BKE_id_is_editable(), BKE_object_has_mode_data(), BKE_object_sculpt_data_create(), BKE_scene_has_object(), BLI_assert_unreachable, CTX_data_active_object(), CTX_data_expect_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_reports(), DEG_id_tag_update(), depsgraph, ED_area_tag_redraw(), ED_object_posemode_enter_ex(), ED_object_vpaintmode_enter_ex(), ED_object_wpaintmode_enter_ex(), ED_screen_areas_iter, ED_space_image_paint_update(), ReportList::flag, ID_RECALC_SYNC_TO_EVAL, LISTBASE_FOREACH, OB_HIDE_VIEWPORT, OB_MODE_ALL_SCULPT, OB_MODE_EDIT, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, blender::ed::sculpt_paint::object_sculpt_mode_enter(), Main::objects, wmWindowManager::op_undo_depth, Object::type, wmWindowManager::windows, and WM_window_get_active_screen().
Referenced by wm_file_read_post().
| void ED_editors_init_for_undo | ( | Main * | bmain | ) |
Definition at line 64 of file ed_util.cc.
References BKE_texpaint_slots_refresh_object(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), ED_paint_proj_mesh_data_check(), ListBase::first, View3D_Runtime::flag, LISTBASE_FOREACH, View3D::localvd, Object::mode, OB_MODE_TEXTURE_PAINT, View3D::runtime, Main::screens, SPACE_VIEW3D, V3D_RUNTIME_LOCAL_MAYBE_EMPTY, wmWindowManager::windows, Main::wm, WM_window_get_active_scene(), and WM_window_get_active_view_layer().
Referenced by image_undosys_step_decode(), and memfile_undosys_step_decode().
| void ED_spacedata_id_remap | ( | ScrArea * | area, |
| SpaceLink * | sl, | ||
| const blender::bke::id::IDRemapper & | mappings ) |
Definition at line 472 of file ed_util.cc.
References BKE_spacetype_from_id(), SpaceType::id_remap, and SpaceLink::spacetype.
Referenced by WM_main_remap_editor_id_reference().
Use to free ID references within runtime data (stored outside of DNA)
| new_id | may be NULL to unlink old_id. |
Definition at line 482 of file ed_util.cc.
References blender::bke::id::IDRemapper::add(), BKE_spacetype_from_id(), SpaceType::id_remap, and SpaceLink::spacetype.
Referenced by WM_init().
| void unpack_menu | ( | bContext * | C, |
| const char * | opname, | ||
| const char * | id_name, | ||
| const char * | abs_name, | ||
| const char * | folder, | ||
| PackedFile * | pf ) |
Definition at line 363 of file ed_util.cc.
References BKE_main_blendfile_path(), BKE_packedfile_compare_to_file(), BLI_path_join, BLI_path_split_file_part(), CTX_data_main(), FILE_MAX, FILE_MAXDIR, id_name(), IFACE_, ot, pf, PF_CMP_DIFFERS, PF_CMP_EQUAL, PF_CMP_NOFILE, PF_REMOVE, PF_USE_LOCAL, PF_USE_ORIGINAL, PF_WRITE_LOCAL, PF_WRITE_ORIGINAL, RNA_enum_set(), RNA_string_set(), SNPRINTF, STREQ, UI_ITEM_NONE, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemFullO_ptr(), WM_OP_EXEC_DEFAULT, and WM_operatortype_find().
Referenced by image_unpack_invoke(), and sound_unpack_invoke().