OpenVDB: ParmFactory.h Source File

OpenVDB 7.1.0

ParmFactory.h
Go to the documentation of this file.
1 // Copyright Contributors to the OpenVDB Project
2 // SPDX-License-Identifier: MPL-2.0
3 //
9
10 #ifndef HOUDINI_UTILS_PARM_FACTORY_HAS_BEEN_INCLUDED
11 #define HOUDINI_UTILS_PARM_FACTORY_HAS_BEEN_INCLUDED
12
13 #include <GA/GA_Attribute.h>
14 #include <OP/OP_AutoLockInputs.h>
15 #include <OP/OP_Operator.h>
16 #include <PRM/PRM_Include.h>
17 #include <PRM/PRM_SpareData.h>
18 #include <SOP/SOP_Node.h>
19 #include <SOP/SOP_NodeVerb.h>
20 #if defined(PRODDEV_BUILD) || defined(DWREAL_IS_DOUBLE)
21 // OPENVDB_HOUDINI_API, which has no meaning in a DWA build environment but
22 // must at least exist, is normally defined by including openvdb/Platform.h.
23 // For DWA builds (i.e., if either PRODDEV_BUILD or DWREAL_IS_DOUBLE exists),
24 // that introduces an unwanted and unnecessary library dependency.
25 #ifndef OPENVDB_HOUDINI_API
26 #define OPENVDB_HOUDINI_API
27 #endif
28 #else
29 #include <openvdb/version.h>
30 #endif
31 #include <exception>
32 #include <functional>
33 #include <map>
34 #include <memory>
35 #include <string>
36 #include <vector>
37
38
39 #ifdef SESI_OPENVDB
40 #ifdef OPENVDB_HOUDINI_API
41 #undef OPENVDB_HOUDINI_API
42 #define OPENVDB_HOUDINI_API
43 #endif
44 #endif
45
46
47 class GU_Detail;
48 class OP_OperatorTable;
49 class PRM_Parm;
50
51 namespace houdini_utils {
52
53 class ParmFactory;
54
55 using SpareDataMap = std::map<std::string, std::string>;
56
61 const SpareDataMap& getOperatorSpareData(const OP_Operator&);
62
69 void addOperatorSpareData(OP_Operator&, const SpareDataMap&);
70
71
73 class OPENVDB_HOUDINI_API ParmList
74 {
75 public:
76 using PrmTemplateVec = std::vector<PRM_Template>;
77
78 ParmList() {}
79
81 bool empty() const { return mParmVec.empty(); }
85 size_t size() const { return mParmVec.size(); }
86
88 void clear() { mParmVec.clear(); mSwitchers.clear(); }
89
92 ParmList& add(const PRM_Template&);
93 ParmList& add(const ParmFactory&);
95
98 ParmList& beginSwitcher(const std::string& token, const std::string& label = "");
101 ParmList& beginExclusiveSwitcher(const std::string& token, const std::string& label = "");
105 ParmList& endSwitcher();
106
111 ParmList& addFolder(const std::string& label);
112
114 PRM_Template* get() const;
115
116 private:
117 struct SwitcherInfo { size_t parmIdx; std::vector<PRM_Default> folders; bool exclusive; };
118 using SwitcherStack = std::vector<SwitcherInfo>;
119
120 void incFolderParmCount();
121 SwitcherInfo* getCurrentSwitcher();
122
123 PrmTemplateVec mParmVec;
124 SwitcherStack mSwitchers;
125 }; // class ParmList
126
127
129
130
147 class OPENVDB_HOUDINI_API ParmFactory
148 {
149 public:
150 ParmFactory(PRM_Type, const std::string& token, const std::string& label);
151 ParmFactory(PRM_MultiType, const std::string& token, const std::string& label);
152
153 // Settings
154 ParmFactory& setCallbackFunc(const PRM_Callback&);
155
157 ParmFactory& setChoiceList(const PRM_ChoiceList*);
162 ParmFactory& setChoiceListItems(PRM_ChoiceListType typ, const std::vector<std::string>& items);
168 ParmFactory& setChoiceListItems(PRM_ChoiceListType typ, const char* const* items);
169
190 ParmFactory& setGroupChoiceList(size_t inputIndex,
191 PRM_ChoiceListType typ = PRM_CHOICELIST_TOGGLE);
192
198 using AttrFilterFunc =
199 std::function<bool (const GA_Attribute&, const PRM_Parm&, const SOP_Node&)>;
200
226 ParmFactory& setAttrChoiceList(size_t inputIndex, GA_AttributeOwner attrOwner,
227 PRM_ChoiceListType typ = PRM_CHOICELIST_TOGGLE,
228 AttrFilterFunc attrFilter = AttrFilterFunc{});
229
230
231 #if defined(GCC3)
232 #define IS_DEPRECATED __attribute__ ((deprecated))
233 #elif defined(_MSC_VER)
234 #define IS_DEPRECATED __declspec(deprecated)
235 #else
236 #define IS_DEPRECATED
237 #endif
238
248 IS_DEPRECATED ParmFactory& setChoiceList(PRM_ChoiceListType typ,
249 const std::vector<std::string>& items, bool paired = false);
260 IS_DEPRECATED ParmFactory& setChoiceList(PRM_ChoiceListType typ,
261 const char* const* items, bool paired = false);
262
263 #undef IS_DEPRECATED
264
265 ParmFactory& setConditional(const PRM_ConditionalBase*);
266
271 ParmFactory& setDefault(fpreal, const char* = nullptr, CH_StringMeaning = CH_STRING_LITERAL);
273 ParmFactory& setDefault(const std::string&, CH_StringMeaning = CH_STRING_LITERAL);
277 ParmFactory& setDefault(const std::vector<fpreal>&);
280 ParmFactory& setDefault(const std::vector<PRM_Default>&);
282 ParmFactory& setDefault(const PRM_Default*);
283
286 ParmFactory& setHelpText(const char*);
289 ParmFactory& setTooltip(const char*);
296 ParmFactory& setDocumentation(const char*);
297
298 ParmFactory& setParmGroup(int);
299
301 ParmFactory& setRange(
302 PRM_RangeFlag minFlag, fpreal minVal,
303 PRM_RangeFlag maxFlag, fpreal maxVal);
306 ParmFactory& setRange(const std::vector<PRM_Range>&);
308 ParmFactory& setRange(const PRM_Range*);
309
311 ParmFactory& setSpareData(const SpareDataMap&);
313 ParmFactory& setSpareData(const PRM_SpareData*);
314
318 ParmFactory& setMultiparms(const ParmList&);
319
321 ParmFactory& setTypeExtended(PRM_TypeExtended);
322
325 ParmFactory& setVectorSize(int);
326
331 ParmFactory& setInvisible();
332
334 PRM_Template get() const;
335
336 private:
337 struct Impl;
338 std::shared_ptr<Impl> mImpl;
339
340 // For internal use only, and soon to be removed:
341 ParmFactory& doSetChoiceList(PRM_ChoiceListType, const std::vector<std::string>&, bool);
342 ParmFactory& doSetChoiceList(PRM_ChoiceListType, const char* const* items, bool);
343 }; // class ParmFactory
344
345
347
348
349 class OpPolicy;
350 using OpPolicyPtr = std::shared_ptr<OpPolicy>;
351
352
376 class OPENVDB_HOUDINI_API OpFactory
377 {
378 public:
379 enum OpFlavor { SOP, POP, ROP, VOP, HDA };
380
383 static std::string flavorToString(OpFlavor);
384
395 template<typename OpPolicyType>
396 OpFactory(const OpPolicyType& /*unused*/, const std::string& english,
397 OP_Constructor ctor, ParmList& parms, OP_OperatorTable& table, OpFlavor flavor = SOP)
398 {
399 this->init(OpPolicyPtr(new OpPolicyType), english, ctor, parms, table, flavor);
400 }
401
403 OpFactory(const std::string& english, OP_Constructor ctor,
404 ParmList& parms, OP_OperatorTable& table, OpFlavor flavor = SOP);
405
407 #if OPENVDB_ABI_VERSION_NUMBER >= 7
408 virtual ~OpFactory();
409 #else
410 ~OpFactory();
411 #endif
412
413 OpFactory(const OpFactory&) = delete;
414 OpFactory& operator=(const OpFactory&) = delete;
415
418 OpFlavor flavor() const;
421 std::string flavorString() const;
424 const std::string& name() const;
427 const std::string& english() const;
430 const std::string& iconName() const;
435 const std::string& helpURL() const;
439 const std::string& documentation() const;
442 const OP_OperatorTable& table() const;
443
448 OpFactory& addAlias(const std::string& english);
453 OpFactory& addAliasVerbatim(const std::string& name);
458 OpFactory& setDocumentation(const std::string&);
460 OpFactory& addInput(const std::string& name);
462 OpFactory& addOptionalInput(const std::string& name);
466 OpFactory& setMaxInputs(unsigned = 9999);
468 OpFactory& setObsoleteParms(const ParmList&);
470 OpFactory& setLocalVariables(CH_LocalVariable*);
471 OpFactory& setFlags(unsigned);
472 OpFactory& setInternalName(const std::string& name);
473 OpFactory& setOperatorTable(const std::string& name);
474
479 using CacheAllocFunc = std::function<SOP_NodeCache* (void)>;
480
489 OpFactory& setVerb(SOP_NodeVerb::CookMode cookMode, const CacheAllocFunc& allocator);
490
493 OpFactory& setInvisible();
494
500 OpFactory& addSpareData(const SpareDataMap&);
501
502 protected:
505 OP_OperatorTable& table();
506
507 private:
508 void init(OpPolicyPtr, const std::string& english, OP_Constructor,
509 ParmList&, OP_OperatorTable&, OpFlavor);
510
511 struct Impl;
512 std::shared_ptr<Impl> mImpl;
513 }; // class OpFactory
514
515
517
518
521 class OPENVDB_HOUDINI_API OpPolicy
522 {
523 public:
524 OpPolicy() {}
525 virtual ~OpPolicy() {}
526
528 std::string getName(const OpFactory& factory) { return getName(factory, factory.english()); }
529
537 virtual std::string getName(const OpFactory& factory, const std::string& english);
538
541 virtual std::string getIconName(const OpFactory&) { return ""; }
542
544 virtual std::string getHelpURL(const OpFactory&) { return ""; }
545
549 virtual std::string getLabelName(const OpFactory&);
550
553 virtual std::string getFirstName(const OpFactory&) { return ""; }
554
557 virtual std::string getTabSubMenuPath(const OpFactory&) { return ""; }
558 };
559
560
562
563
565 class OPENVDB_HOUDINI_API ScopedInputLock
566 {
567 public:
568 ScopedInputLock(SOP_Node& node, OP_Context& context)
569 {
570 mLock.setNode(&node);
571 if (mLock.lock(context) >= UT_ERROR_ABORT) {
572 throw std::runtime_error("failed to lock inputs");
573 }
574 }
575 ~ScopedInputLock() {}
576
577 void markInputUnlocked(exint input) { mLock.markInputUnlocked(input); }
578
579 private:
580 OP_AutoLockInputs mLock;
581 };
582
583
585
586
587 // Extended group name drop-down menu incorporating "@<attr>=<value" syntax
588
589 OPENVDB_HOUDINI_API extern const PRM_ChoiceList PrimGroupMenuInput1;
590 OPENVDB_HOUDINI_API extern const PRM_ChoiceList PrimGroupMenuInput2;
591 OPENVDB_HOUDINI_API extern const PRM_ChoiceList PrimGroupMenuInput3;
592 OPENVDB_HOUDINI_API extern const PRM_ChoiceList PrimGroupMenuInput4;
593
597 OPENVDB_HOUDINI_API extern const PRM_ChoiceList PrimGroupMenu;
598
599
600 } // namespace houdini_utils
601
602 #endif // HOUDINI_UTILS_PARM_FACTORY_HAS_BEEN_INCLUDED
houdini_utils::OpFactory::english
const std::string & english() const
Return the new operator's UI name.
houdini_utils::ParmFactory::setDefault
ParmFactory & setDefault(const std::vector< PRM_Default > &)
Specify default values for the vector elements of this parameter (assuming its vector size is > 1).
houdini_utils::ParmFactory::setAttrChoiceList
ParmFactory & setAttrChoiceList(size_t inputIndex, GA_AttributeOwner attrOwner, PRM_ChoiceListType typ=PRM_CHOICELIST_TOGGLE, AttrFilterFunc attrFilter=AttrFilterFunc{})
Specify a menu of attribute names for this parameter.
houdini_utils::ScopedInputLock::markInputUnlocked
void markInputUnlocked(exint input)
Definition: ParmFactory.h:577
houdini_utils::OpFactory::VOP
@ VOP
Definition: ParmFactory.h:379
houdini_utils::ParmFactory::setConditional
ParmFactory & setConditional(const PRM_ConditionalBase *)
houdini_utils::OpFactory::CacheAllocFunc
std::function< SOP_NodeCache *(void)> CacheAllocFunc
Functor that returns newly-allocated node caches for instances of this operator.
Definition: ParmFactory.h:479
houdini_utils::OpPolicy::getName
virtual std::string getName(const OpFactory &factory, const std::string &english)
Convert an English name into a type name for the operator defined by the given factory,...
houdini_utils::ParmFactory::setChoiceListItems
ParmFactory & setChoiceListItems(PRM_ChoiceListType typ, const std::vector< std::string > &items)
Specify a menu type and a list of token, label, token, label,... pairs for this parameter.
houdini_utils::OpFactory::name
const std::string & name() const
Return the new operator's type name.
houdini_utils::ParmFactory::setChoiceList
ParmFactory & setChoiceList(PRM_ChoiceListType typ, const std::vector< std::string > &items, bool paired=false)
Specify a menu type and either a list of menu item labels or a list of token, label,...
houdini_utils::ParmFactory::setTooltip
ParmFactory & setTooltip(const char *)
Specify a plain text tooltip for this parameter.
houdini_utils::ParmFactory::setParmGroup
ParmFactory & setParmGroup(int)
houdini_utils::ParmList::endSwitcher
ParmList & endSwitcher()
End a collection of tabs.
houdini_utils::OpFactory::table
const OP_OperatorTable & table() const
Return the operator table with which this factory is associated.
houdini_utils::ParmFactory::setDefault
ParmFactory & setDefault(const std::vector< fpreal > &)
Specify default numeric values for the vector elements of this parameter (assuming its vector size is...
houdini_utils::ParmFactory::setChoiceList
ParmFactory & setChoiceList(const PRM_ChoiceList *)
Specify a menu of values for this parameter.
houdini_utils::OpPolicy::~OpPolicy
virtual ~OpPolicy()
Definition: ParmFactory.h:525
houdini_utils
Utilities to collect a chain of adjacent nodes of a particular type so that they can be cooked in a s...
Definition: OP_NodeChain.h:39
houdini_utils::OpFactory::table
OP_OperatorTable & table()
Return the operator table with which this factory is associated.
houdini_utils::OpFactory::~OpFactory
virtual ~OpFactory()
Register the operator.
houdini_utils::ParmFactory::setVectorSize
ParmFactory & setVectorSize(int)
Specify the number of vector elements for this parameter.
houdini_utils::ParmList::size
size_t size() const
Return the number of parameters in this list.
Definition: ParmFactory.h:85
houdini_utils::OpFactory::OpFactory
OpFactory(const OpFactory &)=delete
houdini_utils::OpFactory::flavorToString
static std::string flavorToString(OpFlavor)
Return "SOP" for the SOP flavor, "POP" for the POP flavor, etc.
houdini_utils::OpFactory::iconName
const std::string & iconName() const
Return the new operator's icon name.
houdini_utils::ParmFactory::ParmFactory
ParmFactory(PRM_MultiType, const std::string &token, const std::string &label)
houdini_utils::ParmFactory::setInvisible
ParmFactory & setInvisible()
Mark this parameter as hidden from the UI.
houdini_utils::ParmFactory::AttrFilterFunc
std::function< bool(const GA_Attribute &, const PRM_Parm &, const SOP_Node &)> AttrFilterFunc
Functor to filter a list of attributes from a SOP's input.
Definition: ParmFactory.h:199
houdini_utils::OpPolicy::getLabelName
virtual std::string getLabelName(const OpFactory &)
Return a label name for the operator defined by the given factory.
IS_DEPRECATED
#define IS_DEPRECATED
Definition: ParmFactory.h:236
houdini_utils::OpPolicy
An OpPolicy customizes the behavior of an OpFactory. This base class specifies the required interface...
Definition: ParmFactory.h:522
houdini_utils::ParmList::addFolder
ParmList & addFolder(const std::string &label)
Add a tab with the given label to the current tab collection.
version.h
Library and file format version numbers.
houdini_utils::OpFactory::addInput
OpFactory & addInput(const std::string &name)
Add a required input with the given name.
houdini_utils::ParmFactory::setRange
ParmFactory & setRange(const PRM_Range *)
Specify a range or ranges for this parameter's values.
houdini_utils::ParmList::clear
void clear()
Remove all parameters from this list.
Definition: ParmFactory.h:88
houdini_utils::OpFactory::setOperatorTable
OpFactory & setOperatorTable(const std::string &name)
houdini_utils::OpFactory::setInternalName
OpFactory & setInternalName(const std::string &name)
houdini_utils::OpFactory::setMaxInputs
OpFactory & setMaxInputs(unsigned=9999)
Set the maximum number of inputs allowed by this operator.
houdini_utils::ParmFactory::setMultiparms
ParmFactory & setMultiparms(const ParmList &)
Specify the list of parameters for each instance of a multiparm.
houdini_utils::OpFactory::addAlias
OpFactory & addAlias(const std::string &english)
Construct a type name for this operator from the given English name and add it as an alias.
houdini_utils::ParmFactory::setDocumentation
ParmFactory & setDocumentation(const char *)
Add documentation for this parameter.
houdini_utils::ParmFactory::setDefault
ParmFactory & setDefault(fpreal, const char *=nullptr, CH_StringMeaning=CH_STRING_LITERAL)
Specify a default value for this parameter.
houdini_utils::ScopedInputLock::~ScopedInputLock
~ScopedInputLock()
Definition: ParmFactory.h:575
houdini_utils::OpFactory::OpFactory
OpFactory(const OpPolicyType &, const std::string &english, OP_Constructor ctor, ParmList &parms, OP_OperatorTable &table, OpFlavor flavor=SOP)
Construct a factory that on destruction registers a new operator type.
Definition: ParmFactory.h:396
houdini_utils::ParmFactory::setRange
ParmFactory & setRange(const std::vector< PRM_Range > &)
Specify range for the values of this parameter's vector elements (assuming its vector size is > 1).
houdini_utils::OpFactory::flavorString
std::string flavorString() const
Return the new operator's flavor as a string ("SOP", "POP", etc.).
houdini_utils::ParmFactory::ParmFactory
ParmFactory(PRM_Type, const std::string &token, const std::string &label)
houdini_utils::ParmFactory::setRange
ParmFactory & setRange(PRM_RangeFlag minFlag, fpreal minVal, PRM_RangeFlag maxFlag, fpreal maxVal)
Specify a range for this parameter's values.
houdini_utils::OpFactory::operator=
OpFactory & operator=(const OpFactory &)=delete
houdini_utils::addOperatorSpareData
void addOperatorSpareData(OP_Operator &, const SpareDataMap &)
Specify (key, value) pairs of spare data for the given operator.
houdini_utils::OpFactory::addAliasVerbatim
OpFactory & addAliasVerbatim(const std::string &name)
Add an alias for this operator.
houdini_utils::OpPolicy::getIconName
virtual std::string getIconName(const OpFactory &)
Return an icon name for the operator defined by the given factory.
Definition: ParmFactory.h:541
houdini_utils::ParmList::beginExclusiveSwitcher
ParmList & beginExclusiveSwitcher(const std::string &token, const std::string &label="")
Begin an exclusive collection of tabs. Only one tab is "active" at a time.
houdini_utils::ScopedInputLock
Helper class to manage input locking.
Definition: ParmFactory.h:566
houdini_utils::ParmFactory::setSpareData
ParmFactory & setSpareData(const SpareDataMap &)
Specify (key, value) pairs of spare data for this parameter.
houdini_utils::PrimGroupMenu
OPENVDB_HOUDINI_API const PRM_ChoiceList PrimGroupMenu
houdini_utils::OpFactory::helpURL
const std::string & helpURL() const
Return the new operator's help URL.
houdini_utils::PrimGroupMenuInput1
OPENVDB_HOUDINI_API const PRM_ChoiceList PrimGroupMenuInput1
houdini_utils::OpFactory::setInvisible
OpFactory & setInvisible()
Mark this node as hidden from the UI tab menu.
houdini_utils::OpFactory::setObsoleteParms
OpFactory & setObsoleteParms(const ParmList &)
Specify obsolete parameters to this operator.
houdini_utils::OpFactory::OpFactory
OpFactory(const std::string &english, OP_Constructor ctor, ParmList &parms, OP_OperatorTable &table, OpFlavor flavor=SOP)
houdini_utils::OpFactory::addOptionalInput
OpFactory & addOptionalInput(const std::string &name)
Add an optional input with the given name.
houdini_utils::ParmList::empty
bool empty() const
Return true if this list contains no parameters.
Definition: ParmFactory.h:81
houdini_utils::OpFactory::setDocumentation
OpFactory & setDocumentation(const std::string &)
Add documentation for this operator.
houdini_utils::OpFactory::addSpareData
OpFactory & addSpareData(const SpareDataMap &)
Specify (key, value) pairs of spare data for this operator.
houdini_utils::ParmFactory
Helper class to simplify construction of PRM_Templates and dynamic user interfaces.
Definition: ParmFactory.h:148
houdini_utils::ParmFactory::setChoiceListItems
ParmFactory & setChoiceListItems(PRM_ChoiceListType typ, const char *const *items)
Specify a menu type and a list of token, label, token, label,... pairs for this parameter.
houdini_utils::ParmFactory::setTypeExtended
ParmFactory & setTypeExtended(PRM_TypeExtended)
Specify an extended type for this parameter.
houdini_utils::OpPolicy::getFirstName
virtual std::string getFirstName(const OpFactory &)
Return the inital default name of the operator.
Definition: ParmFactory.h:553
houdini_utils::OpFactory::OpFlavor
OpFlavor
Definition: ParmFactory.h:379
houdini_utils::ScopedInputLock::ScopedInputLock
ScopedInputLock(SOP_Node &node, OP_Context &context)
Definition: ParmFactory.h:568
houdini_utils::ParmList::get
PRM_Template * get() const
Return a heap-allocated copy of this list's array of parameters.
houdini_utils::OpFactory
Helper class to simplify operator registration.
Definition: ParmFactory.h:377
houdini_utils::ParmFactory::setSpareData
ParmFactory & setSpareData(const PRM_SpareData *)
Specify spare data for this parameter.
houdini_utils::ParmList::PrmTemplateVec
std::vector< PRM_Template > PrmTemplateVec
Definition: ParmFactory.h:76
houdini_utils::ParmFactory::get
PRM_Template get() const
Construct and return the parameter template.
houdini_utils::getOperatorSpareData
const SpareDataMap & getOperatorSpareData(const OP_Operator &)
Return the spare data associated with the given operator.
houdini_utils::OpPolicy::getHelpURL
virtual std::string getHelpURL(const OpFactory &)
Return a help URL for the operator defined by the given factory.
Definition: ParmFactory.h:544
houdini_utils::OpFactory::flavor
OpFlavor flavor() const
Return the new operator's flavor (SOP, POP, etc.).
houdini_utils::ParmList::ParmList
ParmList()
Definition: ParmFactory.h:78
houdini_utils::OpPolicy::OpPolicy
OpPolicy()
Definition: ParmFactory.h:524
houdini_utils::OpPolicyPtr
std::shared_ptr< OpPolicy > OpPolicyPtr
Definition: ParmFactory.h:350
houdini_utils::PrimGroupMenuInput4
OPENVDB_HOUDINI_API const PRM_ChoiceList PrimGroupMenuInput4
houdini_utils::ParmList::add
ParmList & add(const PRM_Template &)
Add a parameter to this list.
houdini_utils::OpFactory::setVerb
OpFactory & setVerb(SOP_NodeVerb::CookMode cookMode, const CacheAllocFunc &allocator)
Register this operator as a compilable&#160;SOP.
houdini_utils::OpFactory::setFlags
OpFactory & setFlags(unsigned)
houdini_utils::ParmFactory::setGroupChoiceList
ParmFactory & setGroupChoiceList(size_t inputIndex, PRM_ChoiceListType typ=PRM_CHOICELIST_TOGGLE)
Specify a menu of primitive group names for this parameter.
houdini_utils::OpPolicy::getTabSubMenuPath
virtual std::string getTabSubMenuPath(const OpFactory &)
Return the tab sub-menu path of the op.
Definition: ParmFactory.h:557
houdini_utils::ParmFactory::setCallbackFunc
ParmFactory & setCallbackFunc(const PRM_Callback &)
houdini_utils::ParmFactory::setChoiceList
ParmFactory & setChoiceList(PRM_ChoiceListType typ, const char *const *items, bool paired=false)
Specify a menu type and either a list of menu item labels or a list of token, label,...
OPENVDB_HOUDINI_API
#define OPENVDB_HOUDINI_API
Definition: Platform.h:238
houdini_utils::OpPolicy::getName
std::string getName(const OpFactory &factory)
Return a type name for the operator defined by the given factory.
Definition: ParmFactory.h:528
houdini_utils::ParmFactory::setDefault
ParmFactory & setDefault(const std::string &, CH_StringMeaning=CH_STRING_LITERAL)
Specify a default string value for this parameter.
houdini_utils::ParmList
Parameter template list that is always terminated.
Definition: ParmFactory.h:74
houdini_utils::ParmList::beginSwitcher
ParmList & beginSwitcher(const std::string &token, const std::string &label="")
Begin a collection of tabs.
houdini_utils::ParmFactory::setDefault
ParmFactory & setDefault(const PRM_Default *)
Specify a default value or values for this parameter.
houdini_utils::PrimGroupMenuInput2
OPENVDB_HOUDINI_API const PRM_ChoiceList PrimGroupMenuInput2
houdini_utils::PrimGroupMenuInput3
OPENVDB_HOUDINI_API const PRM_ChoiceList PrimGroupMenuInput3
houdini_utils::OpFactory::documentation
const std::string & documentation() const
Return the new operator's documentation.
houdini_utils::ParmList::add
ParmList & add(const ParmFactory &)
Add a parameter to this list.
houdini_utils::SpareDataMap
std::map< std::string, std::string > SpareDataMap
Definition: ParmFactory.h:55
houdini_utils::OpFactory::setLocalVariables
OpFactory & setLocalVariables(CH_LocalVariable *)
Add one or more local variables to this operator.
houdini_utils::ParmFactory::setHelpText
ParmFactory & setHelpText(const char *)
Specify a plain text tooltip for this parameter.