48 #define SHOP_RENDERTYPE_OPTION "rendertype"
49 #define SHOP_FPRECISION_OPTION "soho_precision"
50 #define SHOP_DEFAULT_CLERK "VMantra"
67 virtual int getFirstParameter();
68 virtual int getLastParameter();
79 virtual bool matchesShaderType(
SHOP_TYPE shop_type);
88 bool canHaveInputsForCoshaderParms()
const;
100 SHOP_Node * getCoShaderInputNode(
const char* parm_name);
111 const char* parm_name,
123 virtual int getInputTileLOD()
const;
124 virtual int getOutputTileLOD()
const;
125 virtual bool isInputVisible(
int idx)
const;
126 virtual bool isOutputVisible(
int idx)
const;
128 virtual SHOP_Node *getOutputNode()
const;
131 virtual SHOP_TYPE getInputType(
int idx)
const;
134 virtual SHOP_TYPE getOutputType(
int idx)
const;
140 {
return myVisibleInputs; }
142 {
return myVisibleOutputs; }
148 getShaderName(
bool forvex,
SHOP_TYPE shoptype)
const;
165 static void popCallers();
173 SHOP_Clerk *getAnyClerk(
bool only_string_generators);
212 virtual bool buildVopShaderString(
VOP_Node *vop,
222 static void initializeExpressions();
224 static OP_Operator *getMaterialManagementOperator();
245 const char *vtxsrc,
const char *geomsrc,
247 { myOGLScriptCache =
val;
248 myOGLVtxSource.harden(vtxsrc);
249 myOGLGeomSource.harden(geomsrc);
250 myOGLFragSource.harden(fragsrc);
251 myOGLProgram.clear();
254 const char *program_file)
255 { myOGLScriptCache = enable ? 1 : -1;
256 myOGLVtxSource.clear();
257 myOGLGeomSource.clear();
258 myOGLFragSource.clear();
259 myOGLProgram.harden(program_file);
262 {
return (
const char *) myOGLVtxSource; }
264 {
return (
const char *) myOGLGeomSource; }
266 {
return (
const char *) myOGLFragSource; }
269 {
return (
const char *) myOGLProgram; }
277 const char *parm_name,
278 int vector_index,
fpreal now,
281 const char *rtype,
int fprecision);
297 bool evalShopParameter(
const char *name,
int vec_idx,
300 bool add_cook_dependency=
false);
301 bool evalShopParameter(
const char *name,
int vec_idx,
304 bool add_cook_dependency=
false);
305 bool evalShopParameter(
const char *name,
int vec_idx,
308 bool add_cook_dependency=
false);
312 {
return &myMaterialIconFilename; }
314 { myMaterialIconFilename.harden(icon_file); }
317 {
return &myMaterialIconImage; }
320 {
return myAllowIconRegeneration; }
322 { myAllowIconRegeneration = allow; }
357 virtual void updateVisibleInputsAndOutputs();
361 void resolveParmBundle(
const char *parm_name,
366 bool expand_fullpath =
false);
370 SHOP_Node *getFullInput(
int input_idx,
int &output_idx)
const;
380 bool renderMatch(
const char *rendertype)
const;
381 bool renderMatch(
const SHOP_Clerk &clerk)
const;
404 static void installCommands();
417 if (myObject || mySop)
422 if (myObject || mySop)
virtual int saveCookedData(std::ostream &os, OP_Context &, int binary=0)=0
Reprsents a language for which VOPs can generate source code.
void addCommonError(UT_CommonErrorCode what, const char *msg=0)
virtual void createGalleryEntry(OP_GalleryEntry &entry)
int getOGLScriptCacheState() const
static void pushCallers(OP_Node *obj, OP_Node *sop)
virtual void buildVexScript(UT_String &script, fpreal t, OP_Node *owner, UT_Map< int, bool > *visitlist=0)
GT_API const UT_StringHolder selection
virtual bool updateParmsFlags()
void addWarning(SHOP_ErrorCode code, const char *msg=0)
fpreal getH() const override
Node position/scale is used by the UI.
void setMaterialIconAllowRegenerateFlag(bool allow) override
fpreal getW() const override
Node position/scale is used by the UI.
virtual void getInputName(UT_String &in, int idx) const
#define SYS_VISIBILITY_EXPORT
SHOP_AutoPushCallers(OP_Node *obj, OP_Node *sop)
virtual bool createSpareParametersForLoad(UT_StringArray &, PRM_ParmNameMap &, UT_String &)
UT_API UT_ErrorSeverity UTaddFatal(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
const GLuint GLenum const void * binary
static const char * theChildTableName
UT_String myOGLGeomSource
Filter used by material vop containers.
const UT_IntArray & getVisibleOutputs() const
bool cookedDataUsesAllParameters() const override
const char * getOGLGeomSource() const
virtual int getDataClass() const
**But if you need a result
void addMessage(SHOP_ErrorCode code, const char *msg=0)
UT_IntArray myVisibleInputs
UT_API UT_ErrorSeverity UTaddMessage(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
SYS_VISIBILITY_EXPORT void newShopOperator(OP_OperatorTable *)
UT_API UT_ErrorSeverity UTaddSystemError(const char *msg=0)
virtual OP_ERROR cookMe(OP_Context &context)=0
virtual bool getAllowSavingChild(OP_Node *node, const OP_SaveFlags &flags)
Returns true if the child at node can should be saved, false otherwise.
bool cookedDataNeedsErrors() const override
UT_String myOGLFragSource
virtual void saveDialogScriptExtraInfo(std::ostream &os)
UT_IntArray myVisibleOutputs
const char * getOGLShaderProgram() const
void setMaterialIconFilename(const char *icon_file) override
UT_String myMaterialIconFilename
virtual int getOutputFromName(const UT_String &out) const
UT_String * getMaterialIconFilename() override
const char * getOGLVtxSource() const
GLuint const GLchar * name
virtual OP_DataType getCookedDataType() const =0
GLenum GLenum GLsizei void * table
virtual OP_OpTypeId getOpTypeID() const
bool myAllowIconRegeneration
virtual bool allowOperatorAsChild(OP_Operator *op)
UT_API UT_ErrorSeverity UTaddCommonError(UT_CommonErrorCode what, const char *msg=0)
virtual bool createSpareParametersFromChannels(UT_BitArray &selection, const CH_ChannelList &channels)
IMG_Raster * getMaterialIconImage() override
void addSystemError(const char *msg=0)
virtual const char * getChildType() const
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
A map of string to various well defined value types.
virtual const char * getFileExtension(int binary) const =0
const UT_IntArray & getVisibleInputs() const
bool evalVariableValue(fpreal &v, int idx, int thread) override
virtual const char * getOpType() const
UT_API UT_ErrorSeverity UTaddWarning(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
virtual int getInputFromName(const UT_String &in) const
VOP_Type
Enumeration of the built-in (basic) VOP data types.
virtual OP_OpTypeId getChildTypeID() const =0
virtual bool runCreateScript()
virtual bool evalVariableValue(UT_String &val, int index, int thread)
void setOGLScriptCache(int val, const char *vtxsrc, const char *geomsrc, const char *fragsrc)
bool getMaterialIconAllowRegenerateFlag() override
virtual void getOutputName(UT_String &out, int idx) const
void setOGLShaderProgram(bool enable, const char *program_file)
GLsizei GLenum GLenum * types
const char * getOGLFragSource() const
void addFatal(SHOP_ErrorCode code, const char *msg=0)
void addError(int code, const char *msg=0)
virtual OP_ERROR bypassMe(OP_Context &context, int &copied_input)=0
static OP_VariablePair myVariablePair
virtual const PRM_Template * getShaderParmTemplates()
const UT_String & getRenderMask() const
UT_API UT_ErrorSeverity UTaddError(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
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)
virtual void onCreated()
Overriden in VOPs.
virtual void deleteCookedData()=0
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
IMG_Raster myMaterialIconImage