Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_290.c
| Context not available. | |||||
| LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { | LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { | ||||
| LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | ||||
| if (STREQ(node->idname, "GeometryNodeRandomAttribute")) { | if (STREQ(node->idname, "GeometryNodeRandomAttribute")) { | ||||
| STRNCPY(node->idname, "GeometryNodeAttributeRandomize"); | STRNCPY(node->idname, "GeometryLegacyNodeAttributeRandomize"); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| } | } | ||||
| LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | ||||
| if (node->type == GEO_NODE_LEGACY_ATTRIBUTE_RANDOMIZE && node->storage == NULL) { | if (node->type == GEO_NODE_LEGACY_ATTRIBUTE_RANDOMIZE && node->storage == NULL) { | ||||
| NodeAttributeRandomize *data = (NodeAttributeRandomize *)MEM_callocN( | NodeLegacyAttributeRandomize *data = (NodeLegacyAttributeRandomize *)MEM_callocN( | ||||
| sizeof(NodeAttributeRandomize), __func__); | sizeof(NodeLegacyAttributeRandomize), __func__); | ||||
| data->data_type = node->custom1; | data->data_type = node->custom1; | ||||
| data->operation = GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE; | data->operation = GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE; | ||||
| node->storage = data; | node->storage = data; | ||||
| Context not available. | |||||