diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-05-13 21:59:54 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-05-13 23:05:23 +0400 |
commit | 33df6aa12ea6f627b5b238e6eec64cffb2acdbd4 (patch) | |
tree | a2cd38a29091f349b9850e42ee59a4b3ce5600fb /source/blender/editors/util/undo.c | |
parent | 9531091eb8ec4c8c7e62d727f962e19c334e7ef2 (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/editors/util/undo.c')
-rw-r--r-- | source/blender/editors/util/undo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index a4f2c36f250..4d14323a20b 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -489,7 +489,7 @@ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem) name = undo_editmode_get_name(C, i, &active); } else if (undosys == UNDOSYSTEM_IMAPAINT) { - name = ED_undo_paint_get_name(UNDO_PAINT_IMAGE, i, &active); + name = ED_undo_paint_get_name(C, UNDO_PAINT_IMAGE, i, &active); } else { name = BKE_undo_get_name(i, &active); |