104 int reports_flag_prev = reports->
flag & ~RPT_STORE;
106 std::swap(reports->
flag, reports_flag_prev);
127 ID *ob_data =
static_cast<ID *
>(ob->data);
133 if (obact ==
nullptr || ob->
type != obact->
type) {
160 object::editmode_enter_ex(bmain, scene, ob, 0);
166 *bmain, *
depsgraph, *scene, *ob,
true, reports);
212 asset::list::storage_tag_main_data_dirty();
214 std::swap(reports->
flag, reports_flag_prev);
226 if (do_undo_system &&
G_MAIN->wm.first) {
248 if (object::editmode_free_ex(bmain, ob)) {
249 if (do_undo_system ==
false) {
263 bool check_needs_flush)
266 bool has_edited =
false;
273 if (check_needs_flush && (*needs_flush_ptr == 0)) {
276 *needs_flush_ptr = 0;
296 if (needs_flush_ptr !=
nullptr) {
297 if (check_needs_flush && (*needs_flush_ptr == 0)) {
300 *needs_flush_ptr = 0;
305 object::editmode_load(bmain, ob);
317 bool has_edited =
false;
339 bool shift,
bool ctrl,
float *val,
float fac1,
float fac2,
float fac3,
int invert)
348 *val = fac3 *
floorf(*val / fac3 + 0.5f);
353 *val = fac2 *
floorf(*val / fac2 + 0.5f);
358 *val = fac1 *
floorf(*val / fac1 + 0.5f);
366 const char *abs_name,
392 if (blendfile_path[0] !=
'\0') {
396 BLI_path_join(local_name,
sizeof(local_name),
"//", folder, fi);
397 if (!
STREQ(abs_name, local_name)) {
488 mappings.
add(old_id, new_id);
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob)
Depsgraph * CTX_data_expect_evaluated_depsgraph(const bContext *C)
ReportList * CTX_wm_reports(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
bool BKE_scene_has_object(Scene *scene, Object *ob)
bool BKE_id_is_editable(const Main *bmain, const ID *id)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
General operations, lookup, etc. for materials.
void BKE_texpaint_slots_refresh_object(struct Scene *scene, struct Object *ob)
void multires_flush_sculpt_updates(Object *object)
General operations, lookup, etc. for blender objects.
bool BKE_object_has_mode_data(const Object *ob, eObjectMode object_mode)
void BKE_object_sculpt_data_create(Object *ob)
char * BKE_object_data_editmode_flush_ptr_get(ID *id)
ePF_FileCompare BKE_packedfile_compare_to_file(const char *ref_file_name, const char *filepath_rel, const PackedFile *pf)
void BKE_sculptsession_bm_to_me(Object *ob, bool reorder)
void BKE_sculptsession_bm_to_me_for_render(Object *object)
SpaceType * BKE_spacetype_from_id(int spaceid)
void BKE_undosys_stack_destroy(UndoStack *ustack)
#define BLI_assert_unreachable()
#define LISTBASE_FOREACH(type, var, list)
#define BLI_path_join(...)
void void void BLI_path_split_file_part(const char *filepath, char *file, size_t file_maxncpy) ATTR_NONNULL(1
#define SNPRINTF(dst, format,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
#define OB_MODE_ALL_SCULPT
@ V3D_RUNTIME_LOCAL_MAYBE_EMPTY
void ED_space_image_paint_update(Main *bmain, wmWindowManager *wm, Scene *scene)
void ED_mesh_mirror_topo_table_end(Object *ob)
void ED_mesh_mirror_spatial_table_end(Object *ob)
void ED_object_wpaintmode_enter_ex(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
void ED_object_vpaintmode_enter_ex(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
bool ED_paint_proj_mesh_data_check(Scene &scene, Object &ob, bool *r_has_uvs, bool *r_has_mat, bool *r_has_tex, bool *r_has_stencil)
void ED_area_tag_redraw(ScrArea *area)
#define ED_screen_areas_iter(win, screen, area_name)
Read Guarded memory(de)allocation.
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
void uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, PointerRNA *r_opptr)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void add(ID *old_id, ID *new_id)
std::string id_name(void *id)
const Depsgraph * depsgraph
void ED_editors_exit(Main *bmain, bool do_undo_system)
bool ED_editors_flush_edits_for_object(Main *bmain, Object *ob)
void ED_spacedata_id_remap_single(ScrArea *area, SpaceLink *sl, ID *old_id, ID *new_id)
bool ED_editors_flush_edits_for_object_ex(Main *bmain, Object *ob, bool for_render, bool check_needs_flush)
bool ED_editors_flush_edits(Main *bmain)
void unpack_menu(bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, PackedFile *pf)
void apply_keyb_grid(bool shift, bool ctrl, float *val, float fac1, float fac2, float fac3, int invert)
void ED_editors_init_for_undo(Main *bmain)
void ED_spacedata_id_remap(ScrArea *area, SpaceLink *sl, const blender::bke::id::IDRemapper &mappings)
bool ED_editors_flush_edits_ex(Main *bmain, bool for_render, bool check_needs_flush)
void ED_editors_init(bContext *C)
#define pf(_x, _i)
Prefetch 64.
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
void object_sculpt_mode_enter(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, bool force_dyntopo, ReportList *reports)
bool ED_object_posemode_enter_ex(Main *bmain, Object *ob)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
bool is_memfile_undo_flush_needed
struct SculptSession * sculpt
blender::ed::sculpt_paint::StrokeCache * cache
void(* id_remap)(ScrArea *area, SpaceLink *sl, const blender::bke::id::IDRemapper &mappings)
struct UndoStack * undo_stack
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
Scene * WM_window_get_active_scene(const wmWindow *win)
bScreen * WM_window_get_active_screen(const wmWindow *win)