Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-02-28 21:18:22 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-02-28 21:18:22 +0300
commit96492903aa28f115a51d287c3fd4af667d996f84 (patch)
treeba5dab33fa8b81edb05c7bbd426a1d436ba9b9ee
parent8c932ab43c28d476bd0bf671ef70448f075295ef (diff)
parent44b0c70919e92f7b70f0e03eba9570ca8906ab90 (diff)
Merge branch 'blender-v3.1-release'
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.cc7
-rw-r--r--source/blender/editors/space_node/node_relationships.cc22
2 files changed, 13 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc
index 1ccccf1acf4..79a3968b94f 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.cc
+++ b/source/blender/blenkernel/intern/DerivedMesh.cc
@@ -1143,12 +1143,7 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
* we need to apply these back onto the Mesh. If we have no
* Mesh then we need to build one. */
if (mesh_final == nullptr) {
- /* NOTE: this check on cdmask is a bit dodgy, it handles the issue at stake here (see T68211),
- * but other cases might require similar handling?
- * Could be a good idea to define a proper CustomData_MeshMask for that then. */
- if (deformed_verts == nullptr && allow_shared_mesh &&
- (final_datamask.lmask & CD_MASK_NORMAL) == 0 &&
- (final_datamask.pmask & CD_MASK_NORMAL) == 0) {
+ if (deformed_verts == nullptr && allow_shared_mesh) {
mesh_final = mesh_input;
}
else {
diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc
index 1cfa932356b..299e7e5658c 100644
--- a/source/blender/editors/space_node/node_relationships.cc
+++ b/source/blender/editors/space_node/node_relationships.cc
@@ -2436,16 +2436,18 @@ void ED_node_link_insert(Main *bmain, ScrArea *area)
bNodeSocket *best_input = get_main_socket(ntree, *node_to_insert, SOCK_IN);
bNodeSocket *best_output = get_main_socket(ntree, *node_to_insert, SOCK_OUT);
- /* Ignore main sockets when the types don't match. */
- if (best_input != nullptr && ntree.typeinfo->validate_link != nullptr &&
- !ntree.typeinfo->validate_link(static_cast<eNodeSocketDatatype>(old_link->fromsock->type),
- static_cast<eNodeSocketDatatype>(best_input->type))) {
- best_input = nullptr;
- }
- if (best_output != nullptr && ntree.typeinfo->validate_link != nullptr &&
- !ntree.typeinfo->validate_link(static_cast<eNodeSocketDatatype>(best_output->type),
- static_cast<eNodeSocketDatatype>(old_link->tosock->type))) {
- best_output = nullptr;
+ if (node_to_insert->type != NODE_REROUTE) {
+ /* Ignore main sockets when the types don't match. */
+ if (best_input != nullptr && ntree.typeinfo->validate_link != nullptr &&
+ !ntree.typeinfo->validate_link(static_cast<eNodeSocketDatatype>(old_link->fromsock->type),
+ static_cast<eNodeSocketDatatype>(best_input->type))) {
+ best_input = nullptr;
+ }
+ if (best_output != nullptr && ntree.typeinfo->validate_link != nullptr &&
+ !ntree.typeinfo->validate_link(static_cast<eNodeSocketDatatype>(best_output->type),
+ static_cast<eNodeSocketDatatype>(old_link->tosock->type))) {
+ best_output = nullptr;
+ }
}
bNode *from_node = old_link->fromnode;