Geometry Nodes: add missing versioning for subdivision surface node

This was missing from rBfecec1644ce54ea386eaeed5ca6748d4a7b2737b.
This commit is contained in:
Jacques Lucke
2021-08-20 12:19:24 +02:00
parent c1227fd408
commit 7d8c71e800

View File

@@ -787,5 +787,23 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
*/
{
/* Keep this block, even when empty. */
/* Add node storage for subdivision surface node. */
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
if (ntree->type == NTREE_GEOMETRY) {
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
if (node->type == GEO_NODE_SUBDIVISION_SURFACE) {
if (node->storage == NULL) {
NodeGeometrySubdivisionSurface *data = MEM_callocN(
sizeof(NodeGeometrySubdivisionSurface), __func__);
data->uv_smooth = SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES;
data->boundary_smooth = SUBSURF_BOUNDARY_SMOOTH_ALL;
node->storage = data;
}
}
}
}
}
FOREACH_NODETREE_END;
}
}