[Bf-blender-cvs] [4bf751be701] blender2.8: Merge branch 'master' into blender2.8
Bastien Montagne
noreply at git.blender.org
Thu Jun 14 12:40:03 CEST 2018
Commit: 4bf751be7012827758b5b2ae844e370028921bd2
Author: Bastien Montagne
Date: Thu Jun 14 12:39:52 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB4bf751be7012827758b5b2ae844e370028921bd2
Merge branch 'master' into blender2.8
Conflicts:
source/blender/modifiers/intern/MOD_normal_edit.c
source/blender/windowmanager/intern/wm_files.c
===================================================================
===================================================================
diff --cc source/blender/modifiers/intern/MOD_normal_edit.c
index 08dbcf81256,0cf24d312dd..935d99e4a21
--- a/source/blender/modifiers/intern/MOD_normal_edit.c
+++ b/source/blender/modifiers/intern/MOD_normal_edit.c
@@@ -278,11 -273,10 +279,11 @@@ static void normalEditModifier_do_radia
mix_limit, mix_mode, num_verts, mloop, loopnors, nos, num_loops);
}
- if (polygons_check_flip(mloop, nos, &mesh->ldata, mpoly, polynors, num_polys)) {
- if (do_polynors_fix && polygons_check_flip(mloop, nos, dm->getLoopDataLayout(dm), mpoly, polynors, num_polys)) {
- dm->dirty |= DM_DIRTY_TESS_CDLAYERS;
++ if (do_polynors_fix && polygons_check_flip(mloop, nos, &mesh->ldata, mpoly, polynors, num_polys)) {
+ /* XXX TODO is this still needed? */
+ // mesh->dirty |= DM_DIRTY_TESS_CDLAYERS;
/* We need to recompute vertex normals! */
- dm->calcNormals(dm);
+ BKE_mesh_calc_normals(mesh);
}
BKE_mesh_normals_loop_custom_set(mvert, num_verts, medge, num_edges, mloop, nos, num_loops,
@@@ -301,8 -295,10 +302,9 @@@ static void normalEditModifier_do_direc
MVert *mvert, const int num_verts, MEdge *medge, const int num_edges,
MLoop *mloop, const int num_loops, MPoly *mpoly, const int num_polys)
{
+ const bool do_polynors_fix = (enmd->flag & MOD_NORMALEDIT_NO_POLYNORS_FIX) == 0;
const bool use_parallel_normals = (enmd->flag & MOD_NORMALEDIT_USE_DIRECTION_PARALLEL) != 0;
- float (*cos)[3] = MEM_malloc_arrayN((size_t)num_verts, sizeof(*cos), __func__);
float (*nos)[3] = MEM_malloc_arrayN((size_t)num_loops, sizeof(*nos), __func__);
float target_co[3];
@@@ -357,8 -353,8 +359,8 @@@
mix_limit, mix_mode, num_verts, mloop, loopnors, nos, num_loops);
}
- if (polygons_check_flip(mloop, nos, &mesh->ldata, mpoly, polynors, num_polys)) {
- if (do_polynors_fix && polygons_check_flip(mloop, nos, dm->getLoopDataLayout(dm), mpoly, polynors, num_polys)) {
- dm->dirty |= DM_DIRTY_TESS_CDLAYERS;
++ if (do_polynors_fix && polygons_check_flip(mloop, nos, &mesh->ldata, mpoly, polynors, num_polys)) {
+ mesh->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
}
BKE_mesh_normals_loop_custom_set(mvert, num_verts, medge, num_edges, mloop, nos, num_loops,
diff --cc source/blender/windowmanager/intern/wm_files.c
index 3aaec875627,d110f7cd3ed..5e58571cdbf
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@@ -483,7 -467,7 +484,7 @@@ static void wm_file_read_post(bContext
CTX_wm_window_set(C, wm->windows.first);
ED_editors_init(C);
- DEG_on_visible_update(CTX_data_main(C), true);
- DAG_on_visible_update(bmain, true);
++ DEG_on_visible_update(bmain, true);
#ifdef WITH_PYTHON
if (is_startup_file) {
@@@ -513,14 -497,19 +514,14 @@@
WM_operatortype_last_properties_clear_all();
/* important to do before NULL'ing the context */
- BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_VERSION_UPDATE);
- BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
+ BLI_callback_exec(bmain, NULL, BLI_CB_EVT_VERSION_UPDATE);
+ BLI_callback_exec(bmain, NULL, BLI_CB_EVT_LOAD_POST);
- /* Would otherwise be handled by event loop.
- *
- * Disabled for startup file, since it causes problems when PyDrivers are used in the startup file.
- * While its possible state of startup file may be wrong,
- * in this case users nearly always load a file to replace the startup file. */
- if (G.background && (is_startup_file == false)) {
- BKE_scene_update_tagged(bmain->eval_ctx, bmain, CTX_data_scene(C));
- }
-
+#if 1
WM_event_add_notifier(C, NC_WM | ND_FILEREAD, NULL);
+#else
+ WM_msg_publish_static(CTX_wm_message_bus(C), WM_MSG_STATICTYPE_FILE_READ);
+#endif
/* report any errors.
* currently disabled if addons aren't yet loaded */
@@@ -1413,10 -1404,10 +1415,10 @@@ static int wm_homefile_write_exec(bCont
return OPERATOR_CANCELLED;
}
- BLI_callback_exec(G.main, NULL, BLI_CB_EVT_SAVE_PRE);
+ BLI_callback_exec(bmain, NULL, BLI_CB_EVT_SAVE_PRE);
/* check current window and close it if temp */
- if (win && win->screen->temp)
+ if (win && WM_window_is_temp_screen(win))
wm_window_close(C, wm, win);
/* update keymaps in user preferences */
@@@ -1429,9 -1420,9 +1431,9 @@@
ED_editors_flush_edits(C, false);
/* force save as regular blend file */
- fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_HISTORY);
+ fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY);
- if (BLO_write_file(CTX_data_main(C), filepath, fileflags | G_FILE_USERPREFS, op->reports, NULL) == 0) {
+ if (BLO_write_file(bmain, filepath, fileflags | G_FILE_USERPREFS, op->reports, NULL) == 0) {
printf("fail\n");
return OPERATOR_CANCELLED;
}
More information about the Bf-blender-cvs
mailing list