00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Elendt 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: SHOP_OperatorInfo.h ( SHOP Library, C++) 00015 * 00016 * COMMENTS: This is additional information available via every SHOP 00017 * operator. 00018 */ 00019 00020 #ifndef __SHOP_OperatorInfo__ 00021 #define __SHOP_OperatorInfo__ 00022 00023 #include "SHOP_API.h" 00024 #include <UT/UT_String.h> 00025 #include <OP/OP_Operator.h> 00026 #include "SHOP_NodeTypes.h" 00027 00028 // Some clerks should be automatically added to every SHOP of a specify 00029 // type (for example OGL shops should be added to all surface SHOPs). The 00030 // following enum controls which clerks can add themselves to the 00031 // RenderMask. 00032 enum { 00033 SHOP_AUTOADD_NONE = 0, // No clerks can add themselves 00034 SHOP_AUTOADD_STRING = 1, // Only clerks which have string data 00035 SHOP_AUTOADD_ANY = 2 // Any clerk can add itself 00036 }; 00037 00038 class SHOP_API SHOP_OperatorInfo : public OP_SpecificData 00039 { 00040 public: 00041 SHOP_OperatorInfo(int autoadd=SHOP_AUTOADD_ANY, 00042 const char *rmask="*", 00043 SHOP_TYPE type=SHOP_INVALID); 00044 virtual ~SHOP_OperatorInfo(); 00045 00046 const char *getRenderMask() const { return myRenderMask; } 00047 SHOP_TYPE getShaderType() const { return myShaderType; } 00048 00049 void setShaderType(SHOP_TYPE t); 00050 void setRenderMask(const char *t); 00051 00052 void saveToDialogScript(ostream &os) const; 00053 00054 void setNumOutputs(int n) { myNumOutputs = n; } 00055 int getNumOutputs() const { return myNumOutputs; } 00056 00057 VEX_ContextType getVexContextType() const; 00058 RSL_ContextType getRslContextType() const; 00059 00060 bool skipInputEditor() const 00061 { return mySkipInputEditor; } 00062 void setSkipInputEditor(bool v) 00063 { mySkipInputEditor = v; } 00064 00065 private: 00066 SHOP_TYPE myShaderType; 00067 UT_String myRenderMask; 00068 int myAutoAdd; 00069 int myNumOutputs; // 1 for everything but subnet? 00070 bool mySkipInputEditor; 00071 }; 00072 #endif 00073
1.5.9