Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc
| Show All 21 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_curve_sample_declare(NodeDeclarationBuilder &b) | static void geo_node_curve_sample_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>("Curve").only_realized_data().supported_type( | b.add_input<decl::Geometry>(N_("Curve")) | ||||
| GEO_COMPONENT_TYPE_CURVE); | .only_realized_data() | ||||
| b.add_input<decl::Float>("Factor").min(0.0f).max(1.0f).subtype(PROP_FACTOR).supports_field(); | .supported_type(GEO_COMPONENT_TYPE_CURVE); | ||||
| b.add_input<decl::Float>("Length").min(0.0f).subtype(PROP_DISTANCE).supports_field(); | b.add_input<decl::Float>(N_("Factor")).min(0.0f).max(1.0f).subtype(PROP_FACTOR).supports_field(); | ||||
| b.add_input<decl::Float>(N_("Length")).min(0.0f).subtype(PROP_DISTANCE).supports_field(); | |||||
| b.add_output<decl::Vector>("Position").dependent_field(); | |||||
| b.add_output<decl::Vector>("Tangent").dependent_field(); | b.add_output<decl::Vector>(N_("Position")).dependent_field(); | ||||
| b.add_output<decl::Vector>("Normal").dependent_field(); | b.add_output<decl::Vector>(N_("Tangent")).dependent_field(); | ||||
| b.add_output<decl::Vector>(N_("Normal")).dependent_field(); | |||||
| } | } | ||||
| static void geo_node_curve_sample_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | static void geo_node_curve_sample_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | ||||
| { | { | ||||
| uiItemR(layout, ptr, "mode", UI_ITEM_R_EXPAND, nullptr, ICON_NONE); | uiItemR(layout, ptr, "mode", UI_ITEM_R_EXPAND, nullptr, ICON_NONE); | ||||
| } | } | ||||
| static void geo_node_curve_sample_type_init(bNodeTree *UNUSED(tree), bNode *node) | static void geo_node_curve_sample_type_init(bNodeTree *UNUSED(tree), bNode *node) | ||||
| ▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines | |||||