12 #ifndef __VOP_OperatorInfo__
13 #define __VOP_OperatorInfo__
42 void setTag(
const char*
name,
const char*
value);
44 bool hasTag(
const char *name)
const;
74 void removeTypeInfo(
int i);
80 { myDefaultInputNames.append(name); }
82 { myDefaultInputNames.insert(name, i); }
84 { myDefaultInputNames.remove(i); }
87 {
return myDefaultInputNames(i); }
89 { myDefaultInputNames(i) = new_name; }
92 void insertValueOption(
94 void removeValueOption(
int i);
96 void changeValueOption(
int i,
const VOP_TypeInfo &type_info,
97 const char *new_val = NULL);
100 {
return myTypeInfos.entries(); }
102 {
return myDefaultInputNames.entries();}
104 {
return myValueOptions.entries();}
107 { myTags.setTag(name, value); }
109 {
return myTags.getTag(name); }
111 {
return myTags.hasTag(name); }
115 { myTags = src_info.myTags; }
120 myFlags |= flag_type;
122 myFlags &= ~flag_type;
127 return ((myFlags & flag_type) != 0);
132 myFlags = src_info.myFlags;
167 void setOuterCode(
const UT_String &code);
169 {
return myOuterCode; }
170 void setVopnetMask(
const char *
mask);
172 {
return myVopnetMask; }
173 void setRenderMask(
const char *
mask);
175 {
return myRenderMask; }
177 {
return myOutputInfos; }
179 {
return myOutputInfos; }
181 {
return myInputInfos; }
183 {
return myInputInfos; }
185 {
return myInputSetNames; }
187 {
return myInputSetNames; }
189 {
return myInputSetLabels; }
191 {
return myInputSetLabels; }
193 {
return myInputSetScriptNames; }
195 {
return myInputSetScriptNames; }
197 {
return myForceCodeGeneration; }
199 {
return myForceCodeGeneration; }
201 {
return myExternalShader; }
203 {
return myExternalShader; }
205 {
return myShaderType; }
207 { myShaderType =
t; }
209 void clearInOutInfo();
218 const char *input_name,
int input_set_index)
const;
219 void getParmNameFromInput(
UT_String &parm_name,
220 const char *input_name,
int input_set_index)
const;
222 const char *input_name,
int input_set_index)
const;
239 {
return myExtraParametersFormat.size()>0; }
243 {
return myExtraParametersFormat; }
250 {
return myHideInputsUsingParameterVisibleState; }
252 static void saveInOutInfoToDialogScript(std::ostream &os,
254 const char *infotype);
255 static void saveInputFlags(std::ostream &os,
257 const char *token,
bool only_nonzero_flags);
271 bool myForceCodeGeneration;
272 bool myExternalShader;
273 bool myHideInputsUsingParameterVisibleState;
const UT_String & getOuterCode() const
void setLabel(const UT_StringHolder &label)
const UT_StringArray & getInputSetLabels() const
GLuint GLsizei const GLchar * label
void setTag(const char *name, const char *value)
UT_ValArray< VOP_InOutInfo * > & getInputInfos()
void copyTagsFrom(VOP_InOutInfo &src_info)
Class containing information about node's input or output connector port.
bool getHideInputsUsingParameterVisibleState() const
Returns true if the scripted vop node uses the parameter visible state.
UT_StringArray & getInputSetScriptNames()
const UT_StringHolder & getInputName(int i) const
bool hasTag(const char *name) const
UT_Array< VOP_Type > VOP_VopTypeArray
const UT_StringArray & getInputSetScriptNames() const
const bool & getForceCodeGeneration() const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
void copyFlagsFrom(VOP_InOutInfo &src_info)
virtual void updateExtraInfoBuffer(OP_ExtraInfoBuffer &b) const
UT_ValArray< VOP_InOutInfo * > & getOutputInfos()
bool & getExternalShader()
void setShaderType(VOP_Type t)
UT_StringArray & getInputSetLabels()
const UT_String & getCode() const
void setAllFlags(int flags)
void setInputName(int i, const char *new_name)
const bool & getExternalShader() const
const UT_StringArray & getExtraParametersFormat() const
Returns the extra parameters tokens parsed from the code string.
const VOP_InOutTagMap & getTagsMap() const
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
virtual void saveToDialogScript(std::ostream &os) const =0
void removeInputName(int i)
const UT_StringHolder & getLabel() const
A map of string to various well defined value types.
void insertInputName(const char *name, int i)
void setName(const UT_StringHolder &name)
bool hasExtraParameters() const
Check if the code has extra parameters.
LeafData & operator=(const LeafData &)=delete
int getNumOptions() const
bool & getForceCodeGeneration()
VOP_Type
Enumeration of the built-in (basic) VOP data types.
Class containing tags for an input or an output.
VOP_Type getShaderType() const
const UT_StringHolder & getName() const
const UT_ValArray< VOP_InOutInfo * > & getInputInfos() const
const UT_String & getRenderMask() const
UT_StringHolder getTag(const char *name) const
bool hasFlag(VOP_ConnectorFlagType flag_type)
const UT_ValArray< VOP_InOutInfo * > & getOutputInfos() const
UT_Array< VOP_TypeInfo > VOP_VopTypeInfoArray
UT_StringArray & getInputSetNames()
const UT_String & getVopnetMask() const
void setFlag(VOP_ConnectorFlagType flag_type, bool value)
void addInputName(const char *name)
const UT_StringArray & getInputSetNames() const