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:
authorJulian Eisel <julian@blender.org>2022-07-20 18:25:31 +0300
committerJulian Eisel <julian@blender.org>2022-07-20 18:25:31 +0300
commit9dbcefb10e53cc809eb2e99333376b2a881c0863 (patch)
tree9ea058c2877c472aba82650e24e5927e3f03eded /source/blender/nodes/NOD_geometry_exec.hh
parente1ced645fa208b3b77e07c99cb289cf7fa659ad3 (diff)
parent85f0b2ef5d5bfb67c245da0a52aeec44e63445fa (diff)
Merge branch 'asset-browser-grid-view' into file-browser-grid-view
Diffstat (limited to 'source/blender/nodes/NOD_geometry_exec.hh')
-rw-r--r--source/blender/nodes/NOD_geometry_exec.hh63
1 files changed, 12 insertions, 51 deletions
diff --git a/source/blender/nodes/NOD_geometry_exec.hh b/source/blender/nodes/NOD_geometry_exec.hh
index bac4d0165e9..0d5ba6cf5db 100644
--- a/source/blender/nodes/NOD_geometry_exec.hh
+++ b/source/blender/nodes/NOD_geometry_exec.hh
@@ -5,34 +5,36 @@
#include "FN_field.hh"
#include "FN_multi_function_builder.hh"
-#include "BKE_attribute_access.hh"
#include "BKE_geometry_fields.hh"
#include "BKE_geometry_set.hh"
-#include "BKE_geometry_set_instances.hh"
#include "DNA_node_types.h"
#include "NOD_derived_node_tree.hh"
#include "NOD_geometry_nodes_eval_log.hh"
-#include "GEO_realize_instances.hh"
-
struct Depsgraph;
struct ModifierData;
namespace blender::nodes {
using bke::AnonymousAttributeFieldInput;
+using bke::AttributeAccessor;
using bke::AttributeFieldInput;
using bke::AttributeIDRef;
+using bke::AttributeKind;
+using bke::AttributeMetaData;
+using bke::AttributeReader;
+using bke::AttributeWriter;
+using bke::GAttributeReader;
+using bke::GAttributeWriter;
using bke::GeometryComponentFieldContext;
using bke::GeometryFieldInput;
-using bke::OutputAttribute;
-using bke::OutputAttribute_Typed;
-using bke::ReadAttributeLookup;
+using bke::GSpanAttributeWriter;
+using bke::MutableAttributeAccessor;
+using bke::SpanAttributeWriter;
using bke::StrongAnonymousAttributeID;
using bke::WeakAnonymousAttributeID;
-using bke::WriteAttributeLookup;
using fn::Field;
using fn::FieldContext;
using fn::FieldEvaluator;
@@ -40,7 +42,7 @@ using fn::FieldInput;
using fn::FieldOperation;
using fn::GField;
using fn::ValueOrField;
-using geometry_nodes_eval_log::NamedAttributeUsage;
+using geometry_nodes_eval_log::eNamedAttrUsage;
using geometry_nodes_eval_log::NodeWarningType;
/**
@@ -298,52 +300,11 @@ class GeoNodeExecParams {
*/
void error_message_add(const NodeWarningType type, std::string message) const;
- /**
- * Creates a read-only attribute based on node inputs. The method automatically detects which
- * input socket with the given name is available.
- *
- * \note This will add an error message if the string socket is active and
- * the input attribute does not exist.
- */
- GVArray get_input_attribute(const StringRef name,
- const GeometryComponent &component,
- AttributeDomain domain,
- const CustomDataType type,
- const void *default_value) const;
-
- template<typename T>
- VArray<T> get_input_attribute(const StringRef name,
- const GeometryComponent &component,
- const AttributeDomain domain,
- const T &default_value) const
- {
- const CustomDataType type = bke::cpp_type_to_custom_data_type(CPPType::get<T>());
- GVArray varray = this->get_input_attribute(name, component, domain, type, &default_value);
- return varray.typed<T>();
- }
-
- /**
- * Get the type of an input property or the associated constant socket types with the
- * same names. Fall back to the default value if no attribute exists with the name.
- */
- CustomDataType get_input_attribute_data_type(const StringRef name,
- const GeometryComponent &component,
- const CustomDataType default_type) const;
-
- /**
- * If any of the corresponding input sockets are attributes instead of single values,
- * use the highest priority attribute domain from among them.
- * Otherwise return the default domain.
- */
- AttributeDomain get_highest_priority_input_domain(Span<std::string> names,
- const GeometryComponent &component,
- AttributeDomain default_domain) const;
-
std::string attribute_producer_name() const;
void set_default_remaining_outputs();
- void used_named_attribute(std::string attribute_name, NamedAttributeUsage usage);
+ void used_named_attribute(std::string attribute_name, eNamedAttrUsage usage);
private:
/* Utilities for detecting common errors at when using this class. */