20 .supported_type(GeometryComponent::Type::Mesh)
21 .description(
"Mesh whose inner volume is converted to a density grid");
33 .description(
"Width of the gradient inside of the mesh");
42 if (!mesh || mesh->faces_num == 0) {
43 params.set_default_remaining_outputs();
47 mesh->vert_positions(),
50 params.extract_input<
float>(
"Voxel Size"),
51 params.extract_input<
float>(
"Gradient Width"),
52 params.extract_input<
float>(
"Density"));
54 params.set_default_remaining_outputs();
57 params.set_output(
"Density Grid", std::move(grid));
68 ntype.
ui_name =
"Mesh to Density Grid";
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_TO_DENSITY_GRID
#define NOD_REGISTER_NODE(REGISTER_FUNC)
StructureType structure_type
void node_register_type(bNodeType &ntype)
static void node_geo_exec(GeoNodeExecParams params)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
void node_geo_exec_with_missing_openvdb(GeoNodeExecParams ¶ms)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
const Mesh * get_mesh() const
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare