Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_300.c
| Show First 20 Lines • Show All 2,081 Lines • ▼ Show 20 Lines | */ | ||||
| LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { | LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { | ||||
| if (ntree->type != NTREE_GEOMETRY) { | if (ntree->type != NTREE_GEOMETRY) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| version_node_id(ntree, FN_NODE_SLICE_STRING, "FunctionNodeSliceString"); | version_node_id(ntree, FN_NODE_SLICE_STRING, "FunctionNodeSliceString"); | ||||
| version_geometry_nodes_set_position_node_offset(ntree); | version_geometry_nodes_set_position_node_offset(ntree); | ||||
| } | } | ||||
| /* Keep this block, even when empty. */ | /* Keep this block, even when empty. */ | ||||
| /* Add storage to viewer node. */ | |||||
| LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { | |||||
| if (ntree->type != NTREE_GEOMETRY) { | |||||
| continue; | |||||
| } | |||||
| LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | |||||
| if (node->type == GEO_NODE_VIEWER) { | |||||
| if (node->storage == NULL) { | |||||
| NodeGeometryViewer *data = (NodeGeometryViewer *)MEM_callocN( | |||||
| sizeof(NodeGeometryViewer), __func__); | |||||
| data->data_type = CD_PROP_FLOAT; | |||||
| node->storage = data; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||