10# include "openvdb/tools/GridOperators.h"
18 b.add_output<
decl::Vector>(
"Gradient").structure_type(StructureType::Grid);
26 params.set_default_remaining_outputs();
29 bke::VolumeTreeAccessToken tree_token;
30 const openvdb::FloatGrid &vdb_grid = grid.grid(tree_token);
31 openvdb::Vec3SGrid::Ptr gradient_vdb_grid = openvdb::tools::gradient(vdb_grid);
42 ntype.
ui_name =
"Grid Gradient";
44 "Calculate the direction and magnitude of the change in values of a scalar grid";
#define NODE_CLASS_GEOMETRY
#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)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare