OpenVDB 13.0.1
Loading...
Searching...
No Matches
SOP_NodeVDB Class Reference

Base class from which to derive OpenVDB-related Houdini SOPs. More...

#include <openvdb_houdini/SOP_NodeVDB.h>

Public Member Functions

 SOP_NodeVDB (OP_Network *, const char *, OP_Operator *)
 ~SOP_NodeVDB () override=default
void fillInfoTreeNodeSpecific (UT_InfoTree &, const OP_NodeInfoTreeParms &) override
void getNodeSpecificInfoText (OP_Context &, OP_NodeInfoParms &) override
const SOP_NodeVerb * cookVerb () const override
 Return this node's registered verb.
const GA_PrimitiveGroup * matchGroup (GU_Detail &, const std::string &pattern)
 Retrieve a group from a geometry detail by parsing a pattern (typically, the value of a Group parameter belonging to this node).
const GA_PrimitiveGroup * matchGroup (const GU_Detail &, const std::string &pattern)
 Retrieve a group from a geometry detail by parsing a pattern (typically, the value of a Group parameter belonging to this node).
Parameter evaluation
openvdb::Vec3f evalVec3f (const char *name, fpreal time) const
 Evaluate a vector-valued parameter.
openvdb::Vec3R evalVec3R (const char *name, fpreal time) const
 Evaluate a vector-valued parameter.
openvdb::Vec3i evalVec3i (const char *name, fpreal time) const
 Evaluate a vector-valued parameter.
openvdb::Vec2R evalVec2R (const char *name, fpreal time) const
 Evaluate a vector-valued parameter.
openvdb::Vec2i evalVec2i (const char *name, fpreal time) const
 Evaluate a vector-valued parameter.
std::string evalStdString (const char *name, fpreal time, int index=0) const
 Evaluate a string-valued parameter as an STL string.

Protected Member Functions

OP_ERROR cookMyGuide1 (OP_Context &) override
void resolveRenamedParm (PRM_ParmList &obsoleteParms, const char *oldName, const char *newName)
 Transfer the value of an obsolete parameter that was renamed to the parameter with the new name.
OP_ERROR cookMySop (OP_Context &) override final
 To facilitate compilable SOPs, cookMySop() is now final. Instead, either override SOP_NodeVDB::cookVDBSop() (for a non-compilable SOP) or override SOP_VDBCacheOptions::cookVDBSop() (for a compilable SOP).
virtual OP_ERROR cookVDBSop (OP_Context &)
 To facilitate compilable SOPs, cookMySop() is now final. Instead, either override SOP_NodeVDB::cookVDBSop() (for a non-compilable SOP) or override SOP_VDBCacheOptions::cookVDBSop() (for a compilable SOP).

Detailed Description

Base class from which to derive OpenVDB-related Houdini SOPs.

Constructor & Destructor Documentation

◆ SOP_NodeVDB()

SOP_NodeVDB ( OP_Network * ,
const char * ,
OP_Operator *  )

◆ ~SOP_NodeVDB()

~SOP_NodeVDB ( )
overridedefault

Member Function Documentation

◆ cookMyGuide1()

OP_ERROR cookMyGuide1 ( OP_Context & )
overrideprotected

◆ cookMySop()

OP_ERROR cookMySop ( OP_Context & )
finaloverrideprotected

To facilitate compilable SOPs, cookMySop() is now final. Instead, either override SOP_NodeVDB::cookVDBSop() (for a non-compilable SOP) or override SOP_VDBCacheOptions::cookVDBSop() (for a compilable SOP).

◆ cookVDBSop()

virtual OP_ERROR cookVDBSop ( OP_Context & )
inlineprotectedvirtual

To facilitate compilable SOPs, cookMySop() is now final. Instead, either override SOP_NodeVDB::cookVDBSop() (for a non-compilable SOP) or override SOP_VDBCacheOptions::cookVDBSop() (for a compilable SOP).

◆ cookVerb()

const SOP_NodeVerb * cookVerb ( ) const
override

Return this node's registered verb.

◆ evalStdString()

std::string evalStdString ( const char * name,
fpreal time,
int index = 0 ) const

Evaluate a string-valued parameter as an STL string.

This method facilitates string parameter evaluation in expressions. For example,

matchGroup(*gdp, evalStdString("group", time));
std::string evalStdString(const char *name, fpreal time, int index=0) const
Evaluate a string-valued parameter as an STL string.
const GA_PrimitiveGroup * matchGroup(GU_Detail &, const std::string &pattern)
Retrieve a group from a geometry detail by parsing a pattern (typically, the value of a Group paramet...

◆ evalVec2i()

openvdb::Vec2i evalVec2i ( const char * name,
fpreal time ) const

Evaluate a vector-valued parameter.

◆ evalVec2R()

openvdb::Vec2R evalVec2R ( const char * name,
fpreal time ) const

Evaluate a vector-valued parameter.

◆ evalVec3f()

openvdb::Vec3f evalVec3f ( const char * name,
fpreal time ) const

Evaluate a vector-valued parameter.

◆ evalVec3i()

openvdb::Vec3i evalVec3i ( const char * name,
fpreal time ) const

Evaluate a vector-valued parameter.

◆ evalVec3R()

openvdb::Vec3R evalVec3R ( const char * name,
fpreal time ) const

Evaluate a vector-valued parameter.

◆ fillInfoTreeNodeSpecific()

void fillInfoTreeNodeSpecific ( UT_InfoTree & ,
const OP_NodeInfoTreeParms &  )
override

◆ getNodeSpecificInfoText()

void getNodeSpecificInfoText ( OP_Context & ,
OP_NodeInfoParms &  )
override

◆ matchGroup() [1/2]

const GA_PrimitiveGroup * matchGroup ( const GU_Detail & ,
const std::string & pattern )

Retrieve a group from a geometry detail by parsing a pattern (typically, the value of a Group parameter belonging to this node).

Exceptions
std::runtime_errorif the pattern is nonempty but doesn't match any group.

◆ matchGroup() [2/2]

const GA_PrimitiveGroup * matchGroup ( GU_Detail & ,
const std::string & pattern )

Retrieve a group from a geometry detail by parsing a pattern (typically, the value of a Group parameter belonging to this node).

Exceptions
std::runtime_errorif the pattern is nonempty but doesn't match any group.

◆ resolveRenamedParm()

void resolveRenamedParm ( PRM_ParmList & obsoleteParms,
const char * oldName,
const char * newName )
protected

Transfer the value of an obsolete parameter that was renamed to the parameter with the new name.

This convenience method is intended to be called from resolveObsoleteParms(), when that function is implemented.