OpenVDB  9.0.1
Typedefs | Functions
openvdb_houdini::node_info_text Namespace Reference

Namespace to hold functionality for registering info text callbacks. Whenever getNodeSpecificInfoText() is called, the default info text is added to MMB output unless a valid callback has been registered for the grid type. More...

Typedefs

using ApplyGridSpecificInfoText = void(*)(std::ostream &, const openvdb::GridBase &)
 

Functions

void registerGridSpecificInfoText (const std::string &gridType, ApplyGridSpecificInfoText callback)
 Register an info text callback to a specific grid type. More...
 
template<typename GridType >
void registerGridSpecificInfoText (ApplyGridSpecificInfoText callback)
 Register an info text callback to a templated grid type. More...
 

Detailed Description

Namespace to hold functionality for registering info text callbacks. Whenever getNodeSpecificInfoText() is called, the default info text is added to MMB output unless a valid callback has been registered for the grid type.

Use node_info_text::registerGridSpecificInfoText<> to register a grid type to a function pointer which matches the ApplyGridSpecificInfoText signature.

void floatGridText(std::ostream&, const openvdb::GridBase&);

node_info_text::registerGridSpecificInfoText<openvdb::FloatGrid>(&floatGridText);

Typedef Documentation

using ApplyGridSpecificInfoText = void (*)(std::ostream&, const openvdb::GridBase&)

Function Documentation

void openvdb_houdini::node_info_text::registerGridSpecificInfoText ( const std::string &  gridType,
ApplyGridSpecificInfoText  callback 
)

Register an info text callback to a specific grid type.

Note
Does not add the callback if the grid type already has a registered callback.
Parameters
gridTypethe grid type as a unique string (see templated registerGridSpecificInfoText<>)
callbacka pointer to the callback function to execute
void openvdb_houdini::node_info_text::registerGridSpecificInfoText ( ApplyGridSpecificInfoText  callback)
inline

Register an info text callback to a templated grid type.

Note
Does not add the callback if the grid type already has a registered callback.
Parameters
callbacka pointer to the callback function to execute