Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/NOD_geometry_exec.hh
| Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | bke::TypedReadAttribute<T> get_input_attribute(const StringRef name, | ||||
| const GeometryComponent &component, | const GeometryComponent &component, | ||||
| const AttributeDomain domain, | const AttributeDomain domain, | ||||
| const T &default_value) const | const T &default_value) const | ||||
| { | { | ||||
| const CustomDataType type = bke::cpp_type_to_custom_data_type(CPPType::get<T>()); | const CustomDataType type = bke::cpp_type_to_custom_data_type(CPPType::get<T>()); | ||||
| return this->get_input_attribute(name, component, domain, type, &default_value); | return this->get_input_attribute(name, component, domain, type, &default_value); | ||||
| } | } | ||||
| /** | |||||
| * 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; | |||||
| private: | private: | ||||
| /* Utilities for detecting common errors at when using this class. */ | /* Utilities for detecting common errors at when using this class. */ | ||||
| void check_extract_input(StringRef identifier, const CPPType *requested_type = nullptr) const; | void check_extract_input(StringRef identifier, const CPPType *requested_type = nullptr) const; | ||||
| void check_set_output(StringRef identifier, const CPPType &value_type) const; | void check_set_output(StringRef identifier, const CPPType &value_type) const; | ||||
| /* Find the active socket socket with the input name (not the identifier). */ | |||||
| const bNodeSocket *find_available_socket(const StringRef name) const; | |||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||