HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_ParmGenerator.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: VOP Library (C++)
7  *
8  * COMMENTS: ParmGenerator VOP operator.
9  *
10  */
11 
12 #ifndef __VOP_ParmGenerator_h__
13 #define __VOP_ParmGenerator_h__
14 
15 #include "VOP_API.h"
16 #include "VOP_Node.h"
17 #include <CH/CH_ExprLanguage.h>
18 #include <UT/UT_StringHolder.h>
19 
23 
25 {
26 public:
27  // Get the "isbound" code, if it's needed.
28  void getCode(UT_String &codestr,
29  const VOP_CodeGenContext &context
30  ) override;
31 
32  unsigned getNumVisibleInputs() const override;
34  const VOP_CodeGenContext &ctx,
35  bool check_shader_context
36  ) const override;
37 
38  const char *outputLabel(unsigned idx) const override;
40  const VOP_CodeGenContext &context
41  ) override;
44  UT_String &var,int idx) override;
45 
46  bool getIsParmGenerator() const override;
47  const VOP_ParmGenerator *castToParmGenerator() const override
48  { return this;}
49  VOP_ParmGenerator *castToParmGenerator() override { return this; }
50 
51  void initializeNode() override;
52  VOP_Node *getRealDefinition() override;
53 
54  void opChanged(
55  OP_EventType reason,
56  void *data = nullptr) override;
57 
58  /// @{ Obtains the scope for this parameter.
59  static const char* const SCOPE_SHADER; // shader parm (on SHOP)
60  static const char* const SCOPE_CLASS; // class member variable
61  static const char* const SCOPE_METHOD; // method argument
62  static const char* const SCOPE_SUBNET; // subnet input (and output)
63 
64  bool isSubnetParameterDefiner(VOP_Node *subnet = nullptr) const;
65  bool isSubnetInputOrOutputDefiner(VOP_Node *subnet = nullptr) const;
66  bool isSubnetInputDefiner( VOP_Node *subnet = nullptr,
67  bool allow_search = false) const;
68  bool isSubnetOutputDefiner( VOP_Node *subnet = nullptr,
69  bool allow_search = false) const;
70  bool isSubnetInputParm() const;
71  bool isSubnetOutputParm() const;
72  /// @}
73 
74  /// @{ Menu options for this parameter.
75  static const char* const NO_MENU;
76  static const char* const MENU_ITEMS;
77  static const char* const MENU_SCRIPT;
78  /// @}
79 
80  /// Returns true if parm node is used for shader argument.
81  bool isShaderParm() const;
82  bool isClassMemberParm() const;
83 
84  /// Gets the access level (public, private, etc) for this variable.
85  void getParmAccess( UT_String &access );
86 
87  /// Checks if this node is inside a shader of the given type.
88  bool isInsideShaderOfType( VOP_Type shader_type );
89 
90  /// Returns true if this node represents a subnet input.
91  bool isSubnetInput() const override;
92 
93  /// Returns the type of a subnet input represented by this node.
94  virtual VOP_TypeInfo getSubnetInputTypeInfo();
95 
96  /// Obtains a list of shader context types that this node is interested in
97  /// supporting.
99  UT_StringArray &context_names
100  ) const override;
101 
102  // Does a search through the network to find the node that defines
103  // the parameter for node. This function updates the local symbol
104  // table with the appropriate value.
105  void recalculateParmDefiner(bool sendchangeevents);
106 
107  // Calls PARMNAME() to make sure that our parm name cache value is
108  // up to date.
109  void cacheParmName();
110  // Returns ths cached evaluation of the parameter name parm. This
111  // is useful because this parameter is evaluated extremely often.
113  { return myParmNameCache; }
114 
115  /// Get the variable name for this parameter, as it is used in code.
116  void getParmCodeName( UT_String &name ) const;
117 
118  /// Returns parm label.
119  void parmLabel(UT_String &str);
120  void parmComment(UT_String &str);
121 
122  /// Returns true if it's an exported parameter.
123  bool isExportParm() const
124  { return exportParm(); }
125 
126  /// Returns the real parameter definer for this node.
127  VOP_ParmGenerator *getParmDefiner() const;
128  VOP_ParmGenerator *getParmDefiner(const char *parm_name,
129  bool for_shader) const;
130 
131  // Fills the supplied array with a list of all channels that will be
132  // created for the parameter defined by this node.
133  void getParmChannels(UT_StringArray &channels);
134 
135  // Parm generators are special - they may or may not have an input,
136  // but even when it is being display, we may run into cases where
137  // the my inputs array is actually empty (even though we're showing
138  // an input).
139  unsigned nInputs() const override;
140 
141  // These methods, which must be implemented by the derived class, should
142  // not worry about whether the parameter id defined elsewhere:
143  virtual void PARMSCOPE(UT_String &str) const;
144  virtual void setPARMSCOPE(const char *str);
145  virtual void PARMACCESS(UT_String &str) const;
146  virtual void PARMNAME(UT_String &str) const = 0;
147  virtual void setPARMNAME(const UT_String &str);
148  virtual void PARMPREFIX(UT_String &str) const;
149  virtual void PARMPOSTFIX(UT_String &str) const;
150  virtual void PARMLABEL(UT_String &str) const = 0;
151  virtual void PARMCOMMENT(UT_String &str) const;
152  virtual int PARMTYPEINDEX() const = 0;
153  virtual void setPARMTYPEINDEX(int type);
154  virtual void PARMTYPENAME(UT_String &type_name) const;
155  virtual void setPARMTYPENAME(const UT_StringRef &type_name);
156  virtual void setPARMSTORAGE(int type);
157  virtual void PARMMENUOPTION(UT_String &str) const;
158  virtual void setPARMMENUOPTION(const UT_String &menu_option);
159 
160  // Convenience method to set a parameter type
161  void setParmType( VOP_Type type );
162  void setParmTypeInfo(const VOP_TypeInfo &type_info);
163 
164  /// Return true if the promoted parameter is visible
165  /// on the VOPNET creator node.
166  virtual bool isParmVisible() const = 0;
167 
168  /// Copy settings from a source parameter generator
169  virtual void copySettingsFrom(VOP_ParmGenerator *pvop);
170 
171  /// Copy the default values from the given parameter and use them
172  /// as the default values for this node's generated parameter.
173  virtual void copyDefaultValuesFrom(
174  const PI_EditScriptedParm *parm);
175 
176  /// Get the type of the parameter (possibly filtered for a given language)
177  VOP_Type getParameterType(const VOP_Language *l=NULL);
178  VOP_TypeInfo getParameterTypeInfo(const VOP_Language *l=NULL);
179 
180  /// Get the name of the parameter that holds the current default value.
181  const char * getParameterDefaultValueParmName();
182 
183  /// Get the value of the parameter as an integer. This checks the owner
184  /// (i.e. network) for a parameter, then will evaluate the parameter as an
185  /// integer.
186  virtual bool evalIntegerValue(int &value);
187 
188  /// Return the exported parameters manager that is keeping track of this
189  /// parameter VOP.
190  VOP_ExportedParmsManager *ownerExportedParmsManager() const;
191 
192  /// Parm nodes may override definers notion of export context.
193  /// These are methods to determine if that's the case.
194  bool canForceExportInContext(const VOP_CodeGenContext &ctx) const;
195  bool shouldForceExportInContext(const VOP_CodeGenContext &ctx) const;
196  bool shouldCheckSecondaryDefinerInput(
197  const VOP_CodeGenContext &ctx) const;
198 
199  /// Returns a list of all parm generatos that define parm of a given name.
200  static void findAllShaderParmDefiners(
201  UT_Array<VOP_ParmGenerator*> &parm_gens,
202  OP_Network *root,
203  const UT_StringRef &parmname);
204 
205  // Parm generator has own micro-node for its parms, to notify export mgr.
206  const OP_DataMicroNode &
207  parmListMicroNodeConst() const override
208  { return myParmMicroNode; }
209 
210 protected:
211  VOP_ParmGenerator(OP_Network *parent, const char *name,
212  OP_Operator *entry);
213  ~VOP_ParmGenerator() override;
214 
215  /// @{ Scope menu helpers for subclasses.
218  /// @}
219 
220  VOP_ParmGenerator * findParmDefinerInTable(
221  const UT_StringRef &parm_name,
222  const VOP_ParmGeneratorMap *table ) const;
223  const VOP_ParmGeneratorMap *getShaderParmTable() const;
224  const VOP_ParmGeneratorMap *getSubnetParmTable() const;
225  void recalculateShaderParmDefiner(bool sendchangeevents);
226  void recalculateSubnetParmDefiner(bool sendchangeevents);
227  const VOP_ParmGenerator *getSubnetConnectorParmDefiner(bool search) const;
228 
229  void getDescriptiveName(UT_String &name) const override;
230  void postOpChanged(
231  OP_EventType reason, void *data) override;
232 
234  UT_String &in, int idx) const override;
236  const UT_String &in) const override;
237 
239  UT_String &out, int idx) const override;
241  VOP_TypeInfo &type_info, int idx) override;
243  UT_String &var, int idx) const override;
244 
245  // Helpers for dealing with variable name different than output name.
246  void getTmpParmCodeName( UT_String &name ) const;
247  bool usesTempOutputVar() const;
248 
249  /// Factored out helper that gets the parameter declaration.
250  bool getParameterDeclarationHelper(UT_String &parmdecl,
251  const VOP_Language *language,
252  const VOP_CodeGenContext &context);
253 
254  /// Pass back the declaration code for the parameters
255  /// defined by this VOP node.
256  virtual void getParmDeclarationCode(UT_String &parm_decl,
257  const VOP_CodeGenContext &codegen_ctx,
258  const VOP_Language *language=NULL,
259  bool export_parms=false);
260 
261  // These methods, which must be implemented by the derived class, should
262  // not worry about whether the parameter id defined elsewhere:
263  virtual bool USEASPARMDEFINER() const = 0;
264  virtual bool USEOWNEXPORTCONTEXT() const;
265  virtual bool SHOULDHAVECORRESPONDINGCONNECTOR() const;
266  virtual int UNIFORM() const= 0;
267  virtual int USEBOUND() const;
268  virtual int EXPORTPARM() const;
269  virtual void EXPORTSHADERCONTEXTS(
270  UT_StringArray &context_names) const;
271  virtual void MENUCHOICES(UT_String &str) const;
272  virtual void MENUSCRIPT(UT_String &str) const;
273  virtual CH_ScriptLanguage MENUSCRIPTLANGUAGE() const;
274 
275  virtual bool needsInput() = 0;
276 
277  // Build the code to be output when useBound() is true but the parameter
278  // is not actually bound:
279  virtual void getUnboundCode(UT_String &codestr,
280  const VOP_CodeGenContext &context);
281 
282  // Handles the case of having our parameter name changed. This
283  // implementation does nothing.
284  virtual void handleParmNameChange(
285  const UT_StringRef &oldparmname,
286  const UT_StringRef &newparmname);
287 
288  // Determines based on the parm index if the PARMNAME may be changed
289  // when this parm is changed.
290  virtual bool getParmCanAffectParmName(int pidx) const = 0;
291 
293  OP_Context &context,
294  OP_NodeInfoParms &iparms) override;
296  UT_InfoTree &tree,
297  const OP_NodeInfoTreeParms &parms
298  ) override;
299 
300  // These methods check if the parameter is defined elsewhere before calling
301  // the upper-case methods:
302  int useBound() const;
303  bool shouldHaveCorrespondingConnector() const;
304  int exportParm(bool check_connected = true) const;
305  void exportShaderContexts(
306  UT_StringArray &context_names) const;
307  int getParmTypeIndex();
308  void getParmTypeName(UT_String &type_name);
309  void getMenuOption(UT_String &menu_option);
310  void menuChoices(UT_String &str);
311 
312  VOP_Type getUniformType(int pidx,
313  bool conditioned = true,
314  const VOP_Language *language=0);
315 
316  /// Copy a single parameter's value from the source parameter
317  /// This is a convenience method for the copySettingsFrom() method
318  void copyParameterValue(const VOP_ParmGenerator *src,
319  const char *name,
320  bool just_value = true);
321 
322  void preDelete() override;
323 
324 private:
325  // Sends change events to al parm nodes that have the changednode as
326  // their parm definer.
327  static void sendChangesForAllParmsDefinedBy(
328  OP_Node *changednode,
329  OP_Node *node);
330 
331  // Returns a pointer to the VOP_ParmGenerator within a given network
332  // that defines the parameter with the specified name.
333  static VOP_ParmGenerator *findParmDefiner(VOP_ParmGenerator *vop,
334  OP_Network *root,
335  const UT_StringRef &parmname,
336  bool subnet_parm);
337  static VOP_ParmGenerator *findParmDefinerInNetwork(OP_Network *root,
338  const UT_StringRef &parmname,
339  bool subnet_parm);
340  static VOP_ParmGenerator *findParmDefinerInNetwork(OP_Network *root,
341  const UT_StringRef &parmname,
342  bool &preferred,
343  bool subnet_parm);
344 
345  /// Micro-node detemining if node's parms are dirty.
346  class vop_ParmMicroNode : public OP_DataMicroNode
347  {
348  public:
349  vop_ParmMicroNode(VOP_Node &node)
350  : OP_DataMicroNode(node) {}
351  const char *className() const override
352  { return "vop_ParmMicroNode"; }
353  void getOutputs(DEP_MicroNodeList &outputs) const override;
354  };
355 
356  UT_StringHolder myParmNameCache;
357  vop_ParmMicroNode myParmMicroNode;
358  mutable OP_VERSION myCachedIsShaderParmVersion;
359  mutable bool myCachedIsShaderParm;
360  bool myIsAlwaysUsedAsShaderParm;
361 };
362 
363 #endif
virtual int getInputFromNameSubclass(const UT_String &in) const
Reprsents a language for which VOPs can generate source code.
Definition: VOP_Language.h:29
virtual void getContextsForCodeGeneration(UT_StringArray &context_names) const
virtual bool areOutputVariablesFixed(const VOP_CodeGenContext &ctx)
uint64 OP_VERSION
Definition: OP_Version.h:6
virtual bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &context, bool check_shader_context) const
virtual unsigned getNumVisibleInputs() const
const UT_StringHolder & getParmNameCache() const
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
static const char *const MENU_SCRIPT
Menu options for this parameter.
virtual void getFixedOutputVariable(UT_String &var, int idx)
static const char *const SCOPE_METHOD
Obtains the scope for this parameter.
virtual unsigned nInputs() const
static PRM_Default theParmscopeDefault
Scope menu helpers for subclasses.
void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &iparms) override
#define VOP_API
Definition: VOP_API.h:10
static const char *const MENU_ITEMS
Menu options for this parameter.
virtual void getOutputVariableName(UT_String &var, int idx) const
GLuint GLint GLboolean GLint GLenum access
Definition: glcorearb.h:2222
constexpr std::enable_if< I< type_count_base< T >::value, int >::type tuple_type_size(){return subtype_count< typename std::tuple_element< I, T >::type >::value+tuple_type_size< T, I+1 >);}template< typename T > struct type_count< T, typename std::enable_if< is_tuple_like< T >::value >::type >{static constexpr int value{tuple_type_size< T, 0 >)};};template< typename T > struct subtype_count{static constexpr int value{is_mutable_container< T >::value?expected_max_vector_size:type_count< T >::value};};template< typename T, typename Enable=void > struct type_count_min{static const int value{0};};template< typename T >struct type_count_min< T, typename std::enable_if<!is_mutable_container< T >::value &&!is_tuple_like< T >::value &&!is_wrapper< T >::value &&!is_complex< T >::value &&!std::is_void< T >::value >::type >{static constexpr int value{type_count< T >::value};};template< typename T > struct type_count_min< T, typename std::enable_if< is_complex< T >::value >::type >{static constexpr int value{1};};template< typename T >struct type_count_min< T, typename std::enable_if< is_wrapper< T >::value &&!is_complex< T >::value &&!is_tuple_like< T >::value >::type >{static constexpr int value{subtype_count_min< typename T::value_type >::value};};template< typename T, std::size_t I >constexpr typename std::enable_if< I==type_count_base< T >::value, int >::type tuple_type_size_min(){return 0;}template< typename T, std::size_t I > constexpr typename std::enable_if< I< type_count_base< T >::value, int >::type tuple_type_size_min(){return subtype_count_min< typename std::tuple_element< I, T >::type >::value+tuple_type_size_min< T, I+1 >);}template< typename T > struct type_count_min< T, typename std::enable_if< is_tuple_like< T >::value >::type >{static constexpr int value{tuple_type_size_min< T, 0 >)};};template< typename T > struct subtype_count_min{static constexpr int value{is_mutable_container< T >::value?((type_count< T >::value< expected_max_vector_size)?type_count< T >::value:0):type_count_min< T >::value};};template< typename T, typename Enable=void > struct expected_count{static const int value{0};};template< typename T >struct expected_count< T, typename std::enable_if<!is_mutable_container< T >::value &&!is_wrapper< T >::value &&!std::is_void< T >::value >::type >{static constexpr int value{1};};template< typename T > struct expected_count< T, typename std::enable_if< is_mutable_container< T >::value >::type >{static constexpr int value{expected_max_vector_size};};template< typename T >struct expected_count< T, typename std::enable_if<!is_mutable_container< T >::value &&is_wrapper< T >::value >::type >{static constexpr int value{expected_count< typename T::value_type >::value};};enum class object_category:int{char_value=1, integral_value=2, unsigned_integral=4, enumeration=6, boolean_value=8, floating_point=10, number_constructible=12, double_constructible=14, integer_constructible=16, string_assignable=23, string_constructible=24, other=45, wrapper_value=50, complex_number=60, tuple_value=70, container_value=80,};template< typename T, typename Enable=void > struct classify_object{static constexpr object_category value{object_category::other};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, char >::value &&std::is_signed< T >::value &&!is_bool< T >::value &&!std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::integral_value};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value &&!std::is_same< T, char >::value &&!is_bool< T >::value >::type >{static constexpr object_category value{object_category::unsigned_integral};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_same< T, char >::value &&!std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::char_value};};template< typename T > struct classify_object< T, typename std::enable_if< is_bool< T >::value >::type >{static constexpr object_category value{object_category::boolean_value};};template< typename T > struct classify_object< T, typename std::enable_if< std::is_floating_point< T >::value >::type >{static constexpr object_category value{object_category::floating_point};};template< typename T >struct classify_object< T, typename std::enable_if<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&std::is_assignable< T &, std::string >::value >::type >{static constexpr object_category value{object_category::string_assignable};};template< typename T >struct classify_object< T, typename std::enable_if<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&!std::is_assignable< T &, std::string >::value &&(type_count< T >::value==1)&&std::is_constructible< T, std::string >::value >::type >{static constexpr object_category value{object_category::string_constructible};};template< typename T > struct classify_object< T, typename std::enable_if< std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::enumeration};};template< typename T > struct classify_object< T, typename std::enable_if< is_complex< T >::value >::type >{static constexpr object_category value{object_category::complex_number};};template< typename T > struct uncommon_type{using type=typename std::conditional<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&!std::is_assignable< T &, std::string >::value &&!std::is_constructible< T, std::string >::value &&!is_complex< T >::value &&!is_mutable_container< T >::value &&!std::is_enum< T >::value, std::true_type, std::false_type >::type;static constexpr bool value=type::value;};template< typename T >struct classify_object< T, typename std::enable_if<(!is_mutable_container< T >::value &&is_wrapper< T >::value &&!is_tuple_like< T >::value &&uncommon_type< T >::value)>::type >{static constexpr object_category value{object_category::wrapper_value};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&is_direct_constructible< T, double >::value &&is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::number_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&!is_direct_constructible< T, double >::value &&is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::integer_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&is_direct_constructible< T, double >::value &&!is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::double_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< is_tuple_like< T >::value &&((type_count< T >::value >=2 &&!is_wrapper< T >::value)||(uncommon_type< T >::value &&!is_direct_constructible< T, double >::value &&!is_direct_constructible< T, int >::value)||(uncommon_type< T >::value &&type_count< T >::value >=2))>::type >{static constexpr object_category value{object_category::tuple_value};};template< typename T > struct classify_object< T, typename std::enable_if< is_mutable_container< T >::value >::type >{static constexpr object_category value{object_category::container_value};};template< typename T, enable_if_t< classify_object< T >::value==object_category::char_value, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"CHAR";}template< typename T, enable_if_t< classify_object< T >::value==object_category::integral_value||classify_object< T >::value==object_category::integer_constructible, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"INT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::unsigned_integral, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"UINT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::floating_point||classify_object< T >::value==object_category::number_constructible||classify_object< T >::value==object_category::double_constructible, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"FLOAT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::enumeration, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"ENUM";}template< typename T, enable_if_t< classify_object< T >::value==object_category::boolean_value, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"BOOLEAN";}template< typename T, enable_if_t< classify_object< T >::value==object_category::complex_number, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"COMPLEX";}template< typename T, enable_if_t< classify_object< T >::value >=object_category::string_assignable &&classify_object< T >::value<=object_category::other, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"TEXT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value >=2, detail::enabler >=detail::dummy >std::string type_name();template< typename T, enable_if_t< classify_object< T >::value==object_category::container_value||classify_object< T >::value==object_category::wrapper_value, detail::enabler >=detail::dummy >std::string type_name();template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value==1, detail::enabler >=detail::dummy >inline std::string type_name(){return type_name< typename std::decay< typename std::tuple_element< 0, T >::type >::type >);}template< typename T, std::size_t I >inline typename std::enable_if< I==type_count_base< T >::value, std::string >::type tuple_name(){return std::string{};}template< typename T, std::size_t I >inline typename std::enable_if<(I< type_count_base< T >::value), std::string >::type tuple_name(){auto str=std::string{type_name< typename std::decay< typename std::tuple_element< I, T >::type >::type >)}+ ','+tuple_name< T, I+1 >);if(str.back()== ',') str.pop_back();return str;}template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value >=2, detail::enabler > > std::string type_name()
Recursively generate the tuple type name.
Definition: CLI11.h:1729
virtual void getDescriptiveName(UT_String &str) const
virtual bool isSubnetInput() const
Returns true if the node is considered a subnet's input node.
Definition: VOP_Node.h:963
GLuint const GLchar * name
Definition: glcorearb.h:786
static const char *const NO_MENU
Menu options for this parameter.
VOP_ParmGenerator * castToParmGenerator() override
const VOP_ParmGenerator * castToParmGenerator() const override
GLenum GLenum GLsizei void * table
Definition: glad.h:5129
auto search(const T &set, const V &val) -> std::pair< bool, decltype(std::begin(detail::smart_deref(set)))>
A search function.
Definition: CLI11.h:3170
static const char *const SCOPE_SUBNET
Obtains the scope for this parameter.
virtual void initializeNode()
static PRM_ChoiceList theParmscopeMenu
Scope menu helpers for subclasses.
virtual void getCode(UT_String &codestr, const VOP_CodeGenContext &context)
Get the code fragment to be included in the shader code.
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
virtual const char * outputLabel(unsigned idx) const
virtual void getOutputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual void getOutputNameSubclass(UT_String &out, int idx) const
static const char *const SCOPE_SHADER
Obtains the scope for this parameter.
bool isExportParm() const
Returns true if it's an exported parameter.
OP_EventType
Definition: OP_Value.h:22
VOP_Type
Enumeration of the built-in (basic) VOP data types.
Definition: VOP_Types.h:25
virtual void getInputNameSubclass(UT_String &in, int idx) const
virtual void preDelete()
Definition: OP_Node.h:2702
Definition: core.h:1131
virtual VOP_Node * getRealDefinition()
Definition: VOP_Node.h:1074
virtual bool getIsParmGenerator() const
Returns true if this VOP is a VOP_ParmGenerator or subclass.
type
Definition: core.h:1059
void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms) override
static const char *const SCOPE_CLASS
Obtains the scope for this parameter.
Definition: format.h:895
const OP_DataMicroNode & parmListMicroNodeConst() const override
void opChanged(OP_EventType reason, void *data=0) override
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)
CH_ScriptLanguage
GLenum src
Definition: glcorearb.h:1793
virtual void postOpChanged(OP_EventType, void *)
Definition: VOP_Node.h:1455