27 "Number of vertices on the line");
32 .description(
"Length of each individual edge");
37 .default_value({0.0f, 0.0f, 1.0f})
40 "In offset mode, the distance between each socket on each axis. In end points mode, the "
41 "position of the final vertex");
62 node->storage = node_storage;
98 else if (
params.node_tree().typeinfo->validate_link(
102 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
104 params.connect_available_socket(node,
"Count");
107 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
110 params.connect_available_socket(node,
"Resolution");
113 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
114 params.connect_available_socket(node,
"Start Location");
117 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
118 params.connect_available_socket(node,
"Offset");
122 bNode &node =
params.add_node(
"GeometryNodeMeshLine");
124 params.connect_available_socket(node,
"Offset");
136 Mesh *mesh =
nullptr;
141 const float3 total_delta = end - start;
145 const float resolution = std::max(
params.extract_input<
float>(
"Resolution"), 0.0001f);
151 const int count =
params.extract_input<
int>(
"Count");
163 const int count =
params.extract_input<
int>(
"Count");
181 "Specify the offset from one vertex to the next"},
186 "Specify the line's start and end points"},
187 {0,
nullptr, 0,
nullptr,
nullptr},
195 "Specify the total number of vertices"},
200 "Specify the distance between vertices"},
201 {0,
nullptr, 0,
nullptr,
nullptr},
General operations, lookup, etc. for materials.
void BKE_id_material_eval_ensure_default_slot(struct ID *id)
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
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)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
Vector< SocketDeclaration * > outputs
local_group_size(16, 16) .push_constant(Type b
draw_view in_light_buf[] float
void node_set_socket_availability(bNodeTree *ntree, bNodeSocket *sock, bool is_available)
void node_type_storage(bNodeType *ntype, const char *storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void node_register_type(bNodeType *ntype)
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, int type, const char *name, short nclass)
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
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
void(* updatefunc)(bNodeTree *ntree, bNode *node)