Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/intern/node_geometry_exec.cc
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "BKE_curves.hh" | #include "BKE_curves.hh" | ||||
| #include "BKE_type_conversions.hh" | #include "BKE_type_conversions.hh" | ||||
| #include "NOD_geometry_exec.hh" | #include "NOD_geometry_exec.hh" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| void GeoNodeExecParams::error_message_add(const NodeWarningType type, std::string message) const | void GeoNodeExecParams::error_message_add(const NodeWarningType type, | ||||
| const StringRef message) const | |||||
| { | { | ||||
| if (geo_eval_log::GeoTreeLogger *tree_logger = this->get_local_tree_logger()) { | if (geo_eval_log::GeoTreeLogger *tree_logger = this->get_local_tree_logger()) { | ||||
| tree_logger->node_warnings.append({node_.name, {type, std::move(message)}}); | tree_logger->node_warnings.append({tree_logger->allocator->copy_string(node_.name), | ||||
| {type, tree_logger->allocator->copy_string(message)}}); | |||||
| } | } | ||||
| } | } | ||||
| void GeoNodeExecParams::used_named_attribute(std::string attribute_name, | void GeoNodeExecParams::used_named_attribute(const StringRef attribute_name, | ||||
| const NamedAttributeUsage usage) | const NamedAttributeUsage usage) | ||||
| { | { | ||||
| if (geo_eval_log::GeoTreeLogger *tree_logger = this->get_local_tree_logger()) { | if (geo_eval_log::GeoTreeLogger *tree_logger = this->get_local_tree_logger()) { | ||||
| tree_logger->used_named_attributes.append({node_.name, std::move(attribute_name), usage}); | tree_logger->used_named_attributes.append({tree_logger->allocator->copy_string(node_.name), | ||||
| tree_logger->allocator->copy_string(attribute_name), | |||||
| usage}); | |||||
| } | } | ||||
| } | } | ||||
| void GeoNodeExecParams::check_input_geometry_set(StringRef identifier, | void GeoNodeExecParams::check_input_geometry_set(StringRef identifier, | ||||
| const GeometrySet &geometry_set) const | const GeometrySet &geometry_set) const | ||||
| { | { | ||||
| const SocketDeclaration &decl = *node_.input_by_identifier(identifier).runtime->declaration; | const SocketDeclaration &decl = *node_.input_by_identifier(identifier).runtime->declaration; | ||||
| const decl::Geometry *geo_decl = dynamic_cast<const decl::Geometry *>(&decl); | const decl::Geometry *geo_decl = dynamic_cast<const decl::Geometry *>(&decl); | ||||
| ▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines | |||||