diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-04 20:32:37 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-04 20:32:37 +0300 |
commit | 101fa4a425d6723c58823484d7e7f3a98acc774f (patch) | |
tree | 77bacd993a89e31829b608d5470b57f1d08fe9e3 /source/blender | |
parent | 2373ce7fcf998203ae77f6bc1cb37eb4b4d2c5ea (diff) | |
parent | c7fcc50842d85664d2b07c32b181951ea7661440 (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 13 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 688005454c8..5ba4bbfc02b 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -4591,6 +4591,15 @@ static OutputFieldDependency get_interface_output_field_dependency(const NodeRef return socket_decl.output_field_dependency(); } +static FieldInferencingInterface get_dummy_field_inferencing_interface(const NodeRef &node) +{ + FieldInferencingInterface inferencing_interface; + inferencing_interface.inputs.append_n_times(InputSocketFieldType::None, node.inputs().size()); + inferencing_interface.outputs.append_n_times(OutputFieldDependency::ForDataSource(), + node.outputs().size()); + return inferencing_interface; +} + /** * Retrieves information about how the node interacts with fields. * In the future, this information can be stored in the node declaration. This would allow this @@ -4604,6 +4613,10 @@ static FieldInferencingInterface get_node_field_inferencing_interface(const Node if (group == nullptr) { return FieldInferencingInterface(); } + if (!ntreeIsRegistered(group)) { + /* This can happen when there is a linked node group that was not found (see T92799). */ + return get_dummy_field_inferencing_interface(node); + } if (group->field_inferencing_interface == nullptr) { /* Update group recursively. */ update_field_inferencing(*group); diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 36f19907080..f2e87b29c1f 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -4792,6 +4792,7 @@ static const char *cpp_classes = "\n" " bool operator==(const Pointer &other) const { return ptr.data == other.ptr.data; }\n" " bool operator!=(const Pointer &other) const { return ptr.data != other.ptr.data; }\n" + " bool operator<(const Pointer &other) const { return ptr.data < other.ptr.data; }\n" "\n" " PointerRNA ptr;\n" "};\n" |