25 {
SOCK_VECTOR,
N_(
"Vector"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
65 for (
const int i :
result.index_range()) {
84 output_domains.
append(attribute_x->domain());
87 output_domains.
append(attribute_y->domain());
90 output_domains.
append(attribute_z->domain());
92 if (output_domains.
size() > 0) {
102 const std::string result_name_x =
params.get_input<std::string>(
"Result X");
103 const std::string result_name_y =
params.get_input<std::string>(
"Result Y");
104 const std::string result_name_z =
params.get_input<std::string>(
"Result Z");
105 if (result_name_x.empty() && result_name_y.empty() && result_name_z.empty()) {
116 "Vector",
component, result_domain, input_type,
nullptr);
117 if (!attribute_input) {
123 result_name_x, result_domain, result_type);
125 result_name_y, result_domain, result_type);
127 result_name_z, result_domain, result_type);
130 if (attribute_result_x) {
131 extract_input(0, input_span, attribute_result_x->get_span_for_write_only<
float>());
132 attribute_result_x.apply_span_and_save();
134 if (attribute_result_y) {
138 if (attribute_result_z) {
157 params.set_output(
"Geometry", geometry_set);
#define GEO_NODE_ATTRIBUTE_SEPARATE_XYZ
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
void node_type_update(struct bNodeType *ntype, void(*updatefunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
#define NODE_CLASS_ATTRIBUTE
void nodeRegisterType(struct bNodeType *ntype)
static uint8 component(Color32 c, uint i)
GeometryNodeAttributeInputMode
@ GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void apply_span_and_save()
void append(const T &value)
fn::GMutableSpan get_span_for_write_only()
void *(* MEM_callocN)(size_t len, const char *str)
AttributeDomain attribute_domain_highest_priority(Span< AttributeDomain > domains)
GeometrySet geometry_set_realize_instances(const GeometrySet &geometry_set)
std::unique_ptr< ReadAttribute > ReadAttributePtr
static void separate_attribute(GeometryComponent &component, const GeoNodeExecParams ¶ms)
static void geo_node_attribute_separate_xyz_init(bNodeTree *UNUSED(tree), bNode *node)
void update_attribute_input_socket_availabilities(bNode &node, const StringRef name, const GeometryNodeAttributeInputMode mode, const bool name_is_available)
static AttributeDomain get_result_domain(const GeometryComponent &component, StringRef source_name, StringRef result_name)
static void geo_node_attribute_separate_xyz_exec(GeoNodeExecParams params)
static void extract_input(const int index, const Span< float3 > &input, MutableSpan< float > result)
static void geo_node_attribute_separate_xyz_update(bNodeTree *UNUSED(ntree), bNode *node)
static void geo_node_attribute_separate_xyz_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static bNodeSocketTemplate geo_node_attribute_separate_xyz_in[]
static bNodeSocketTemplate geo_node_attribute_separate_xyz_out[]
void register_node_type_geo_attribute_separate_xyz()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
GeometryComponent & get_component_for_write(GeometryComponentType component_type)
bool has(const GeometryComponentType component_type) const
Compact definition of a node socket.
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)