Blender V4.3
ed_util.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include <cmath>
10#include <cstdlib>
11#include <cstring>
12
13#include "MEM_guardedalloc.h"
14
15#include "BLI_listbase.h"
16#include "BLI_path_utils.hh"
17#include "BLI_string.h"
18
19#include "BLT_translation.hh"
20
21#include "BKE_collection.hh"
22#include "BKE_global.hh"
23#include "BKE_layer.hh"
24#include "BKE_lib_id.hh"
25#include "BKE_lib_remap.hh"
26#include "BKE_main.hh"
27#include "BKE_material.h"
28#include "BKE_multires.hh"
29#include "BKE_object.hh"
30#include "BKE_packedFile.hh"
31#include "BKE_paint.hh"
32#include "BKE_scene.hh"
33#include "BKE_screen.hh"
34#include "BKE_undo_system.hh"
35
36#include "DEG_depsgraph.hh"
37
39
40#include "ED_armature.hh"
41#include "ED_asset.hh"
42#include "ED_gpencil_legacy.hh"
43#include "ED_image.hh"
44#include "ED_mesh.hh"
45#include "ED_object.hh"
46#include "ED_paint.hh"
47#include "ED_screen.hh"
48#include "ED_sculpt.hh"
49#include "ED_space_api.hh"
50#include "ED_util.hh"
51#include "ED_view3d.hh"
52
53#include "GPU_immediate.hh"
54
55#include "UI_interface.hh"
56#include "UI_resources.hh"
57
58#include "RNA_access.hh"
59#include "WM_api.hh"
60#include "WM_types.hh"
61
62/* ********* general editor util functions, not BKE stuff please! ********* */
63
65{
66 wmWindowManager *wm = static_cast<wmWindowManager *>(bmain->wm.first);
67 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
70 BKE_view_layer_synced_ensure(scene, view_layer);
72 if (ob && (ob->mode & OB_MODE_TEXTURE_PAINT)) {
74 ED_paint_proj_mesh_data_check(*scene, *ob, nullptr, nullptr, nullptr, nullptr);
75 }
76
77 /* UI Updates. */
78 /* Flag local View3D's to check and exit if they are empty. */
79 LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
80 LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
81 LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
82 if (sl->spacetype == SPACE_VIEW3D) {
83 View3D *v3d = reinterpret_cast<View3D *>(sl);
84 if (v3d->localvd) {
86 }
87 }
88 }
89 }
90 }
91 }
92}
93
95{
96 using namespace blender::ed;
98 Main *bmain = CTX_data_main(C);
99 Scene *scene = CTX_data_scene(C);
101
102 /* This is called during initialization, so we don't want to store any reports */
103 ReportList *reports = CTX_wm_reports(C);
104 int reports_flag_prev = reports->flag & ~RPT_STORE;
105
106 std::swap(reports->flag, reports_flag_prev);
107
108 /* Don't do undo pushes when calling an operator. */
109 wm->op_undo_depth++;
110
111 /* toggle on modes for objects that were saved with these enabled. for
112 * e.g. linked objects we have to ensure that they are actually the
113 * active object in this scene. */
114 Object *obact = CTX_data_active_object(C);
115 LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
116 int mode = ob->mode;
117 if (mode == OB_MODE_OBJECT) {
118 continue;
119 }
120 if (BKE_object_has_mode_data(ob, eObjectMode(mode))) {
121 /* For multi-edit mode we may already have mode data. */
122 continue;
123 }
124
125 /* Reset object to Object mode, so that code below can properly re-switch it to its
126 * previous mode if possible, re-creating its mode data, etc. */
127 ID *ob_data = static_cast<ID *>(ob->data);
128 ob->mode = OB_MODE_OBJECT;
130
131 /* Object mode is enforced if there is no active object, or if the active object's type is
132 * different. */
133 if (obact == nullptr || ob->type != obact->type) {
134 continue;
135 }
136 /* Object mode is enforced for non-editable data (or their obdata). */
137 if (!BKE_id_is_editable(bmain, &ob->id) ||
138 (ob_data != nullptr && !BKE_id_is_editable(bmain, ob_data)))
139 {
140 continue;
141 }
142
143 /* Pose mode is very similar to Object one, we can apply it even on objects not in current
144 * scene. */
145 if (mode == OB_MODE_POSE) {
147 }
148
149 /* Other edit/paint/etc. modes are only settable for objects visible in active scene currently.
150 * Otherwise, they (and their obdata) may not be (fully) evaluated, which is mandatory for some
151 * modes like Sculpt.
152 * Ref. #98225. */
153 if (!BKE_collection_has_object_recursive(scene->master_collection, ob) ||
154 !BKE_scene_has_object(scene, ob) || (ob->visibility_flag & OB_HIDE_VIEWPORT) != 0)
155 {
156 continue;
157 }
158
159 if (mode == OB_MODE_EDIT) {
160 object::editmode_enter_ex(bmain, scene, ob, 0);
161 }
162 else if (mode & OB_MODE_ALL_SCULPT) {
163 if (obact == ob) {
164 if (mode == OB_MODE_SCULPT) {
166 *bmain, *depsgraph, *scene, *ob, true, reports);
167 }
168 else if (mode == OB_MODE_VERTEX_PAINT) {
169 ED_object_vpaintmode_enter_ex(*bmain, *depsgraph, *scene, *ob);
170 }
171 else if (mode == OB_MODE_WEIGHT_PAINT) {
172 ED_object_wpaintmode_enter_ex(*bmain, *depsgraph, *scene, *ob);
173 }
174 else {
176 }
177 }
178 else {
179 /* Create data for non-active objects which need it for
180 * mode-switching but don't yet support multi-editing. */
181 if (mode & OB_MODE_ALL_SCULPT) {
182 ob->mode = mode;
184 }
185 }
186 }
187 else {
188 /* TODO(@ideasman42): avoid operator calls. */
189 if (obact == ob) {
190 object::mode_set(C, eObjectMode(mode));
191 }
192 }
193 }
194
195 /* image editor paint mode */
196 if (scene) {
197 ED_space_image_paint_update(bmain, wm, scene);
198 }
199
200 /* Enforce a full redraw for the first time areas/regions get drawn. Further region init/refresh
201 * just triggers non-rebuild redraws (#RGN_DRAW_NO_REBUILD). Usually a full redraw would be
202 * triggered by a `NC_WM | ND_FILEREAD` notifier, but if a startup script calls an operator that
203 * redraws the window, notifiers are not handled before the operator runs. See #98461. */
204 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
205 const bScreen *screen = WM_window_get_active_screen(win);
206
207 ED_screen_areas_iter (win, screen, area) {
208 ED_area_tag_redraw(area);
209 }
210 }
211
212 asset::list::storage_tag_main_data_dirty();
213
214 std::swap(reports->flag, reports_flag_prev);
215 wm->op_undo_depth--;
216}
217
218void ED_editors_exit(Main *bmain, bool do_undo_system)
219{
220 using namespace blender::ed;
221 if (!bmain) {
222 return;
223 }
224
225 /* Frees all edit-mode undo-steps. */
226 if (do_undo_system && G_MAIN->wm.first) {
227 wmWindowManager *wm = static_cast<wmWindowManager *>(G_MAIN->wm.first);
228 /* normally we don't check for null undo stack,
229 * do here since it may run in different context. */
230 if (wm->undo_stack) {
232 wm->undo_stack = nullptr;
233 }
234 }
235
236 /* On undo, tag for update so the depsgraph doesn't use stale edit-mode data,
237 * this is possible when mixing edit-mode and memory-file undo.
238 *
239 * By convention, objects are not left in edit-mode - so this isn't often problem in practice,
240 * since exiting edit-mode will tag the objects too.
241 *
242 * However there is no guarantee the active object _never_ changes while in edit-mode.
243 * Python for example can do this, some callers to #object::base_activate
244 * don't handle modes either (doing so isn't always practical).
245 *
246 * To reproduce the problem where stale data is used, see: #84920. */
247 LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
248 if (object::editmode_free_ex(bmain, ob)) {
249 if (do_undo_system == false) {
251 }
252 }
253 }
254
255 /* global in meshtools... */
258}
259
261 Object *ob,
262 bool for_render,
263 bool check_needs_flush)
264{
265 using namespace blender::ed;
266 bool has_edited = false;
267 if (ob->mode & OB_MODE_SCULPT) {
268 /* Don't allow flushing while in the middle of a stroke (frees data in use).
269 * Auto-save prevents this from happening but scripts
270 * may cause a flush on saving: #53986. */
271 if (ob->sculpt != nullptr && ob->sculpt->cache == nullptr) {
272 char *needs_flush_ptr = &ob->sculpt->needs_flush_to_id;
273 if (check_needs_flush && (*needs_flush_ptr == 0)) {
274 return false;
275 }
276 *needs_flush_ptr = 0;
277
278 /* flush multires changes (for sculpt) */
280 has_edited = true;
281
282 if (for_render) {
283 /* flush changes from dynamic topology sculpt */
285 }
286 else {
287 /* Set reorder=false so that saving the file doesn't reorder
288 * the BMesh's elements */
290 }
291 }
292 }
293 else if (ob->mode & OB_MODE_EDIT) {
294
295 char *needs_flush_ptr = BKE_object_data_editmode_flush_ptr_get(static_cast<ID *>(ob->data));
296 if (needs_flush_ptr != nullptr) {
297 if (check_needs_flush && (*needs_flush_ptr == 0)) {
298 return false;
299 }
300 *needs_flush_ptr = 0;
301 }
302
303 /* get editmode results */
304 has_edited = true;
305 object::editmode_load(bmain, ob);
306 }
307 return has_edited;
308}
309
311{
312 return ED_editors_flush_edits_for_object_ex(bmain, ob, false, false);
313}
314
315bool ED_editors_flush_edits_ex(Main *bmain, bool for_render, bool check_needs_flush)
316{
317 bool has_edited = false;
318
319 /* loop through all data to find edit mode or object mode, because during
320 * exiting we might not have a context for edit object and multiple sculpt
321 * objects can exist at the same time */
322 LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
323 has_edited |= ED_editors_flush_edits_for_object_ex(bmain, ob, for_render, check_needs_flush);
324 }
325
326 bmain->is_memfile_undo_flush_needed = false;
327
328 return has_edited;
329}
330
332{
333 return ED_editors_flush_edits_ex(bmain, false, false);
334}
335
336/* ***** XXX: functions are using old blender names, cleanup later ***** */
337
339 bool shift, bool ctrl, float *val, float fac1, float fac2, float fac3, int invert)
340{
341 /* fac1 is for 'nothing', fac2 for CTRL, fac3 for SHIFT */
342 if (invert) {
343 ctrl = !ctrl;
344 }
345
346 if (ctrl && shift) {
347 if (fac3 != 0.0f) {
348 *val = fac3 * floorf(*val / fac3 + 0.5f);
349 }
350 }
351 else if (ctrl) {
352 if (fac2 != 0.0f) {
353 *val = fac2 * floorf(*val / fac2 + 0.5f);
354 }
355 }
356 else {
357 if (fac1 != 0.0f) {
358 *val = fac1 * floorf(*val / fac1 + 0.5f);
359 }
360 }
361}
362
364 const char *opname,
365 const char *id_name,
366 const char *abs_name,
367 const char *folder,
368 PackedFile *pf)
369{
370 Main *bmain = CTX_data_main(C);
371 PointerRNA props_ptr;
372 uiPopupMenu *pup;
373 uiLayout *layout;
374 char line[FILE_MAX + 100];
375 wmOperatorType *ot = WM_operatortype_find(opname, true);
376 const char *blendfile_path = BKE_main_blendfile_path(bmain);
377
378 pup = UI_popup_menu_begin(C, IFACE_("Unpack File"), ICON_NONE);
379 layout = UI_popup_menu_layout(pup);
380
381 uiItemFullO_ptr(layout,
382 ot,
383 IFACE_("Remove Pack"),
384 ICON_NONE,
385 nullptr,
388 &props_ptr);
389 RNA_enum_set(&props_ptr, "method", PF_REMOVE);
390 RNA_string_set(&props_ptr, "id", id_name);
391
392 if (blendfile_path[0] != '\0') {
393 char local_name[FILE_MAXDIR + FILE_MAX], fi[FILE_MAX];
394
395 BLI_path_split_file_part(abs_name, fi, sizeof(fi));
396 BLI_path_join(local_name, sizeof(local_name), "//", folder, fi);
397 if (!STREQ(abs_name, local_name)) {
398 switch (BKE_packedfile_compare_to_file(blendfile_path, local_name, pf)) {
399 case PF_CMP_NOFILE:
400 SNPRINTF(line, IFACE_("Create %s"), local_name);
402 layout, ot, line, ICON_NONE, nullptr, WM_OP_EXEC_DEFAULT, UI_ITEM_NONE, &props_ptr);
403 RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL);
404 RNA_string_set(&props_ptr, "id", id_name);
405
406 break;
407 case PF_CMP_EQUAL:
408 SNPRINTF(line, IFACE_("Use %s (identical)"), local_name);
409 // uiItemEnumO_ptr(layout, ot, line, ICON_NONE, "method", PF_USE_LOCAL);
411 layout, ot, line, ICON_NONE, nullptr, WM_OP_EXEC_DEFAULT, UI_ITEM_NONE, &props_ptr);
412 RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL);
413 RNA_string_set(&props_ptr, "id", id_name);
414
415 break;
416 case PF_CMP_DIFFERS:
417 SNPRINTF(line, IFACE_("Use %s (differs)"), local_name);
418 // uiItemEnumO_ptr(layout, ot, line, ICON_NONE, "method", PF_USE_LOCAL);
420 layout, ot, line, ICON_NONE, nullptr, WM_OP_EXEC_DEFAULT, UI_ITEM_NONE, &props_ptr);
421 RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL);
422 RNA_string_set(&props_ptr, "id", id_name);
423
424 SNPRINTF(line, IFACE_("Overwrite %s"), local_name);
425 // uiItemEnumO_ptr(layout, ot, line, ICON_NONE, "method", PF_WRITE_LOCAL);
427 layout, ot, line, ICON_NONE, nullptr, WM_OP_EXEC_DEFAULT, UI_ITEM_NONE, &props_ptr);
428 RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL);
429 RNA_string_set(&props_ptr, "id", id_name);
430 break;
431 }
432 }
433 }
434
435 switch (BKE_packedfile_compare_to_file(blendfile_path, abs_name, pf)) {
436 case PF_CMP_NOFILE:
437 SNPRINTF(line, IFACE_("Create %s"), abs_name);
438 // uiItemEnumO_ptr(layout, ot, line, ICON_NONE, "method", PF_WRITE_ORIGINAL);
440 layout, ot, line, ICON_NONE, nullptr, WM_OP_EXEC_DEFAULT, UI_ITEM_NONE, &props_ptr);
441 RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL);
442 RNA_string_set(&props_ptr, "id", id_name);
443 break;
444 case PF_CMP_EQUAL:
445 SNPRINTF(line, IFACE_("Use %s (identical)"), abs_name);
446 // uiItemEnumO_ptr(layout, ot, line, ICON_NONE, "method", PF_USE_ORIGINAL);
448 layout, ot, line, ICON_NONE, nullptr, WM_OP_EXEC_DEFAULT, UI_ITEM_NONE, &props_ptr);
449 RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL);
450 RNA_string_set(&props_ptr, "id", id_name);
451 break;
452 case PF_CMP_DIFFERS:
453 SNPRINTF(line, IFACE_("Use %s (differs)"), abs_name);
454 // uiItemEnumO_ptr(layout, ot, line, ICON_NONE, "method", PF_USE_ORIGINAL);
456 layout, ot, line, ICON_NONE, nullptr, WM_OP_EXEC_DEFAULT, UI_ITEM_NONE, &props_ptr);
457 RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL);
458 RNA_string_set(&props_ptr, "id", id_name);
459
460 SNPRINTF(line, IFACE_("Overwrite %s"), abs_name);
461 // uiItemEnumO_ptr(layout, ot, line, ICON_NONE, "method", PF_WRITE_ORIGINAL);
463 layout, ot, line, ICON_NONE, nullptr, WM_OP_EXEC_DEFAULT, UI_ITEM_NONE, &props_ptr);
464 RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL);
465 RNA_string_set(&props_ptr, "id", id_name);
466 break;
467 }
468
469 UI_popup_menu_end(C, pup);
470}
471
473 SpaceLink *sl,
474 const blender::bke::id::IDRemapper &mappings)
475{
477 if (st && st->id_remap) {
478 st->id_remap(area, sl, mappings);
479 }
480}
481
482void ED_spacedata_id_remap_single(ScrArea *area, SpaceLink *sl, ID *old_id, ID *new_id)
483{
485
486 if (st && st->id_remap) {
488 mappings.add(old_id, new_id);
489 st->id_remap(area, sl, mappings);
490 }
491}
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)
#define G_MAIN
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)
Definition lib_id.cc:2456
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
Definition main.cc:832
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)
Definition multires.cc:394
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)
@ PF_CMP_EQUAL
@ PF_CMP_NOFILE
@ PF_CMP_DIFFERS
ePF_FileCompare BKE_packedfile_compare_to_file(const char *ref_file_name, const char *filepath_rel, const PackedFile *pf)
@ PF_USE_ORIGINAL
@ PF_USE_LOCAL
@ PF_REMOVE
@ PF_WRITE_ORIGINAL
@ PF_WRITE_LOCAL
void BKE_sculptsession_bm_to_me(Object *ob, bool reorder)
Definition paint.cc:2088
void BKE_sculptsession_bm_to_me_for_render(Object *object)
Definition paint.cc:2123
SpaceType * BKE_spacetype_from_id(int spaceid)
Definition screen.cc:243
void BKE_undosys_stack_destroy(UndoStack *ustack)
#define BLI_assert_unreachable()
Definition BLI_assert.h:97
#define LISTBASE_FOREACH(type, var, list)
#define FILE_MAX
#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 FILE_MAXDIR
#define SNPRINTF(dst, format,...)
Definition BLI_string.h:597
#define STREQ(a, b)
#define IFACE_(msgid)
void DEG_id_tag_update(ID *id, unsigned int flags)
@ ID_RECALC_TRANSFORM
Definition DNA_ID.h:1021
@ ID_RECALC_SYNC_TO_EVAL
Definition DNA_ID.h:1085
@ ID_RECALC_GEOMETRY
Definition DNA_ID.h:1041
eObjectMode
@ OB_MODE_EDIT
@ OB_MODE_WEIGHT_PAINT
@ OB_MODE_SCULPT
@ OB_MODE_POSE
@ OB_MODE_TEXTURE_PAINT
@ OB_MODE_OBJECT
@ OB_MODE_VERTEX_PAINT
#define OB_MODE_ALL_SCULPT
@ OB_HIDE_VIEWPORT
@ SPACE_VIEW3D
@ 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)
Definition meshtools.cc:857
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)
Definition area.cc:708
#define ED_screen_areas_iter(win, screen, area_name)
Definition ED_screen.hh:281
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)
#define UI_ITEM_NONE
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
@ WM_OP_EXEC_DEFAULT
Definition WM_types.hh:225
void add(ID *old_id, ID *new_id)
std::string id_name(void *id)
const Depsgraph * depsgraph
#define floorf(x)
void ED_editors_exit(Main *bmain, bool do_undo_system)
Definition ed_util.cc:218
bool ED_editors_flush_edits_for_object(Main *bmain, Object *ob)
Definition ed_util.cc:310
void ED_spacedata_id_remap_single(ScrArea *area, SpaceLink *sl, ID *old_id, ID *new_id)
Definition ed_util.cc:482
bool ED_editors_flush_edits_for_object_ex(Main *bmain, Object *ob, bool for_render, bool check_needs_flush)
Definition ed_util.cc:260
bool ED_editors_flush_edits(Main *bmain)
Definition ed_util.cc:331
void unpack_menu(bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, PackedFile *pf)
Definition ed_util.cc:363
void apply_keyb_grid(bool shift, bool ctrl, float *val, float fac1, float fac2, float fac3, int invert)
Definition ed_util.cc:338
void ED_editors_init_for_undo(Main *bmain)
Definition ed_util.cc:64
void ED_spacedata_id_remap(ScrArea *area, SpaceLink *sl, const blender::bke::id::IDRemapper &mappings)
Definition ed_util.cc:472
bool ED_editors_flush_edits_ex(Main *bmain, bool for_render, bool check_needs_flush)
Definition ed_util.cc:315
void ED_editors_init(bContext *C)
Definition ed_util.cc:94
#define pf(_x, _i)
Prefetch 64.
Definition gim_memory.h:48
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
Definition invert.h:9
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)
Definition pose_edit.cc:78
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
Definition DNA_ID.h:413
void * first
ListBase wm
Definition BKE_main.hh:239
bool is_memfile_undo_flush_needed
Definition BKE_main.hh:165
ListBase screens
Definition BKE_main.hh:225
ListBase objects
Definition BKE_main.hh:212
struct SculptSession * sculpt
blender::ed::sculpt_paint::StrokeCache * cache
Definition BKE_paint.hh:427
char needs_flush_to_id
Definition BKE_paint.hh:497
void(* id_remap)(ScrArea *area, SpaceLink *sl, const blender::bke::id::IDRemapper &mappings)
View3D_Runtime runtime
struct View3D * localvd
struct UndoStack * undo_stack
wmOperatorType * ot
Definition wm_files.cc:4125
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)