[Bf-blender-cvs] [f4f84a1f790] temp-node-error-messages: Merge branch 'master' into temp-node-error-messages
Hans Goudey
noreply at git.blender.org
Wed Feb 3 04:04:17 CET 2021
Commit: f4f84a1f790ba9e33bde14a0650f0abeb25fdcea
Author: Hans Goudey
Date: Tue Feb 2 12:59:08 2021 -0600
Branches: temp-node-error-messages
https://developer.blender.org/rBf4f84a1f790ba9e33bde14a0650f0abeb25fdcea
Merge branch 'master' into temp-node-error-messages
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/node.cc
index 47aac158eff,39e23e34341..7855ce603f4
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@@ -264,14 -211,10 +266,14 @@@ static void ntree_copy_data(Main *UNUSE
}
}
- BLI_ghash_free(new_pointers, NULL, NULL);
+ BLI_ghash_free(new_pointers, nullptr, nullptr);
/* node tree will generate its own interface type */
- ntree_dst->interface_type = NULL;
+ ntree_dst->interface_type = nullptr;
+
+ /* Don't copy error messages in the runtime struct.
+ * They should be filled during execution anyway. */
+ ntree_dst->runtime = nullptr;
}
static void ntree_free_data(ID *id)
@@@ -614,11 -553,10 +615,11 @@@ static void ntree_blend_write(BlendWrit
/* Clean up, important in undo case to reduce false detection of changed datablocks. */
ntree->init = 0; /* to set callbacks and force setting types */
ntree->is_updating = false;
- ntree->typeinfo = NULL;
- ntree->interface_type = NULL;
- ntree->progress = NULL;
- ntree->execdata = NULL;
- ntree->runtime = NULL;
+ ntree->typeinfo = nullptr;
+ ntree->interface_type = nullptr;
+ ntree->progress = nullptr;
+ ntree->execdata = nullptr;
++ ntree->runtime = nullptr;
BLO_write_id_struct(writer, bNodeTree, id_address, &ntree->id);
@@@ -644,12 -582,11 +645,12 @@@ void ntreeBlendReadData(BlendDataReade
/* note: writing and reading goes in sync, for speed */
ntree->init = 0; /* to set callbacks and force setting types */
ntree->is_updating = false;
- ntree->typeinfo = NULL;
- ntree->interface_type = NULL;
+ ntree->typeinfo = nullptr;
+ ntree->interface_type = nullptr;
- ntree->progress = NULL;
- ntree->execdata = NULL;
- ntree->runtime = NULL;
+ ntree->progress = nullptr;
+ ntree->execdata = nullptr;
++ ntree->runtime = nullptr;
BLO_read_data_address(reader, &ntree->adt);
BKE_animdata_blend_read_data(reader, ntree->adt);
diff --cc source/blender/nodes/geometry/nodes/node_geo_point_instance.cc
index a30e554fa9a,3bd8c355124..b1de2458750
--- a/source/blender/nodes/geometry/nodes/node_geo_point_instance.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_point_instance.cc
@@@ -86,13 -90,8 +90,14 @@@ static void get_instanced_data__collect
return;
}
+ if (BLI_listbase_is_empty(&collection->children) &&
+ BLI_listbase_is_empty(&collection->gobject)) {
+ params.error_message_add(NODE_WARNING_INFO, "Collection is empty");
+ return;
+ }
+
- const bool use_whole_collection = node.custom2 == 0;
+ const bool use_whole_collection = (node_storage->flag &
+ GEO_NODE_POINT_INSTANCE_WHOLE_COLLECTION) != 0;
if (use_whole_collection) {
InstancedData instance;
instance.type = INSTANCE_DATA_TYPE_COLLECTION;
More information about the Bf-blender-cvs
mailing list