diff options
Diffstat (limited to 'source/blender/nodes/NOD_geometry_exec.hh')
-rw-r--r-- | source/blender/nodes/NOD_geometry_exec.hh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/nodes/NOD_geometry_exec.hh b/source/blender/nodes/NOD_geometry_exec.hh index f5775b8a6e0..6e1f21dbae0 100644 --- a/source/blender/nodes/NOD_geometry_exec.hh +++ b/source/blender/nodes/NOD_geometry_exec.hh @@ -171,10 +171,16 @@ class GeoNodeExecParams { this->check_input_access(identifier, &CPPType::get<T>()); #endif GMutablePointer gvalue = this->extract_input(identifier); - return gvalue.relocate_out<T>(); + T value = gvalue.relocate_out<T>(); + if constexpr (std::is_same_v<T, GeometrySet>) { + this->check_input_geometry_set(identifier, value); + } + return value; } } + void check_input_geometry_set(StringRef identifier, const GeometrySet &geometry_set) const; + /** * Get input as vector for multi input socket with the given identifier. * @@ -211,7 +217,11 @@ class GeoNodeExecParams { #endif GPointer gvalue = provider_->get_input(identifier); BLI_assert(gvalue.is_type<T>()); - return *(const T *)gvalue.get(); + const T &value = *(const T *)gvalue.get(); + if constexpr (std::is_same_v<T, GeometrySet>) { + this->check_input_geometry_set(identifier, value); + } + return value; } } |