Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/NOD_geometry_exec.hh
| Show All 15 Lines | |||||
| #pragma once | #pragma once | ||||
| #include "FN_generic_value_map.hh" | #include "FN_generic_value_map.hh" | ||||
| #include "BKE_attribute_access.hh" | #include "BKE_attribute_access.hh" | ||||
| #include "BKE_geometry_set.hh" | #include "BKE_geometry_set.hh" | ||||
| #include "BKE_geometry_set_instances.hh" | #include "BKE_geometry_set_instances.hh" | ||||
| #include "BKE_node_ui_storage.hh" | |||||
| #include "BKE_persistent_data_handle.hh" | #include "BKE_persistent_data_handle.hh" | ||||
| #include "DNA_node_types.h" | #include "DNA_node_types.h" | ||||
| struct Depsgraph; | struct Depsgraph; | ||||
| struct ModifierData; | |||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| using bke::BooleanReadAttribute; | using bke::BooleanReadAttribute; | ||||
| using bke::BooleanWriteAttribute; | using bke::BooleanWriteAttribute; | ||||
| using bke::Color4fReadAttribute; | using bke::Color4fReadAttribute; | ||||
| using bke::Color4fWriteAttribute; | using bke::Color4fWriteAttribute; | ||||
| using bke::Float2ReadAttribute; | using bke::Float2ReadAttribute; | ||||
| Show All 13 Lines | |||||
| using bke::WriteAttributePtr; | using bke::WriteAttributePtr; | ||||
| using fn::CPPType; | using fn::CPPType; | ||||
| using fn::GMutablePointer; | using fn::GMutablePointer; | ||||
| using fn::GPointer; | using fn::GPointer; | ||||
| using fn::GValueMap; | using fn::GValueMap; | ||||
| class GeoNodeExecParams { | class GeoNodeExecParams { | ||||
| private: | private: | ||||
| bNodeTree &ntree_; | |||||
JacquesLucke: orig vs cow | |||||
| const bNode &node_; | const bNode &node_; | ||||
| GValueMap<StringRef> &input_values_; | GValueMap<StringRef> &input_values_; | ||||
| GValueMap<StringRef> &output_values_; | GValueMap<StringRef> &output_values_; | ||||
| const PersistentDataHandleMap &handle_map_; | const PersistentDataHandleMap &handle_map_; | ||||
| const Object *self_object_; | const Object *self_object_; | ||||
| const ModifierData *modifier_; | |||||
| Depsgraph *depsgraph_; | Depsgraph *depsgraph_; | ||||
| public: | public: | ||||
| GeoNodeExecParams(const bNode &node, | GeoNodeExecParams(bNodeTree &ntree, | ||||
| const bNode &node, | |||||
| GValueMap<StringRef> &input_values, | GValueMap<StringRef> &input_values, | ||||
| GValueMap<StringRef> &output_values, | GValueMap<StringRef> &output_values, | ||||
| const PersistentDataHandleMap &handle_map, | const PersistentDataHandleMap &handle_map, | ||||
| const Object *self_object, | const Object *self_object, | ||||
| const ModifierData *modifier, | |||||
| Depsgraph *depsgraph) | Depsgraph *depsgraph) | ||||
| : node_(node), | : ntree_(ntree), | ||||
| node_(node), | |||||
| input_values_(input_values), | input_values_(input_values), | ||||
| output_values_(output_values), | output_values_(output_values), | ||||
| handle_map_(handle_map), | handle_map_(handle_map), | ||||
| self_object_(self_object), | self_object_(self_object), | ||||
| modifier_(modifier), | |||||
| depsgraph_(depsgraph) | depsgraph_(depsgraph) | ||||
| { | { | ||||
| } | } | ||||
| /** | /** | ||||
| * Get the input value for the input socket with the given identifier. | * Get the input value for the input socket with the given identifier. | ||||
| * | * | ||||
| * The node calling becomes responsible for destructing the value before it is done | * The node calling becomes responsible for destructing the value before it is done | ||||
| ▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | #endif | ||||
| } | } | ||||
| Depsgraph *depsgraph() const | Depsgraph *depsgraph() const | ||||
| { | { | ||||
| return depsgraph_; | return depsgraph_; | ||||
| } | } | ||||
| /** | /** | ||||
| * Add an error message displayed at the top of the node when displaying the node tree, | |||||
| * and potentially elsewhere in Blender. | |||||
| */ | |||||
| 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 | * Creates a read-only attribute based on node inputs. The method automatically detects which | ||||
| * input with the given name is available. | * input socket with the given name is available. | ||||
| */ | */ | ||||
| ReadAttributePtr get_input_attribute(const StringRef name, | ReadAttributePtr get_input_attribute(const StringRef name, | ||||
| const GeometryComponent &component, | const GeometryComponent &component, | ||||
| const AttributeDomain domain, | const AttributeDomain domain, | ||||
| const CustomDataType type, | const CustomDataType type, | ||||
| const void *default_value) const; | const void *default_value) const; | ||||
| template<typename T> | template<typename T> | ||||
| Show All 31 Lines | |||||
orig vs cow