32 .description(
"Number of vertices on the line");
37 .description(
"Length of each individual edge");
40 .description(
"Position of the first vertex");
45 "In offset mode, the distance between each socket on each axis. In end points mode, the "
46 "position of the final vertex")
73 node->storage = node_storage;
144 const float3 total_delta = end - start;
148 const float resolution = std::max(params.
extract_input<
float>(
"Resolution"_ustr), 0.0001f);
149 const int count =
math::length(total_delta) / resolution + 1;
159 const float3 delta = total_delta /
float(count - 1);
184 "Specify the offset from one vertex to the next"},
189 "Specify the line's start and end points"},
190 {0,
nullptr, 0,
nullptr,
nullptr},
198 "Specify the total number of vertices"},
203 "Specify the distance between vertices"},
204 {0,
nullptr, 0,
nullptr,
nullptr},
230 ntype.
ui_description =
"Generate vertices in a line and connect them with edges";
General operations, lookup, etc. for materials.
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_PRIMITIVE_LINE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
const bke::bNodeType & node_type() const
void add_item(std::string socket_name, SocketLinkOperation::LinkSocketFn fn, int weight=0)
const bNodeTree & node_tree() const
const bNodeSocket & other_socket() const
eNodeSocketInOut in_out() const
T extract_input(const UString identifier)
const bNode & node() const
void set_output(const UString identifier, T &&value)
bNode & add_node(UString idname)
void connect_available_socket(bNode &new_node, UString socket_name)
Vector< SocketDeclaration * > outputs
#define storage(slot, qualifiers)
void node_register_type(bNodeType &ntype)
void node_set_socket_availability(bNodeTree &ntree, bNodeSocket &sock, bool is_available)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
Mesh * create_line_mesh(float3 start, float3 delta, int count)
T length(const VecBase< T, Size > &a)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
static void node_geo_exec(GeoNodeExecParams params)
static void node_init(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_rna(StructRNA *srna)
static void node_update(bNodeTree *ntree, bNode *node)
static void node_register()
static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
void search_link_ops_for_declarations(GatherLinkSearchOpParams ¶ms, Span< SocketDeclaration * > declarations)
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
int RNA_enum_get(PointerRNA *ptr, const char *name)
@ GEO_NODE_MESH_LINE_MODE_END_POINTS
@ GEO_NODE_MESH_LINE_MODE_OFFSET
void BKE_id_material_eval_ensure_default_slot(ID *id)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
VecBase< float, 3 > float3
GeometryNodeMeshLineCountMode
@ GEO_NODE_MESH_LINE_COUNT_RESOLUTION
@ GEO_NODE_MESH_LINE_COUNT_TOTAL
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
GeometryNodeMeshLineCountMode count_mode
GeometryNodeMeshLineMode mode
struct bNodeSocket * next
bke::bNodeTreeType * typeinfo
bool(*) validate_link(eNodeSocketDatatype from, eNodeSocketDatatype to)
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
void(*) updatefunc(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
nodes::NodeDeclaration * static_declaration
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void use_property_decorate_set(bool is_decorate)
void use_property_split_set(bool is_sep)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)