00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __ROP_RenderCmdParms_h__
00018 #define __ROP_RenderCmdParms_h__
00019
00020
00021 #include "ROP_API.h"
00022 #include <UT/UT_Assert.h>
00023 #include <UT/UT_FloatArray.h>
00024 #include <UT/UT_PtrArray.h>
00025 #include <UT/UT_RefArray.h>
00026
00027 class ROP_Node;
00028 class SOHO_ParmOverride;
00029
00030 class ROP_API ROP_RenderCmdParms
00031 {
00032 public:
00033 ROP_RenderCmdParms() :
00034 myOutputFile(NULL),
00035 myOutputFormat(NULL),
00036 myToFlipbook(false),
00037 myQuality(2),
00038 myIgnoreInputs(false),
00039 myInterleaveFrames(false),
00040 myIgnoreBypass(false),
00041 myIgnoreLock(false),
00042 myTrackDependencies(false),
00043 myPrintDependencies(false),
00044 myPrintFullPath(false),
00045 myCondenseRanges(false),
00046 myOutStream(NULL),
00047 myErrStream(NULL),
00048 mySohoParms(NULL),
00049 myValidationFlags(0) {}
00050 ~ROP_RenderCmdParms();
00051
00052
00053
00054
00055 void setFrameRange(fpreal start_fr, fpreal end_fr);
00056 bool getFrameRange(float &start_fr, float &end_fr);
00057
00058
00059
00060
00061
00062 void setFrameIncrement(fpreal finc);
00063 bool getFrameIncrement(float &finc);
00064
00065 SOHO_ParmOverride *getSohoParms() { return mySohoParms; }
00066
00067
00068 void setOutputFile(const char *output);
00069 const char *getOutputFile() { return myOutputFile; }
00070
00071
00072 void setOutputFormat(const char *fmt);
00073 const char *getOutputFormat() { return myOutputFormat; }
00074
00075
00076 void setResolutionScale(fpreal scale);
00077
00078
00079 void setToFlipbook(bool on = true);
00080 bool isToFlipbook() { return myToFlipbook; }
00081
00082
00083 void setQuality(int quality) { myQuality = quality; }
00084 int getQuality() { return myQuality; }
00085
00086
00087 void setIgnoreInputs(bool on = true) { myIgnoreInputs = on; }
00088 bool isIgnoreInputs() { return myIgnoreInputs; }
00089
00090
00091 void setInterleaveFrames(bool on = true)
00092 { myInterleaveFrames = on; }
00093 bool isInterleaveFrames() { return myInterleaveFrames; }
00094
00095
00096 void setIgnoreBypass(bool on = true) { myIgnoreBypass = on; }
00097 bool isIgnoreBypass() { return myIgnoreBypass; }
00098
00099
00100 void setIgnoreLock(bool on = true) { myIgnoreLock = on; }
00101 bool isIgnoreLock() { return myIgnoreLock; }
00102
00103
00104
00105
00106
00107 void setTrackDependencies(bool on = true)
00108 { myTrackDependencies = on; }
00109 bool isTrackDependencies() { return myTrackDependencies; }
00110
00111
00112
00113
00114
00115 void setPrintDependencies(bool print_dependencies,
00116 bool print_full_path,
00117 bool condense_ranges)
00118 {
00119 myPrintDependencies = print_dependencies;
00120 myPrintFullPath = print_full_path;
00121 myCondenseRanges = condense_ranges;
00122 }
00123 bool isPrintDependencies()
00124 {
00125 if (myPrintDependencies)
00126 UT_ASSERT(getOutStream());
00127 return myPrintDependencies;
00128 }
00129 bool isPrintFullPath()
00130 {
00131 if (myPrintFullPath)
00132 UT_ASSERT(isPrintDependencies());
00133 return myPrintFullPath;
00134 }
00135 bool isCondenseRanges()
00136 {
00137 if (myCondenseRanges)
00138 UT_ASSERT(isPrintDependencies());
00139 return myCondenseRanges;
00140 }
00141
00142 void setOutStream(ostream *out) { myOutStream = out; }
00143 ostream *getOutStream() { return myOutStream; }
00144
00145 void setErrStream(ostream *err) { myErrStream = err; }
00146 ostream *getErrStream() { return myErrStream; }
00147
00148
00149
00150
00151 const UT_PtrArray<ROP_Node*> &getROPDependencies()
00152 {
00153 UT_ASSERT(isTrackDependencies());
00154 return myROPDependencies;
00155 }
00156
00157
00158
00159
00160 const UT_RefArray<UT_FloatArray> &getFrameDependencies()
00161 {
00162 UT_ASSERT(isTrackDependencies());
00163 return myFrameDependencies;
00164 }
00165
00166
00167
00168 int addROPDependency(ROP_Node *node);
00169
00170
00171
00172 void addFrameDependency(int node_id, float frame);
00173
00174 void setSohoString(const char *parm, const char *value);
00175 void setSohoReal(const char*parm, fpreal *value, int vsize=1);
00176 void setSohoInt(const char*parm, int *value, int vsize=1);
00177
00178 private:
00179 void setValidationFlag(int flag, bool on = true);
00180 bool testValidationFlag(int flag);
00181
00182 float myStartFrame;
00183 float myEndFrame;
00184 float myFrameInc;
00185 const char *myOutputFile;
00186 const char *myOutputFormat;
00187 bool myToFlipbook;
00188 int myQuality;
00189 bool myIgnoreInputs;
00190 bool myInterleaveFrames;
00191 bool myIgnoreBypass;
00192 bool myIgnoreLock;
00193 bool myTrackDependencies;
00194 bool myPrintDependencies;
00195 bool myPrintFullPath;
00196 bool myCondenseRanges;
00197 ostream *myOutStream;
00198 ostream *myErrStream;
00199 SOHO_ParmOverride *mySohoParms;
00200
00201 UT_PtrArray<ROP_Node*> myROPDependencies;
00202 UT_RefArray<UT_FloatArray> myFrameDependencies;
00203
00204 int myValidationFlags;
00205 };
00206
00207 #endif