|
Blender
V2.93
|
#include <math.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_path_util.h"#include "BLI_string.h"#include "BLT_translation.h"#include "BKE_global.h"#include "BKE_main.h"#include "BKE_material.h"#include "BKE_multires.h"#include "BKE_object.h"#include "BKE_packedFile.h"#include "BKE_paint.h"#include "BKE_screen.h"#include "BKE_undo_system.h"#include "DEG_depsgraph.h"#include "ED_armature.h"#include "ED_gpencil.h"#include "ED_image.h"#include "ED_mesh.h"#include "ED_object.h"#include "ED_paint.h"#include "ED_space_api.h"#include "ED_util.h"#include "GPU_immediate.h"#include "UI_interface.h"#include "UI_resources.h"#include "RNA_access.h"#include "WM_api.h"#include "WM_types.h"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 (int shift, int 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, struct PackedFile *pf) |
| void | ED_spacedata_id_remap (struct ScrArea *area, struct SpaceLink *sl, ID *old_id, ID *new_id) |
| void apply_keyb_grid | ( | int | shift, |
| int | ctrl, | ||
| float * | val, | ||
| float | fac1, | ||
| float | fac2, | ||
| float | fac3, | ||
| int | invert | ||
| ) |
Definition at line 304 of file ed_util.c.
References floorf, and invert().
Referenced by ed_marker_move_modal().
| void ED_editors_exit | ( | Main * | bmain, |
| bool | do_undo_system | ||
| ) |
Definition at line 181 of file ed_util.c.
References BKE_undosys_stack_destroy(), DEG_id_tag_update(), ED_mesh_mirror_spatial_table_end(), ED_mesh_mirror_topo_table_end(), ED_object_editmode_free_ex(), ListBase::first, G_MAIN, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, NULL, Main::objects, and wmWindowManager::undo_stack.
Referenced by memfile_undosys_step_decode(), WM_exit_ex(), and wm_window_match_init().
| bool ED_editors_flush_edits | ( | Main * | bmain | ) |
Definition at line 295 of file ed_util.c.
References ED_editors_flush_edits_ex().
Referenced by ed_flush_edits_exec(), ED_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 | ||
| ) |
Definition at line 278 of file ed_util.c.
References ED_editors_flush_edits_for_object_ex(), ListBase::first, Object::id, Main::is_memfile_undo_flush_needed, ID::next, and Main::objects.
Referenced by ED_editors_flush_edits(), memfile_undosys_step_encode(), and screen_render_invoke().
Definition at line 271 of file ed_util.c.
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 222 of file ed_util.c.
References BKE_object_data_editmode_flush_ptr_get(), BKE_sculptsession_bm_to_me(), BKE_sculptsession_bm_to_me_for_render(), SculptSession::cache, Object::data, ED_object_editmode_load(), Object::mode, multires_flush_sculpt_updates(), SculptSession::needs_flush_to_id, NULL, 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 86 of file ed_util.c.
References BKE_object_has_mode_data(), BKE_object_sculpt_data_create(), BLI_assert_unreachable, C, 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_gpencil_toggle_brush_cursor(), ED_object_editmode_enter_ex(), ED_object_mode_set(), ED_object_posemode_enter_ex(), ED_object_sculptmode_enter_ex(), ED_object_vpaintmode_enter_ex(), ED_object_wpaintmode_enter_ex(), ED_space_image_paint_update(), ListBase::first, ReportList::flag, ID_IS_LINKED, ID_RECALC_COPY_ON_WRITE, NULL, OB_GPENCIL, OB_MODE_ALL_PAINT_GPENCIL, OB_MODE_ALL_SCULPT, OB_MODE_EDIT, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, Main::objects, wmWindowManager::op_undo_depth, RPT_STORE, scene, SWAP, and Object::type.
Referenced by wm_file_read_post().
| void ED_editors_init_for_undo | ( | Main * | bmain | ) |
Definition at line 68 of file ed_util.c.
References BASACT, BKE_texpaint_slots_refresh_object(), ED_paint_proj_mesh_data_check(), ListBase::first, LISTBASE_FOREACH, Object::mode, NULL, OB_MODE_TEXTURE_PAINT, Base::object, scene, 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 | ( | struct ScrArea * | area, |
| struct SpaceLink * | sl, | ||
| ID * | old_id, | ||
| ID * | new_id | ||
| ) |
Use to free ID references within runtime data (stored outside of DNA)
| new_id | may be NULL to unlink old_id. |
Definition at line 428 of file ed_util.c.
References blender::compositor::area(), BKE_spacetype_from_id(), SpaceType::id_remap, and SpaceLink::spacetype.
Referenced by WM_init(), and WM_main_remap_editor_id_reference().
| void unpack_menu | ( | bContext * | C, |
| const char * | opname, | ||
| const char * | id_name, | ||
| const char * | abs_name, | ||
| const char * | folder, | ||
| struct PackedFile * | pf | ||
| ) |
Definition at line 329 of file ed_util.c.
References BKE_main_blendfile_path(), BKE_packedfile_compare_to_file(), BLI_snprintf(), BLI_split_file_part(), C, CTX_data_main(), FILE_MAX, FILE_MAXDIR, G, id_name(), IFACE_, NULL, 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(), STREQ, TIP_, 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().