diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-15 18:25:41 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-15 18:25:41 +0300 |
commit | 5b6ae0523e18fbc94ba523e20f6c783cb8b3aa89 (patch) | |
tree | 478091477aea6fc67186cfcf2ddcd17a214b1366 /source | |
parent | ca2be6912d7dd8b6770a2c00e62d33c7653c21c2 (diff) | |
parent | da9b1b14ed0ffd29fcff8f4ca64fff5f034532fc (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 1 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 3 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/physics/dynamicpaint_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 2 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_pointcache.c | 2 | ||||
-rw-r--r-- | source/blender/editors/undo/ed_undo.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/ed_util.c | 4 |
9 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 9b79415f006..6a59ea4439f 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -805,6 +805,7 @@ bGPdata *BKE_gpencil_data_duplicate(Main *bmain, const bGPdata *gpd_src, bool in return gpd_dst; } else { + BLI_assert(bmain != NULL); bGPdata *gpd_copy; BKE_id_copy_ex(bmain, &gpd_src->id, (ID **)&gpd_copy, 0, false); return gpd_copy; diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index 5e2be7c41f0..d35df8bc380 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -179,7 +179,7 @@ void gpencil_undo_push(bGPdata *gpd) /* create new undo node */ undo_node = MEM_callocN(sizeof(bGPundonode), "gpencil undo node"); - undo_node->gpd = BKE_gpencil_data_duplicate(G.main, gpd, true); + undo_node->gpd = BKE_gpencil_data_duplicate(NULL, gpd, true); cur_node = undo_node; diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index a67a7740908..ac7bbb12912 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1811,7 +1811,8 @@ static void search_id_collection(StructRNA *ptype, PointerRNA *ptr, PropertyRNA StructRNA *srna; /* look for collection property in Main */ - RNA_main_pointer_create(G.main, ptr); + /* Note: using global Main is OK-ish here, UI shall not access other Mains anyay... */ + RNA_main_pointer_create(G_MAIN, ptr); *prop = NULL; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index e18758a5a58..64e6b477abe 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -363,7 +363,7 @@ void EDBM_mesh_load(Main *bmain, Object *ob) * cycles. */ #if 0 - for (Object *other_object = G.main->object.first; + for (Object *other_object = bmain->object.first; other_object != NULL; other_object = other_object->id.next) { diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index f45ee050ef9..7f74dd4666a 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -316,7 +316,7 @@ static void dpaint_bake_endjob(void *customdata) G.is_rendering = false; BKE_spacedata_draw_locks(false); - WM_set_locked_interface(G.main->wm.first, false); + WM_set_locked_interface(G_MAIN->wm.first, false); /* Bake was successful: * Report for ended bake and how long it took */ diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 130dcba060d..904e4242ed1 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -399,7 +399,7 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid /* XXX: This can't be used due to an anim sys optimization that ignores recalc object animation, * leaving it for the depgraph (this ignores object animation such as modifier properties though... :/ ) - * --> BKE_animsys_evaluate_all_animation(G.main, eval_time); + * --> BKE_animsys_evaluate_all_animation(CTX_data_main(C), eval_time); * This doesn't work with drivers: * --> BKE_animsys_evaluate_animdata(&fsDomain->id, fsDomain->adt, eval_time, ADT_RECALC_ALL); */ diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index a66dbfc789d..343804726bf 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -140,7 +140,7 @@ static void ptcache_job_endjob(void *customdata) G.is_rendering = false; BKE_spacedata_draw_locks(false); - WM_set_locked_interface(G.main->wm.first, false); + WM_set_locked_interface(G_MAIN->wm.first, false); WM_main_add_notifier(NC_SCENE | ND_FRAME, scene); WM_main_add_notifier(NC_OBJECT | ND_POINTCACHE, job->baker->pid.ob); diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c index a28e24bc0f7..c4bfe83ed4c 100644 --- a/source/blender/editors/undo/ed_undo.c +++ b/source/blender/editors/undo/ed_undo.c @@ -205,7 +205,7 @@ bool ED_undo_is_valid(const bContext *C, const char *undoname) */ UndoStack *ED_undo_stack_get(void) { - wmWindowManager *wm = G.main->wm.first; + wmWindowManager *wm = G_MAIN->wm.first; return wm->undo_stack; } diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index a829f8c1144..549b9b7de77 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -145,8 +145,8 @@ void ED_editors_exit(bContext *C) return; /* frees all editmode undos */ - if (G.main->wm.first) { - wmWindowManager *wm = G.main->wm.first; + if (G_MAIN->wm.first) { + wmWindowManager *wm = G_MAIN->wm.first; /* normally we don't check for NULL undo stack, do here since it may run in different context. */ if (wm->undo_stack) { BKE_undosys_stack_destroy(wm->undo_stack); |