Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-05-13 21:59:54 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-05-13 23:05:23 +0400
commit33df6aa12ea6f627b5b238e6eec64cffb2acdbd4 (patch)
treea2cd38a29091f349b9850e42ee59a4b3ce5600fb /source/blender/bmesh/intern/bmesh_log.h
parent9531091eb8ec4c8c7e62d727f962e19c334e7ef2 (diff)
Fix T39196, Dynamic Topology Undo Applied to Wrong Mesh
Undoing nodes that do not belong to the current object will cause the saved bmesh log entry to be reverted instead. This entry can belong to another object though. This is easy to fix by enforcing name matching (this was borrowed by edit mode but can definitely be improved) between current object name and undo node name and deleting older entries. However there are complications. Deleting dyntopo entries in this way can leave a brush stroke as first dyntopo log entry. This can present issues if we attempt to delete that entry since it's deleted mesh elements may now have had their ids (which would still be valid at the time) cleaned up. This can result in crashing if we attempt to resculpt on the mesh. To fix this I have disabled releasing the deleted entries. This entanglement between bm_log and undo is quite volatile but I hope the system works better now. Also minor cleanup, fix unneeded check warning
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_log.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_log.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_log.h b/source/blender/bmesh/intern/bmesh_log.h
index 7a26506439f..2147b5c64b4 100644
--- a/source/blender/bmesh/intern/bmesh_log.h
+++ b/source/blender/bmesh/intern/bmesh_log.h
@@ -51,6 +51,9 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log);
/* Start a new log entry and update the log entry list */
BMLogEntry *BM_log_entry_add(BMLog *log);
+/* Mark all used ids as unused for this node */
+void BM_log_cleanup_entry(BMLogEntry *entry);
+
/* Remove an entry from the log */
void BM_log_entry_drop(BMLogEntry *entry);