[Bf-blender-cvs] [344c53561aa] blender-v3.3-release: Fix: Incorrect field node deduplication for shortest path nodes
Hans Goudey
noreply at git.blender.org
Sun Aug 7 21:39:40 CEST 2022
Commit: 344c53561aa8bc76091f5587e2d467f58d09ff23
Author: Hans Goudey
Date: Sun Aug 7 14:38:17 2022 -0500
Branches: blender-v3.3-release
https://developer.blender.org/rB344c53561aa8bc76091f5587e2d467f58d09ff23
Fix: Incorrect field node deduplication for shortest path nodes
Mistake in c8ae1fce6024556b72c.
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_edge_paths_to_selection.cc
M source/blender/nodes/geometry/nodes/node_geo_input_shortest_edge_paths.cc
===================================================================
diff --git a/source/blender/nodes/geometry/nodes/node_geo_edge_paths_to_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_edge_paths_to_selection.cc
index efdf0911ec9..53cbd691fdb 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_edge_paths_to_selection.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_edge_paths_to_selection.cc
@@ -110,7 +110,12 @@ class PathToEdgeSelectionFieldInput final : public GeometryFieldInput {
bool is_equal_to(const fn::FieldNode &other) const override
{
- return dynamic_cast<const PathToEdgeSelectionFieldInput *>(&other) != nullptr;
+ if (const PathToEdgeSelectionFieldInput *other_field =
+ dynamic_cast<const PathToEdgeSelectionFieldInput *>(&other)) {
+ return other_field->start_vertices_ == start_vertices_ &&
+ other_field->next_vertex_ == next_vertex_;
+ }
+ return false;
}
};
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_shortest_edge_paths.cc b/source/blender/nodes/geometry/nodes/node_geo_input_shortest_edge_paths.cc
index 89abaca3c66..ca6406d2810 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_shortest_edge_paths.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_shortest_edge_paths.cc
@@ -148,7 +148,11 @@ class ShortestEdgePathsNextVertFieldInput final : public GeometryFieldInput {
bool is_equal_to(const fn::FieldNode &other) const override
{
- return dynamic_cast<const ShortestEdgePathsNextVertFieldInput *>(&other) != nullptr;
+ if (const ShortestEdgePathsNextVertFieldInput *other_field =
+ dynamic_cast<const ShortestEdgePathsNextVertFieldInput *>(&other)) {
+ return other_field->end_selection_ == end_selection_ && other_field->cost_ == cost_;
+ }
+ return false;
}
};
@@ -215,7 +219,11 @@ class ShortestEdgePathsCostFieldInput final : public GeometryFieldInput {
bool is_equal_to(const fn::FieldNode &other) const override
{
- return dynamic_cast<const ShortestEdgePathsCostFieldInput *>(&other) != nullptr;
+ if (const ShortestEdgePathsCostFieldInput *other_field =
+ dynamic_cast<const ShortestEdgePathsCostFieldInput *>(&other)) {
+ return other_field->end_selection_ == end_selection_ && other_field->cost_ == cost_;
+ }
+ return false;
}
};
More information about the Bf-blender-cvs
mailing list