Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_proximity.cc
| Show All 25 Lines | |||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_proximity_declare(NodeDeclarationBuilder &b) | static void geo_node_proximity_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>("Target").only_realized_data().supported_type( | b.add_input<decl::Geometry>(N_("Target")) | ||||
| {GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD}); | .only_realized_data() | ||||
| b.add_input<decl::Vector>("Source Position").implicit_field(); | .supported_type({GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD}); | ||||
| b.add_output<decl::Vector>("Position").dependent_field(); | b.add_input<decl::Vector>(N_("Source Position")).implicit_field(); | ||||
| b.add_output<decl::Float>("Distance").dependent_field(); | b.add_output<decl::Vector>(N_("Position")).dependent_field(); | ||||
| b.add_output<decl::Float>(N_("Distance")).dependent_field(); | |||||
| } | } | ||||
| static void geo_node_proximity_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | static void geo_node_proximity_layout(uiLayout *layout, bContext *UNUSED(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 *UNUSED(ntree), bNode *node) | static void geo_proximity_init(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| ▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines | |||||