|
| UT_PropertyTable (const char *table_name, bool verbose=false) |
|
| UT_PropertyTable (UT_JSONParser &p, const char *filename=nullptr, bool verbose=false) |
|
bool | loadStatus () const |
| Return the load status of the table in the c-tor. More...
|
|
int | getNumProps () const |
|
int | getPropIndex (const UT_StringRef &name) |
|
const UT_StringHolder & | getPropName (int i) const |
|
const UT_StringHolder & | getPropLabel (int i) const |
|
const UT_StringHolder & | getPropParm (int i) const |
|
OptionEntryPtr | getPropDefault (int i) const |
|
fpreal64 | getMin (int i) const |
|
fpreal64 | getMax (int i) const |
|
int | findRName (const UT_StringRef &name) const |
|
int | findHName (const UT_StringRef &name) const |
|
exint | size () const |
| Number of properties stored in the table. More...
|
|
const UT_StringHolder & | rclass (int i) const |
| Return the class of the rendering property (i.e. "object") More...
|
|
const UT_StringHolder & | rname (int i) const |
| Return the name of the rendering property (i.e. "coving") More...
|
|
const UT_StringHolder & | hname (int i) const |
| Return the name of the houdini parameter (i.e. "vm_coving") More...
|
|
const UT_StringHolder & | label (int i) const |
| Return the label of the houdini parameter (i.e. "Coving") More...
|
|
OptionEntryPtr | value (int i) const |
| Return the default value of the houdini parameter (i.e. 1) More...
|
|
const UT_JSONValueMap & | jsonMap (int i) const |
| Return a raw JSONValueMap representing the property. More...
|
|
bool | save (UT_JSONWriter &w, const UT_IntArray *select=nullptr) const |
| Debug the settings. More...
|
|
void | dump (const UT_IntArray *select=nullptr) const |
|
const PropertySubsetList & | getSubset (const UT_StringRef &name) |
|
const PropertySubsetList & | getSubset (const UT_StringRef names[], exint arraylen) |
|
template<typename SELECT > |
SYS_FORCE_INLINE void | select (UT_Array< const UT_JSONValueMap * > &matched, SELECT &predicate) |
|
template<typename FUNC , typename SELECT > |
SYS_FORCE_INLINE void | filter (FUNC &func, SELECT &predicate) |
|
|
fpreal64 | minValue (int i) const |
|
fpreal64 | maxValue (int i) const |
|
|
template<typename T > |
SYS_FORCE_INLINE bool | import (int idx, const UT_StringRef &name, T &val) const |
|
template<typename T > |
SYS_FORCE_INLINE bool | import (int idx, const UT_StringRef &name, T *val, int size) const |
|
This class represents a table of (mantra) properties. A property consists of a name (the name used by mantra), a parm name (the name of the houdini parameter that corresponds to the mantra property), the data type of the property, and the default value of the property.
This information is somewhat scattered right now, with the parameter definition in the $HH/properties/soho/IFDmantra.ds file, the translation from houdini to mantra names in $HH/soho/base/IFDmantra.py, and the defaults as mantra understands them (which should but may not match the defaults in the parameter definitions) in $RAY/RAY_Settings.C. At some point all references to render properties should be through this class.
The property table is loaded from a JSON array where each item in the array is a dictionary defining a property. The items to define the property are:
- "string class" (required): Specifies the rendering class of the property (i.e. "renderer", "object" or "option")
- "string name" (required): The renderer name for the property
- "string hname" (required): The name of the Houdini parameter
- "<type> default" (required): The default value. This may be one of:
- bool
- number
- string
- array of numbers
- array of strings
- "string label" (optional): The label of the Houdini parameter
- "float min" (optional): Suggested minimum value for numeric types
- "float max" (optional): Suggested maximum value for numeric types
Definition at line 53 of file UT_PropertyTable.h.