Commit: e9cf3b53471b5138d5b763822b04a7617b00be37
Author: Germano
Date:   Mon May 28 13:46:04 2018 -0300
Branches: blender2.8
https://developer.blender.org/rBe9cf3b53471b5138d5b763822b04a7617b00be37

CoW: Skip pointers that are used in Lattice edit mode.

===================================================================

M       source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc 
b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 7553c9ea644..0e8d4669108 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -438,6 +438,14 @@ void update_mball_edit_mode_pointers(const Depsgraph * 
/*depsgraph*/,
        mball_cow->editelems = mball_orig->editelems;
 }
 
+void update_lattice_edit_mode_pointers(const Depsgraph * /*depsgraph*/,
+                                     const ID *id_orig, ID *id_cow)
+{
+       const Lattice *lt_orig = (const Lattice *)id_orig;
+       Lattice *lt_cow = (Lattice *)id_cow;
+       lt_cow->editlatt = lt_orig->editlatt;
+}
+
 void update_mesh_edit_mode_pointers(const Depsgraph *depsgraph,
                                     const ID *id_orig, ID *id_cow)
 {
@@ -480,6 +488,9 @@ void update_edit_mode_pointers(const Depsgraph *depsgraph,
                case ID_MB:
                        update_mball_edit_mode_pointers(depsgraph, id_orig, 
id_cow);
                        break;
+               case ID_LT:
+                       update_lattice_edit_mode_pointers(depsgraph, id_orig, 
id_cow);
+                       break;
                default:
                        break;
        }
@@ -833,6 +844,12 @@ void discard_mball_edit_mode_pointers(ID *id_cow)
        mball_cow->editelems = NULL;
 }
 
+void discard_lattice_edit_mode_pointers(ID *id_cow)
+{
+       Lattice *lt_cow = (Lattice *)id_cow;
+       lt_cow->editlatt = NULL;
+}
+
 void discard_mesh_edit_mode_pointers(ID *id_cow)
 {
        Mesh *mesh_cow = (Mesh *)id_cow;
@@ -863,6 +880,9 @@ void discard_edit_mode_pointers(ID *id_cow)
                case ID_MB:
                        discard_mball_edit_mode_pointers(id_cow);
                        break;
+               case ID_LT:
+                       discard_lattice_edit_mode_pointers(id_cow);
+                       break;
                default:
                        break;
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to