12 #ifndef __VOP_ScriptNode__
13 #define __VOP_ScriptNode__
45 const char *
inputLabel(
unsigned idx)
const override;
46 const char *
outputLabel(
unsigned idx)
const override;
70 bool check_shader_context)
const override;
73 int inputidx)
const override;
75 static void buildInputSetMenu(
void *,
PRM_Name *,
int,
78 int getCurrentInputSet()
const;
88 bool keep_info =
false);
89 virtual bool getIsInputDefinedByParmChild(
int idx)
const;
90 virtual bool getIsOutputDefinedByParmChild(
int idx)
const;
103 void updateCurrentInputSet();
107 unsigned getNumScriptOpInputs()
const;
109 int findScriptOpInput(
const char *input_name)
const;
121 unsigned getNumScriptOutputs()
const;
122 int findScriptOpOutput(
130 virtual bool hasCorrespondingInput(
int output_idx)
const;
133 UT_String &function_name)
const override;
137 const char *input,
int inputidx)
const;
138 bool getBestMatchingInput(
int &input_index,
142 bool getHideInputsUsingParameterVisibleState()
const;
146 int myCurrentInputSet;
148 bool myUpdatingInputSetFlag;
virtual int getInputFromNameSubclass(const UT_String &in) const
Reprsents a language for which VOPs can generate source code.
virtual void getOuterCode(UT_String &codestr, const VOP_CodeGenContext &context)
virtual void getVopFunctionName(UT_String &function_name) const
virtual void initMaterialFlag()
virtual UT_StringHolder getShaderNameForSignature(const UT_StringRef &signature) const
Returns the name, type, and render mask of the VOP shader.
virtual bool getCurrentSignatureName(UT_String &name)
Obtains the current signature name.
virtual void setCurrentSignature(const char *name)
virtual bool getParmConstantString(const char *parmname, const VOP_TypeInfo &type_info, UT_String &str, bool expand_string, const VOP_Language *l=0)
Get the constant code that encodes the value of the node parameter.
virtual bool isCachedShader() const
virtual bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &context, bool check_shader_context) const
virtual int getShaderExtraParameters(UT_Array< VOP_Type > &types, UT_IntArray &doexport, UT_StringArray &names, UT_StringArray &def, VOP_Type shader_type=VOP_TYPE_UNDEF) const
virtual bool getIsInputVisibleDefaultSubclass(int idx)
bool updateParmsFlags() override
virtual const char * inputLabel(unsigned idx) const
virtual void getSignatureName(UT_String &name, int index) const
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual bool definesShaderExtraParameters() const
virtual bool isShader() const
virtual bool shouldOutputNodeVariableDeclarations() const
virtual void getParmNameFromInput(UT_String &parmname, int inputidx) const
virtual int getSignatureCount() const
GLuint const GLchar * name
virtual void getCode(UT_String &codestr, const VOP_CodeGenContext &context)
Get the code fragment to be included in the shader code.
virtual bool allowUSDShaderParm(PRM_Parm &parm)
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
VOP_Type
Enumeration of the built-in (basic) VOP data types.
virtual void getModulesToImport(UT_StringArray &modules, const VOP_CodeGenContext &context)
If the node generates a shader call, get the modules names to import.
virtual void getInputNameSubclass(UT_String &in, int idx) const
virtual bool getCachedShaderCode(std::ostream &os, VOP_ContextType context_type) const
virtual void getAllowedInputTypeInfosSubclass(unsigned idx, VOP_VopTypeInfoArray &infos)
GLsizei GLenum GLenum * types
virtual void getAllowedInputTypeInfos(unsigned idx, VOP_VopTypeInfoArray &typeinfos)
virtual void ensureParametersAreValid()
void opChanged(OP_EventType reason, void *data=0) override