Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_290.c
| Show First 20 Lines • Show All 1,665 Lines • ▼ Show 20 Lines | void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) | ||||
| * \note Be sure to check when bumping the version: | * \note Be sure to check when bumping the version: | ||||
| * - "versioning_userdef.c", #blo_do_versions_userdef | * - "versioning_userdef.c", #blo_do_versions_userdef | ||||
| * - "versioning_userdef.c", #do_versions_theme | * - "versioning_userdef.c", #do_versions_theme | ||||
| * | * | ||||
| * \note Keep this message at the bottom of the function. | * \note Keep this message at the bottom of the function. | ||||
| */ | */ | ||||
| { | { | ||||
| /* Keep this block, even when empty. */ | /* Keep this block, even when empty. */ | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 293, 6)) { | |||||
| FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | |||||
| if (ntree->type != NTREE_GEOMETRY) { | |||||
| continue; | |||||
| } | |||||
| LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | |||||
| if (node->type == GEO_NODE_POINT_INSTANCE && node->storage == NULL) { | |||||
| NodeAttributeRandomize *data = (NodeAttributeRandomize *)MEM_callocN( | |||||
| sizeof(NodeAttributeRandomize), __func__); | |||||
| data->data_type = node->custom1; | |||||
| data->operation = GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE; | |||||
| node->storage = data; | |||||
| } | |||||
| } | |||||
| } | |||||
| FOREACH_NODETREE_END; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||