29 "Number of vertices on the line");
34 .description(
"Length of each individual edge");
37 .description(
"Position of the first vertex");
42 "In offset mode, the distance between each socket on each axis. In end points mode, the "
43 "position of the final vertex");
104 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
106 params.connect_available_socket(node,
"Count");
109 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
112 params.connect_available_socket(node,
"Resolution");
115 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
116 params.connect_available_socket(node,
"Start Location");
119 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
120 params.connect_available_socket(node,
"Offset");
124 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
126 params.connect_available_socket(node,
"Offset");
138 Mesh *mesh =
nullptr;
143 const float3 total_delta = end - start;
147 const float resolution = std::max(
params.extract_input<
float>(
"Resolution"), 0.0001f);
153 const int count =
params.extract_input<
int>(
"Count");
165 const int count =
params.extract_input<
int>(
"Count");
183 "Specify the offset from one vertex to the next"},
188 "Specify the line's start and end points"},
189 {0,
nullptr, 0,
nullptr,
nullptr},
197 "Specify the total number of vertices"},
202 "Specify the distance between vertices"},
203 {0,
nullptr, 0,
nullptr,
nullptr},
229 ntype.
ui_description =
"Generate vertices in a line and connect them with edges";
General operations, lookup, etc. for materials.
void BKE_id_material_eval_ensure_default_slot(ID *id)
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_PRIMITIVE_LINE
GeometryNodeMeshLineCountMode
@ GEO_NODE_MESH_LINE_COUNT_RESOLUTION
@ GEO_NODE_MESH_LINE_COUNT_TOTAL
@ GEO_NODE_MESH_LINE_MODE_END_POINTS
@ GEO_NODE_MESH_LINE_MODE_OFFSET
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
Vector< SocketDeclaration * > outputs
void * MEM_callocN(size_t len, const char *str)
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(uiLayout *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)
VecBase< float, 3 > float3
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_sock_label(bNodeSocket *sock, const char *name)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
int RNA_enum_get(PointerRNA *ptr, const char *name)
struct bNodeSocket * next
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
void(* updatefunc)(bNodeTree *ntree, bNode *node)
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void use_property_decorate_set(bool is_sep)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)