Commit: 262ea626dfc3db711454683abf5e0e7e6d971f52
Author: Martijn Versteegh
Date: Fri Dec 23 14:56:52 2022 +0100
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB262ea626dfc3db711454683abf5e0e7e6d971f52
In certain locations where it is unclear if we should check for CD_MLOOPUV or
CD_PROP_FLOAT, just do both.
===================================================================
M source/blender/blenkernel/intern/customdata.cc
M source/blender/blenloader/intern/versioning_280.c
===================================================================
diff --git a/source/blender/blenkernel/intern/customdata.cc
b/source/blender/blenkernel/intern/customdata.cc
index cb43a962785..fd623dd6d22 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -4416,8 +4416,7 @@ static bool
CustomData_layer_ensure_data_exists(CustomDataLayer *layer, size_t c
/* When more instances of corrupt files are found, add them here. */
case CD_PROP_BOOL: /* See T84935. */
case CD_MLOOPUV: /* See T90620. */
- /* TODO(@Baardaap) check if this is run before or after versioning. If
after we need to add
- * #CD_PROP_FLOAT2 to the list? */
+ case CD_PROP_FLOAT2: /* See T90620. */
layer->data = MEM_calloc_arrayN(count, typeInfo->size,
layerType_getName(layer->type));
BLI_assert(layer->data);
if (typeInfo->set_default_value) {
diff --git a/source/blender/blenloader/intern/versioning_280.c
b/source/blender/blenloader/intern/versioning_280.c
index ffb87949234..c12f03ce399 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1798,7 +1798,7 @@ void blo_do_versions_280(FileData *fd, Library
*UNUSED(lib), Main *bmain)
if (DNA_struct_find(fd->filesdna, "MTexPoly")) {
for (Mesh *me = bmain->meshes.first; me; me = me->id.next) {
/* If we have UV's, so this file will have MTexPoly layers too! */
- if (CustomData_has_layer(&me->ldata, CD_MLOOPUV)) {
+ if (CustomData_has_layer(&me->ldata, CD_MLOOPUV) ||
CustomData_has_layer(&me->ldata, CD_PROP_FLOAT2)) {
CustomData_update_typemap(&me->pdata);
CustomData_free_layers(&me->pdata, CD_MTEXPOLY, me->totpoly);
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs