Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc
| Show All 22 Lines | |||||
| #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"); | b.add_input<decl::Geometry>("Curve"); | ||||
| b.add_input<decl::Float>("Factor").min(0.0f).max(1.0f).subtype(PROP_FACTOR); | b.add_input<decl::Float>("Factor").min(0.0f).max(1.0f).subtype(PROP_FACTOR).supports_field(); | ||||
| b.add_input<decl::Float>("Length").min(0.0f).subtype(PROP_DISTANCE); | b.add_input<decl::Float>("Length").min(0.0f).subtype(PROP_DISTANCE).supports_field(); | ||||
| b.add_output<decl::Vector>("Position"); | b.add_output<decl::Vector>("Position").dependent_field(); | ||||
| b.add_output<decl::Vector>("Tangent"); | b.add_output<decl::Vector>("Tangent").dependent_field(); | ||||
| b.add_output<decl::Vector>("Normal"); | b.add_output<decl::Vector>("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 | |||||