Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_proximity.cc
| Show All 17 Lines | |||||
| NODE_STORAGE_FUNCS(NodeGeometryProximity) | NODE_STORAGE_FUNCS(NodeGeometryProximity) | ||||
| static void node_declare(NodeDeclarationBuilder &b) | static void node_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>(N_("Target")) | b.add_input<decl::Geometry>(N_("Target")) | ||||
| .only_realized_data() | .only_realized_data() | ||||
| .supported_type({GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD}); | .supported_type({GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD}); | ||||
| b.add_input<decl::Vector>(N_("Source Position")).implicit_field(implicit_field_inputs::position); | b.add_input<decl::Vector>(N_("Source Position")).implicit_field(implicit_field_inputs::position); | ||||
| b.add_output<decl::Vector>(N_("Position")).dependent_field(); | b.add_output<decl::Vector>(N_("Position")).dependent_field().reference_pass_all(); | ||||
| b.add_output<decl::Float>(N_("Distance")).dependent_field(); | b.add_output<decl::Float>(N_("Distance")).dependent_field().reference_pass_all(); | ||||
| } | } | ||||
| static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) | static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) | ||||
| { | { | ||||
| uiItemR(layout, ptr, "target_element", 0, "", ICON_NONE); | uiItemR(layout, ptr, "target_element", 0, "", ICON_NONE); | ||||
| } | } | ||||
| static void geo_proximity_init(bNodeTree * /*tree*/, bNode *node) | static void geo_proximity_init(bNodeTree * /*tree*/, bNode *node) | ||||
| ▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines | |||||