Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_nodes_evaluator.cc
| Show First 20 Lines • Show All 329 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| const NodeRef &node = socket.node(); | const NodeRef &node = socket.node(); | ||||
| const nodes::NodeDeclaration *node_declaration = node.declaration(); | const nodes::NodeDeclaration *node_declaration = node.declaration(); | ||||
| if (node_declaration == nullptr) { | if (node_declaration == nullptr) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| const nodes::SocketDeclaration &socket_declaration = *node_declaration->inputs()[socket.index()]; | const nodes::SocketDeclaration &socket_declaration = *node_declaration->inputs()[socket.index()]; | ||||
| if (socket_declaration.input_field_type() == nodes::InputSocketFieldType::Implicit) { | if (socket_declaration.input_field_type() == nodes::InputSocketFieldType::Implicit) { | ||||
| if (socket.typeinfo()->type == SOCK_VECTOR) { | |||||
| const bNode &bnode = *socket.bnode(); | const bNode &bnode = *socket.bnode(); | ||||
| if (socket.typeinfo()->type == SOCK_VECTOR) { | |||||
| if (bnode.type == GEO_NODE_SET_CURVE_HANDLES) { | if (bnode.type == GEO_NODE_SET_CURVE_HANDLES) { | ||||
| StringRef side = ((NodeGeometrySetCurveHandlePositions *)bnode.storage)->mode == | StringRef side = ((NodeGeometrySetCurveHandlePositions *)bnode.storage)->mode == | ||||
| GEO_NODE_CURVE_HANDLE_LEFT ? | GEO_NODE_CURVE_HANDLE_LEFT ? | ||||
| "handle_left" : | "handle_left" : | ||||
| "handle_right"; | "handle_right"; | ||||
| new (r_value) Field<float3>(bke::AttributeFieldInput::Create<float3>(side)); | new (r_value) Field<float3>(bke::AttributeFieldInput::Create<float3>(side)); | ||||
| return true; | return true; | ||||
| } | } | ||||
| new (r_value) Field<float3>(bke::AttributeFieldInput::Create<float3>("position")); | new (r_value) Field<float3>(bke::AttributeFieldInput::Create<float3>("position")); | ||||
| return true; | return true; | ||||
| } | } | ||||
| if (socket.typeinfo()->type == SOCK_INT) { | if (socket.typeinfo()->type == SOCK_INT) { | ||||
| if (ELEM(bnode.type, FN_NODE_RANDOM_VALUE, GEO_NODE_INSTANCE_ON_POINTS)) { | |||||
JacquesLucke: `GEO_NODE_INSTANCE_ON_POINTS` does not make use of that. | |||||
| new (r_value) Field<int>(std::make_shared<bke::RandomIDAttributeFieldInput>()); | |||||
| return true; | |||||
| } | |||||
| new (r_value) Field<int>(std::make_shared<fn::IndexFieldInput>()); | new (r_value) Field<int>(std::make_shared<fn::IndexFieldInput>()); | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| static void get_socket_value(const SocketRef &socket, void *r_value) | static void get_socket_value(const SocketRef &socket, void *r_value) | ||||
| ▲ Show 20 Lines • Show All 1,352 Lines • Show Last 20 Lines | |||||
GEO_NODE_INSTANCE_ON_POINTS does not make use of that.