[Bf-blender-cvs] [a268710873b] geometry-nodes-distribute-points: Merge branch 'master' into geometry-nodes-distribute-points
Sebastian Parborg
noreply at git.blender.org
Tue Dec 8 15:56:32 CET 2020
Commit: a268710873bd6c7447ad04ee73ef608171132b19
Author: Sebastian Parborg
Date: Tue Dec 8 15:56:25 2020 +0100
Branches: geometry-nodes-distribute-points
https://developer.blender.org/rBa268710873bd6c7447ad04ee73ef608171132b19
Merge branch 'master' into geometry-nodes-distribute-points
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_290.c
index 613bb21d525,956cf1aee8a..74101e811ec
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@@ -1226,45 -1221,27 +1223,66 @@@ void blo_do_versions_290(FileData *fd,
do_versions_point_attribute_names(&pointcloud->pdata);
}
+ /* Cryptomatte render pass */
+ if (!DNA_struct_elem_find(fd->filesdna, "ViewLayer", "short", "cryptomatte_levels")) {
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+ LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) {
+ view_layer->cryptomatte_levels = 6;
+ view_layer->cryptomatte_flag = VIEW_LAYER_CRYPTOMATTE_ACCURATE;
+ }
+ }
+ }
+ }
+
+ /**
+ * Versioning code until next subversion bump goes here.
+ *
+ * \note Be sure to check when bumping the version:
+ * - "versioning_userdef.c", #blo_do_versions_userdef
+ * - "versioning_userdef.c", #do_versions_theme
+ *
+ * \note Keep this message at the bottom of the function.
+ */
+ {
- /* Keep this block, even when empty. */
+ /* Fix inputs for the point distrubiton geometry node. A new input was added so the existing
+ * ones need to shift index one space.
+ *
+ * The for loop for the input ids is at the top level otherwise we lose the animation
+ * keyframe data.
+ * */
+ for (int input_id = 3; input_id >= 1; input_id--) {
+ FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
+ if (ntree->type == NTREE_GEOMETRY) {
+ LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
+ if (node->type != GEO_NODE_POINT_DISTRIBUTE) {
+ continue;
+ }
+ // TODO doesn't work... Random stuff I tried.
+ // for (bNodeSocket *sock = node->inputs.first; sock; sock = sock->next) {
+ // printf("Sock name: %s\n", sock->name);
+ // if (STREQ("Density", sock->name)) {
+ // BLI_strncpy(sock->name, "Maximum Density", sizeof(sock->name));
+ // /* Make sure new sockets are properly created. */
+ // node_verify_socket_templates(ntree, node);
+ // break;
+ // }
+ //}
+
+ // const size_t node_name_length = strlen(node->name);
+ // const size_t node_name_escaped_max_length = (node_name_length * 2);
+ // char *node_name_escaped = MEM_mallocN(node_name_escaped_max_length + 1,
+ // "escaped name");
+ // BLI_strescape(node_name_escaped, node->name, node_name_escaped_max_length);
+ // char *rna_path_prefix = BLI_sprintfN("nodes[\"%s\"].inputs", node_name_escaped);
+
+ // BKE_animdata_fix_paths_rename_all_ex(
+ // bmain, id, rna_path_prefix, NULL, NULL, input_id, input_id + 1, false);
+ // MEM_freeN(rna_path_prefix);
+ // MEM_freeN(node_name_escaped);
+ }
+ }
+ }
+ FOREACH_NODETREE_END;
+ }
}
}
More information about the Bf-blender-cvs
mailing list