Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_290.c
| Context not available. | |||||
| #include "DNA_genfile.h" | #include "DNA_genfile.h" | ||||
| #include "DNA_gpencil_modifier_types.h" | #include "DNA_gpencil_modifier_types.h" | ||||
| #include "DNA_gpencil_types.h" | #include "DNA_gpencil_types.h" | ||||
| #include "DNA_mesh_types.h" | |||||
| #include "DNA_meshdata_types.h" | |||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #include "DNA_object_force_types.h" | #include "DNA_object_force_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| Context not available. | |||||
| #include "BKE_gpencil.h" | #include "BKE_gpencil.h" | ||||
| #include "BKE_lib_id.h" | #include "BKE_lib_id.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_mesh.h" | |||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BLO_readfile.h" | #include "BLO_readfile.h" | ||||
| Context not available. | |||||
| { | { | ||||
| UNUSED_VARS(fd); | UNUSED_VARS(fd); | ||||
| if (MAIN_VERSION_ATLEAST(bmain, 290, 2) && MAIN_VERSION_OLDER(bmain, 291, 1)) { | |||||
| /* In this range, the extrude manifold could generate meshes with a degenerated face. */ | |||||
| LISTBASE_FOREACH (Mesh *, me, &bmain->meshes) { | |||||
| for (MPoly *mp = me->mpoly, *mp_end = mp + me->totpoly; mp < mp_end; mp++) { | |||||
| if (mp->totloop == 2) { | |||||
| bool changed; | |||||
| BKE_mesh_validate_arrays(me, | |||||
| me->mvert, | |||||
| me->totvert, | |||||
| me->medge, | |||||
| me->totedge, | |||||
| me->mface, | |||||
| me->totface, | |||||
| me->mloop, | |||||
| me->totloop, | |||||
| me->mpoly, | |||||
| me->totpoly, | |||||
| me->dvert, | |||||
| false, | |||||
| true, | |||||
| &changed); | |||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| /** Repair files from duplicate brushes added to blend files, see: T76738. */ | /** Repair files from duplicate brushes added to blend files, see: T76738. */ | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 290, 2)) { | if (!MAIN_VERSION_ATLEAST(bmain, 290, 2)) { | ||||
| { | { | ||||
| Context not available. | |||||