diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-13 08:27:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-13 08:27:38 +0300 |
commit | 22c4323b2169e700fa124b3dfe56b750bc532e49 (patch) | |
tree | c9772c454ccd31df8380b4ce2a46a35834016c25 /source | |
parent | 7a084c2eee266cac01ade0fed3527586b9e2e0d2 (diff) |
Cleanup: remove commented code
Replace with brief note in warning.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index a909186c088..85c646d689c 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -322,7 +322,8 @@ void EDBM_mesh_make(Object *ob, const int select_mode, const bool add_key_index) /** * \warning This can invalidate the #Mesh runtime cache of other objects (for linked duplicates). - * Most callers should run #DEG_id_tag_update on \a ob->data, see: T46738, T46913 + * Most callers should run #DEG_id_tag_update on `ob->data`, see: T46738, T46913. + * This ensures #BKE_object_free_derived_caches runs on all objects that use this mesh. */ void EDBM_mesh_load_ex(Main *bmain, Object *ob, bool free_data) { @@ -342,25 +343,6 @@ void EDBM_mesh_load_ex(Main *bmain, Object *ob, bool free_data) .calc_object_remap = true, .update_shapekey_indices = !free_data, })); - - /* Free derived mesh. usually this would happen through depsgraph but there - * are exceptions like file save that will not cause this, and we want to - * avoid ending up with an invalid derived mesh then. - * - * Do it for all objects which shares the same mesh datablock, since their - * derived meshes might also be referencing data which was just freed, - * - * Annoying enough, but currently seems most efficient way to avoid access - * of freed data on scene update, especially in cases when there are dependency - * cycles. - */ -#if 0 - for (Object *other_object = bmain->objects.first; other_object != NULL; other_object = other_object->id.next) { - if (other_object->data == ob->data) { - BKE_object_free_derived_caches(other_object); - } - } -#endif } void EDBM_mesh_clear(BMEditMesh *em) |