Page MenuHome

Multires modifier not always updating external data files when .blend is saved causing changes to be lost
Open, Needs TriagePublic

Description

System Information
Operating system: Both MacOS 10.14.2 (Mojave) and Windows 10
Graphics card: GTX 1080Ti, Radeon Pro 560X 4096 MB

Blender Version
Broken: 2.8 branch (local build as of Jan 4, 2019, 11:40 EDT))

Short description of error
This is a follow-up to https://developer.blender.org/T60124. Blender now properly reads multires modifier external data when a .blend file is loaded. However, now when you make subsequent sculpt edits and save the .blend file, the changes are not always saved to the external .btx file. This causes all changes to a sculpting session to be lost.

Exact steps for others to reproduce the error
I am attaching a .blend and a .btx.

With a save followed by File->Revert changes are lost:
1 - Open attached .blend. Note that the sculpt details on the object have been read from the .btx file and are visible in the viewport.
2 - Make sure you are in sculpt mode.
3 - Make some random changes to the sculpt.
4 - Save the .blend file (CTRL-S or CMD-S).
5 - File->Revert to reload the .blend file
6 - Note that your random changes have not been saved and, in fact, have been lost.

However, a save followed by exiting Blender, restarting, and opening the .blend file does work:
1 - Open attached .blend. Note that the sculpt details on the object have been read from the .btx file and are visible in the viewport.
2 - Make sure you are in sculpt mode.
3 - Make some random changes to the sculpt.
4 - Save the .blend file (CTRL-S or CMD-S).
5 - Quit Blender
6 - Start Blender
7 - Open the .blend file
8 - Note that your random changes are present.

Details

Type
Bug

Event Timeline

I can confirm that. Looking at the file modifications times, exiting an already saved Blender writes the correct btx file to the hard disk. CTRL-S just writes the old unmodified displacement version.

This even crashes Blender:

  • ...
  • Make some random changes to the sculpt.
  • Save the .blend file (CTRL-S or CMD-S).
  • Open an another btx version with the "Path to external displacement" open file dialog.
# Blender 2.80 (sub 40), Commit date: 2019-01-04 21:18, Hash a77b63c56943
Saved "T60163-MultiResTest.blend"  # Info

# backtrace
blender8tip(BLI_system_backtrace+0x33) [0x55e26ba26a13]
blender8tip(+0x1175dc0) [0x55e26af7edc0]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f850be02f20]
blender8tip(+0x1a16075) [0x55e26b81f075]
blender8tip(BKE_subdiv_eval_final_point+0x79) [0x55e26b81fe39]
blender8tip(+0x1a13493) [0x55e26b81c493]
blender8tip(+0x1a137ac) [0x55e26b81c7ac]
blender8tip(+0x1c1ec81) [0x55e26ba27c81]
blender8tip(BLI_task_pool_work_and_wait+0x18d) [0x55e26ba278fd]
blender8tip(BLI_task_parallel_range+0x247) [0x55e26ba281c7]
blender8tip(BKE_subdiv_to_ccg+0x350) [0x55e26b81dfc0]
blender8tip(BKE_subdiv_to_ccg_mesh+0x7e) [0x55e26b81e13e]
blender8tip(+0x16741e6) [0x55e26b47d1e6]
blender8tip(+0x189881f) [0x55e26b6a181f]
blender8tip(+0x18992e1) [0x55e26b6a22e1]
blender8tip(makeDerivedMesh+0x9b) [0x55e26b6a446b]
blender8tip(BKE_object_handle_data_update+0x2af) [0x55e26b7a3aff]
blender8tip(BKE_object_eval_uber_data+0x2e) [0x55e26b7a3f0e]
blender8tip(+0x1c3d8d0) [0x55e26ba468d0]
blender8tip(BLI_task_pool_work_and_wait+0x1d5) [0x55e26ba27945]
blender8tip(_ZN3DEG23deg_evaluate_on_refreshEPNS_9DepsgraphE+0x18b) [0x55e26ba46b4b]
blender8tip(BKE_scene_graph_update_tagged+0x97) [0x55e26b7de5f7]
blender8tip(wm_event_do_depsgraph+0xd0) [0x55e26af82f90]
blender8tip(wm_event_do_refresh_wm_and_depsgraph+0x85) [0x55e26af83035]
blender8tip(wm_event_do_notifiers+0x45b) [0x55e26af8965b]
blender8tip(WM_main+0x28) [0x55e26af7f898]
blender8tip(main+0x351) [0x55e26af32ec1]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f850bde5b97]
blender8tip(_start+0x2a) [0x55e26af7b4ca]