HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROP_Node.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: ROP Library (C++)
7  *
8  * COMMENTS: The base class for all Render Operators
9  *
10  */
11 
12 #ifndef __ROP_Node_h__
13 #define __ROP_Node_h__
14 
15 #include "ROP_API.h"
16 #include <OP/OP_Network.h>
17 #include <CH/CH_Manager.h>
18 #include "ROP_Verbose.h"
19 #include "ROP_RenderItem.h"
20 
21 class OP_OperatorTable;
22 class OP_TemplatePair;
23 class IMG_Raster;
24 class UT_Interrupt;
25 class UT_IStream;
26 
27 class ROP_Verbose;
28 class ROP_Node;
29 class ROP_ExecuteContext;
30 class ROP_IFD;
31 class ROP_IFDBase;
32 class ROP_SohoOp;
33 class ROP_RenderCmdParms;
34 class ROP_RenderItem;
35 class ROP_RenderList;
36 class ROP_RenderDepParms;
37 class GU_DetailHandle;
38 class TAKE_Take;
39 class TIL_Sequence;
40 class IMG_Format;
41 class IMG_TileOptions;
42 class IMG_FileParms;
43 
44 extern "C" {
46 };
47 
49 {
50  ROP_ABORT_RENDER = 0, // Stop rendering
51  ROP_CONTINUE_RENDER = 1, // Go on to the next frame
52  ROP_RETRY_RENDER = 2 // Retry this frame (primarily for network)
53 };
54 
56 {
66 };
67 
68 enum
69 {
77 };
78 
79 typedef void (*ROP_ExecuteOverride)(ROP_Node *me, fpreal time, void *data);
81 
82 #define FLT_PARM(name, vi, t) \
83  { return evalFloat(name, vi, t); }
84 #define FLT_SET(name, vi, t, val) \
85  { setFloat(name, vi, t, val); }
86 #define INT_SET(name, vi, t, val) \
87  { setInt(name, vi, t, val); }
88 
89 #define INT_PARM(name, vi, t) \
90  { return evalInt(name, vi, t); }
91 
92 #define INT_SET(name, vi, t, val) \
93  { setInt(name, vi, t, val); }
94 
95 #define STR_PARM(name, vi, t) \
96  { evalString(str, name, vi, t); }
97 
98 //___________________________________________________________________________
99 
100 class ROP_SohoOutput;
101 class SOHO_IPRList;
102 class ROP_OpenGL;
103 
105 {
106 public:
107  // Standard OP_Network stuff:
108  static const char *theChildTableName;
109  virtual const char *getChildType() const;
110  virtual const char *getOpType() const;
111 
112  virtual OP_OpTypeId getChildTypeID() const;
113  virtual OP_OpTypeId getOpTypeID() const;
114 
115  // Nobody should have to override this, but it's public for other people
116 
117  virtual bool updateParmsFlags();
118  virtual OP_DataType getCookedDataType() const;
119  virtual void *getCookedData(OP_Context &context);
120 
121  // The castToROPIFD() method returns a pointer to an IFD node or NULL
122  // if the ROP is not an IFD ROP. If a pointer is returned it may be
123  // a representative node, and care must be taken to not confuse the
124  // returned node with the node on which the method was called.
125  // TODO: check places that store the return of this function.
126  virtual ROP_IFD *castToROPIFD();
127  virtual ROP_IFDBase *castToROPIFDBase();
128  virtual ROP_SohoOp *castToROPSoho();
129  virtual ROP_OpenGL *castToROPOpenGL();
130 
131  virtual bool hasImageOutput();
132 
133  // Returns true if rendering will overwrite any existing files.
134  virtual bool detectIfExistingOutputFiles();
135  // Runs through the output sequence deleting any matching files.
136  virtual void deleteExistingOutputFiles();
137 
138  static void buildOperatorTable(OP_OperatorTable &table);
139  static OP_Operator *getManagementOperator();
140  static OP_Operator *getCHOPManagementOperator();
141  static OP_Operator *getCOP2ManagementOperator();
142  static OP_Operator *getDOPManagementOperator();
143  static OP_Operator *getSOPManagementOperator();
144  static OP_Operator *getLOPManagementOperator();
145  static void buildGameOperatorTable(OP_OperatorTable &table);
146  static void initSimulationOPs();
147  //
148  // The following method will return 1 if the raster was successfully
149  // generated. Otherwise, it will return 0.
150  // If the OP is incapable of generating a raster, an error will be
151  // generated.
152  int renderFile(OP_Context &ctx, float aspect,
153  const char *file);
154 
155  /// Reference one parameter. However, for ROPs, we don't want to
156  /// reference the render button.
157  virtual bool referenceSingleParameter(OP_Parameters *from,
158  int parm_idx,
159  const char *relative_path = NULL);
160 
161  OP_ERROR execute(fpreal now, ROP_Verbose *verbose=NULL);
162  OP_ERROR executeSingle(fpreal time,
163  ROP_Verbose *verbose=NULL,
164  SOHO_IPRList *ipr=0,
165  ROP_SohoOutput *out=0,
166  bool generate=false);
167 
168  // Execute full will perform a render for the viewport or render menu.
169  // 1) If not a sequence render, force background rendering
170  // 2) Call the render manager to execute the render network
171  // 3) Restore things
172  OP_ERROR executeFull(fpreal now, bool sequence = false);
173 
174  // These calling mechanisms allow us to start an execute, then call
175  // nextExecute() on our own time, finishing with endExecute(). This allows
176  // callers to do things between renders...
177  ROP_ExecuteContext *getExecuteContext() { return myEContext; }
178  void setExecuteContext(ROP_ExecuteContext *c)
179  { myEContext = c; }
180 
182  { myExecuteOverride = f;
183  myExecuteOverrideData = d;
184  }
186  { myPreExecuteOverride = f;
187  myPreExecuteOverrideData = d;
188  }
190  { myPostExecuteOverride = f;
191  myPostExecuteOverrideData = d;
192  }
193  OP_ERROR startExecute(fpreal now, ROP_Verbose *verbose = NULL);
194  OP_ERROR nextExecute(int &again);
195  OP_ERROR endExecute(int &again);
196 
198  {
199  myRenderMode = mode;
200  }
201 
203  {
204  return myRenderMode;
205  }
206 
207  void setRenderOutput(UT_String &);
208  UT_String &getRenderOutput();
209  UT_String &getRenderDevice();
210  UT_String &getRenderSuffix();
211  void setRenderResX(int x);
212  void setRenderResY(int y);
213  int getRenderResX();
214  int getRenderResY();
215  void setRenderAspect(float aspect);
216  float getRenderAspect();
217 
218  virtual void getRenderedImageInfo(TIL_Sequence &seq);
219 
220  // The following methods have to be public for Remote
221  virtual void SETDORANGE(int val)
222  { INT_SET("trange", 0, 0, val) }
223  virtual int DORANGE()
224  {
225  if(myOverrideFrameRangeFlag)
226  return 1;
227  initRenderDependencyVars(CHgetEvalTime());
228  return myCachedDoRange;
229  }
230 
231  virtual fpreal FSTART()
232  {
233  if(myOverrideFrameRangeFlag)
234  return myOverrideStartFrame;
235  initRenderDependencyVars(CHgetEvalTime());
236  return myCachedStart;
237  }
238  virtual fpreal FEND()
239  {
240  if(myOverrideFrameRangeFlag)
241  return myOverrideEndFrame;
242  initRenderDependencyVars(CHgetEvalTime());
243  return myCachedEnd;
244  }
245 
246  virtual fpreal FINC()
247  {
248  if(myOverrideFrameRangeFlag)
249  return myOverrideFrameInc;
250  initRenderDependencyVars(CHgetEvalTime());
251  return myCachedInc;
252  }
253 
254 
255  static int doRenderCback(void *data, int index,
256  fpreal time,
257  const PRM_Template *);
258 
259  static int doRenderBackgroundCback(void *data, int index,
260  fpreal time,
261  const PRM_Template *);
262  static int doRenderDialog(void *data, int index,
263  fpreal time,
264  const PRM_Template *);
265 
266  static PRM_Template *getROPbaseTemplate();
267  static PRM_Template *getROPscriptTemplate();
268  static OP_TemplatePair *getROPcop2Template();
269  static CH_LocalVariable myVariableList[];
270 
271  bool executePreRenderScript(fpreal ttime);
272  bool executePreFrameScript(fpreal ttime);
273  bool executePostFrameScript(fpreal ttime);
274  bool executePostWriteScript(fpreal ttime);
275  bool executePostRenderScript(fpreal ttime);
276 
277  static void buildRibVersionMenu(PRM_Name *menu, int max,
278  bool for_archive=false);
279 
280  //Absolute Width
281  virtual fpreal getW() const;
282  //Absolute Height
283  virtual fpreal getH() const;
284 
285  // This adds render items to a ordered list. The list is traversed from
286  // 1 -> entries to render.
287  virtual void buildRenderDependencies(const ROP_RenderDepParms &p);
288 
289  virtual void postProcessList( ROP_RenderList &list,
290  const ROP_RenderDepParms &p);
291 
292  virtual void initRenderDependencies();
293  virtual void cleanupRenderDependencies();
294 
295  void addJobFrames(const char *job_name,
296  const char *frame_string);
297 
298  static void setDependencyRenderFlag(bool f);
299  static bool getDependencyRenderFlag();
300 
301  static void setFrameByFrameFlag(bool f);
302  static bool getFrameByFrameFlag();
303 
304  static void setRenderScriptFlag(bool enable);
305  static bool getRenderScriptFlag();
306 
307  static void setOutputResolutionScale(fpreal xscale,fpreal yscale);
308  static void getOutputResolutionScale(float &xs, float &ys);
309 
310  virtual bool getOutputResolution(int &x, int &y)
311  { x = y = 0; return false; }
312  virtual void getOutputFile(UT_String & /*name*/) { }
313 
314  // three levels - 0 = low/fastest, 1 = med/fast, 2 = normal
315  static void setRenderQuality(int quality);
316  int getRenderQuality();
317 
318  // Override the frame range used by this node
319  void overrideFrameRange(bool enable,
320  fpreal s=1.0, fpreal e=1.0,
321  fpreal i=1.0);
322 
323 
324  // Return true if the output is currently overridden
325  bool isOutputOverridden() const
326  { return myOverrideOutputFlag; }
327 
328  // Override the output filename for this node. Used by the hscript render
329  // -o command.
330  virtual void overrideOutput(bool enable, const char *fname=0);
331 
332  // Return the overriden filename. 'fname' is NOT modified if this function
333  // returns false. Deprecated, use getOutputOverrideEx() instead.
334  bool getOutputOverride(
335  UT_String &fname,
336  fpreal t,
337  bool expand = true) const;
338 
339  // getOutputOverrideEx() differs from getOutputOverride() in that it will
340  // perform the necessary parm evaluation as well so that we string result
341  // will always returned. Since this requires expansion, it will always call
342  // getOutputOverride(...,expand=true).
343  //
344  // For compatibility, it returns true if the result was overridden, false
345  // otherwise. Method is non-const since it may add warnings upon failure to
346  // create the output directory.
347  bool getOutputOverrideEx(
348  UT_String &result,
349  fpreal t,
350  const char *output_parm_name,
351  const char *mkdir_parm_name);
352 
353  virtual void overrideDevice(bool enable, bool interactive=false,
354  const char *devicestr=0);
355  bool getDeviceOverride(UT_String &str, fpreal t,
356  bool expand = true) const;
357 
358  static void setRenderButtonCB(ROP_RenderButtonCB cb);
359 
360  virtual void inputConnectChanged(int which);
361 
362  virtual void getNodeSpecificInfoText(OP_Context &context,
363  OP_NodeInfoParms &iparms);
364  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
365  const OP_NodeInfoTreeParms &parms);
366 
367  virtual bool getGeometryHandle(const char *path, fpreal t,
368  GU_DetailHandle &gdh,
369  UT_DMatrix4 &world_xform)
370  { return(false); }
371 
372  // forces a BG render in executeSingle().
373  void forceBackgroundRender(bool f = true)
374  { myForceBackgroundRender = f; }
376  { return myForceBackgroundRender; }
377 
378  // Add some additional inputs to the ROP (used by Fetch and Subnet).
380  { myTemporaryInputs = in; }
381  void clearTemporaryInputs() { myTemporaryInputs.entries(0);}
382 
383  /// Render this node using the parameters set in render_parms.
384  bool renderCommand(ROP_RenderCmdParms &render_parms);
385 
386  // Copy the errors from this node into an error manager. This method
387  // is used to save off errors before they're cleared.
388  void copyErrorsInto(UT_ErrorManager &error_manager)
389  { error_manager.stealErrors(*getLockedErrorManager()); }
390 
391  // Append the errors from an error manager into this node.
392  void copyErrorsFrom(UT_ErrorManager &error_manager)
393  { getLockedErrorManager()->stealErrors(error_manager); }
394 
395  // Get the last render dependency item that cooked in this node in the
396  // current cook.
398  { return myLastRenderItem; }
399 
400  /// Helper that appends the inputs and other rop nodes that
401  /// this node depends on to the give list.
402  virtual bool isRenderDependentOnNode(ROP_Node *node,
403  const ROP_RenderDepParms &parms);
404 
405  static void setColorCorrectionIPGamma(bool enable, fpreal gamma);
406  static fpreal getColorCorrectionIPGamma();
407  static void setColorCorrectionIPLUT(bool enable, const char *lut);
408  static const char *getColorCorrectionIPLUT();
409 
410  static void setColorCorrectionEnvVariables(bool set);
411  static void setFPSVariable(bool do_set = 0, fpreal frame_inc = 1);
412 
413  virtual ROP_RENDER_CODE rerenderFrame();
414 
415 protected:
416  ROP_Node(OP_Network *parent, const char *name, OP_Operator *entry);
417  virtual ~ROP_Node();
418 
419  // These OPs don't actually cook. No data, nothing. The renderFile()
420  // method is the closest thing to a cook.
421  virtual OP_ERROR cookMe(OP_Context &context);
422  virtual OP_ERROR bypassMe(OP_Context &context, int &copied_input);
423  OP_ERROR initFrameRange(fpreal now, ROP_ExecuteContext &ctx);
424 
425  virtual void onCreated();
426 
427 
428  void addSystemError(const char *msg = 0)
429  { getLockedErrorManager()->systemError(msg);}
430  void addError(int code, const char *msg = 0)
431  { getLockedErrorManager()->addError(ROP_OPTYPE_NAME, code, msg);}
432  void addWarning(int code, const char *msg = 0)
433  { getLockedErrorManager()->addWarning(ROP_OPTYPE_NAME, code, msg); }
434  void addMessage(int code, const char *msg = 0)
435  { getLockedErrorManager()->addMessage(ROP_OPTYPE_NAME, code, msg); }
436 
437  virtual bool evalVariableValue(UT_String &v, int index, int thread)
438  { return OP_Network::evalVariableValue(v, index, thread); }
439  virtual bool evalVariableValue(fpreal &v, int index, int thread);
440 
441  // The endRender() method will always be called if startRender succeeds.
442  virtual int startRender(int nframes, fpreal tstart,
443  fpreal tend);
444  virtual ROP_RENDER_CODE renderFrame(fpreal time,
445  UT_Interrupt *boss = 0);
446  virtual ROP_RENDER_CODE endRender();
447 
448 
449  TAKE_Take *applyRenderTake(const char *take);
450  void restorePreviousTake(TAKE_Take *take);
451 
452  void initRenderDependencyVars(fpreal t);
453  virtual void doInitRenderDependencyVars(fpreal t);
454 
455  // Internal helper method that simply traverses our inputs and calls
456  // buildRenderDependencies on them.
457  virtual void buildInputRenderDependencies(
458  const ROP_RenderDepParms &parms);
459 
460  bool matchingLastRenderParms(
461  const ROP_RenderDepParms &parms);
463  { myLastRenderItem = item; }
464  void clearLastRenderDep();
465 
466  // This method returns the image device required to render it to an
467  // interactive window (an mplay window, for example).
468  virtual const char *getInteractiveImageDevice() const { return ""; }
469 
470  virtual void FSTART_SET(fpreal val)
471  { FLT_SET("f", 0, 0, val); }
472  virtual void FEND_SET(fpreal val)
473  { FLT_SET("f", 1, 0, val); }
474  virtual void FINC_SET(fpreal val)
475  { FLT_SET("f", 2, 0, val); }
476  virtual void DORANGE_SET(int val)
477  { INT_SET("trange", 0, 0, val); }
478 
479  virtual void RENDER_TAKE(UT_String &take)
480  { evalString(take, "take", 0, 0.0f); }
481 
494 
496  { return myVerbose; }
497  std::ostream *getVerbose() const
498  { return myVerbose.getStream(); }
499  bool getAlfred() const
500  { return myVerbose.getAlfred(); }
501 
508 
509 protected:
510  //
511  // These virtuals are methods that nobody should override...
512  // Except IPR buffers which are now saved as cooked data
513  //
514  // I/O methods
515  //
516  virtual void deleteCookedData();
517  virtual int saveCookedData(const char *, OP_Context &);
518  virtual int saveCookedData(std::ostream &os, OP_Context &,
519  int binary = 0);
520 
521  // If there is a problem executing the script, then an error will be set
522  // here.
523  // Note that this has to remain protected (and not be made private) because
524  // there are customers who inherit from ROP_Node and use this function.
525  OP_ERROR executeScript(
526  UT_String &str, CH_ScriptLanguage language, fpreal time);
527 
529  { return myTemporaryInputs.entries(); }
530 
532  { return myTemporaryInputs(i); }
533 
534  // Create all intermediate directories for the given file path. Returns
535  // false IFF it attempted to create the directories but failed to do so. In
536  // that case, a warning will be added.
537  bool makeFilePathDirs(const UT_String &path);
538 
539  /// Override if preview is supported by rendering to 'ip'.
540  virtual bool isPreviewAllowed() { return false; }
541 
542 
543  void applyImageFormatOptions(IMG_TileOptions &opts,
544  const IMG_Format *fmt,
545  fpreal t);
546  void applyImageFormatOptions(IMG_FileParms &parms,
547  const IMG_Format *fmt,
548  fpreal t);
549 
550 private:
551  virtual const char *getFileExtension(int binary) const;
552 
553  static void resetSimulation(OP_Node* node);
554 
555  ROP_ExecuteContext *myEContext;
556  ROP_Verbose myVerbose;
557  ROP_ExecuteOverride myExecuteOverride;
558  void *myExecuteOverrideData;
559  ROP_ExecuteOverride myPreExecuteOverride;
560  void *myPreExecuteOverrideData;
561  ROP_ExecuteOverride myPostExecuteOverride;
562  void *myPostExecuteOverrideData;
563 
564  bool myForceBackgroundRender;
565 
566  bool myOverrideFrameRangeFlag;
567  fpreal myOverrideStartFrame;
568  fpreal myOverrideEndFrame;
569  fpreal myOverrideFrameInc;
570 
571  bool myOverrideOutputFlag;
572  UT_String myOverrideOutputName;
573 
574  bool myOverrideDeviceFlag;
575  UT_String myOverrideDeviceName;
576 
577  bool myExecuteFull; // Recursion check
578  UT_ValArray<ROP_Node *> myTemporaryInputs;
579  ROP_RenderDepParms *myLastRenderParms;
580  ROP_RenderItemHandle myLastRenderItem;
581 
582  bool executeParmScript(const char *parm_name,
583  fpreal ttime);
584  bool executeParmScripts(const char *parm_name,
585  fpreal ttime);
586 
587  static int doRenderCommand(CMD_Args &args, OP_Node *net,
588  bool showerrors);
589 
590  static void installCommands();
591  static void cmdRender(CMD_Args &args);
592  static void cmdRenderDeps(CMD_Args &args);
593 };
594 
595 // These are the parms to the buildRenderDependencies methods.
597 {
598 public:
600  myOrder(NULL),
601  myFullStart(0.0f),
602  myFullEnd(0.0f),
603  myFullFrameInc(0.0f),
604  myStart(0.0f),
605  myEnd(0.0f),
606  myFrameInc(0.0f),
607  myDoInputs(false),
608  myIgnoreBypass(true),
609  myIgnoreLocks(false),
610  myFrameMerge(true),
611  myRenderSerial(-1),
612  myDepParent(NULL),
613  myTopLevelRop(NULL),
614  myFirstFrameFlag(true) { }
615 
616  // copy constructor; some members are initilized to NULL rather than copied.
618  : myRenderSerial(-1)
619  {
620  *this = copy;
621  }
623  {
624  myDepParent = NULL;
625  }
626 
627  // Set/Get RenderList
628  void setOrder(ROP_RenderList &order) { myOrder = &order; }
629  ROP_RenderList &getOrder() const { UT_ASSERT(myOrder); return *myOrder; }
630 
631  // Set/Get Frame Range
633  { myFullStart = start; myFullEnd = end; myFullFrameInc = finc; }
635  { myStart = start; myEnd = end; myFrameInc = finc; }
636  fpreal getFullStart() const { return myFullStart; }
637  fpreal getFullEnd() const { return myFullEnd; }
638  fpreal getFullFrameInc() const { return myFullFrameInc; }
639  fpreal getStart() const { return myStart; }
640  fpreal getEnd() const { return myEnd; }
641  fpreal getFrameInc() const { return myFrameInc; }
642 
644  {
645  fpreal start = myFullStart;
646  fpreal end = myFullEnd;
647  fpreal finc = myFullFrameInc;
648  if(rop.DORANGE()==2)
649  {
650  start = rop.FSTART();
651  end = rop.FEND();
652  finc = rop.FINC();
653  }
654  if (start > end)
655  UTswap(start, end);
656  if (finc <= 0)
657  finc = 1.0;
658  setFrameRange(start, end, finc);
659  }
660 
661  // Set/Get Input traversal flags
662  void setDoInputsFlag(bool do_inputs) { myDoInputs = do_inputs; }
663  bool getDoInputs() const { return myDoInputs; }
664 
665  // Set/Get TopLevel ROP -- this is the top most ROP that is traversed. This
666  // is used to prevent subnet traversals to go outside this ROP. Only
667  // useful when DoInputs is off.
668  void setTopLevelRop(ROP_Node *rop) { myTopLevelRop = rop; }
669  ROP_Node *getTopLevelRop() const { return myTopLevelRop; }
670 
671  // Set/Get Ignore flags
672  void setIgnoreFlags(bool ignore_bypass, bool ignore_locks)
673  {
674  myIgnoreBypass = ignore_bypass;
675  myIgnoreLocks = ignore_locks;
676  }
677  bool getIgnoreBypass() const { return myIgnoreBypass; }
678  bool getIgnoreLocks() const { return myIgnoreLocks; }
679 
680  // Set/Get Render Serial number
681  void setRenderSerial(int render_serial)
682  { myRenderSerial = render_serial; }
683  int getRenderSerial() const { return myRenderSerial; }
684 
685  // Set/Get Dependency parent
686  void setDepParent(const ROP_RenderItemHandle &dep_parent)
687  { myDepParent = dep_parent; }
688  const ROP_RenderItemHandle &getDepParent() const { return myDepParent; }
689 
690  void setFirstFrame(bool first) { myFirstFrameFlag = first; }
691  bool isFirstFrame() const { return myFirstFrameFlag; }
692 
693  void setFrameMerge(bool merge) { myFrameMerge = merge; }
694  bool getFrameMerge() const { return myFrameMerge; }
695 
697  {
698  myOrder = copy.myOrder;
699  myDepParent = copy.myDepParent;
700  myTopLevelRop = copy.myTopLevelRop;
701  myFullStart = copy.myFullStart;
702  myFullEnd = copy.myFullEnd;
703  myFullFrameInc = copy.myFullFrameInc;
704  myStart = copy.myStart;
705  myEnd = copy.myEnd;
706  myFrameInc = copy.myFrameInc;
707  myRenderSerial = copy.myRenderSerial;
708  myDoInputs = copy.myDoInputs;
709  myIgnoreBypass = copy.myIgnoreBypass;
710  myIgnoreLocks = copy.myIgnoreLocks;
711  myFrameMerge = copy.myFrameMerge;
712  myFirstFrameFlag = copy.myFirstFrameFlag;
713  return *this;
714  }
715  bool operator==(const ROP_RenderDepParms &copy)
716  {
717  return (myFullStart == copy.myFullStart &&
718  myFullEnd == copy.myFullEnd &&
719  myFullFrameInc == copy.myFullFrameInc &&
720  myStart == copy.myStart &&
721  myEnd == copy.myEnd &&
722  myFrameInc == copy.myFrameInc &&
723  myDoInputs == copy.myDoInputs &&
724  myIgnoreBypass == copy.myIgnoreBypass &&
725  myIgnoreLocks == copy.myIgnoreLocks &&
726  myFrameMerge == copy.myFrameMerge &&
727  myRenderSerial == copy.myRenderSerial);
728  }
729 
730 private:
731  ROP_RenderList *myOrder;
732  ROP_RenderItemHandle myDepParent;
733  ROP_Node *myTopLevelRop;
734  fpreal myFullStart;
735  fpreal myFullEnd;
736  fpreal myFullFrameInc;
737  fpreal myStart;
738  fpreal myEnd;
739  fpreal myFrameInc;
740  int myRenderSerial;
741  bool myDoInputs;
742  bool myIgnoreBypass;
743  bool myIgnoreLocks;
744  bool myFrameMerge;
745  bool myFirstFrameFlag;
746 };
747 
748 #undef FLT_PARM
749 #undef INT_PARM
750 #undef STR_PARM
751 #undef FLT_SET
752 #undef INT_SET
753 
754 #endif
virtual int saveCookedData(std::ostream &os, OP_Context &, int binary=0)=0
int myRenderY
Definition: ROP_Node.h:487
#define ROP_OPTYPE_NAME
Definition: OP_Node.h:250
GLint first
Definition: glcorearb.h:404
bool isOutputOverridden() const
Definition: ROP_Node.h:325
fpreal getFullFrameInc() const
Definition: ROP_Node.h:638
virtual bool updateParmsFlags()
void setDepParent(const ROP_RenderItemHandle &dep_parent)
Definition: ROP_Node.h:686
void setOrder(ROP_RenderList &order)
Definition: ROP_Node.h:628
static const char * theChildTableName
Definition: ROP_Node.h:108
virtual void getOutputFile(UT_String &)
Definition: ROP_Node.h:312
void addMessage(int code, const char *msg=0)
Definition: ROP_Node.h:434
uint64 OP_VERSION
Definition: OP_Version.h:6
fpreal getEnd() const
Definition: ROP_Node.h:640
virtual void FSTART_SET(fpreal val)
Definition: ROP_Node.h:470
ROP_RENDER_CODE
Definition: ROP_Node.h:48
void UTswap(T &a, T &b)
Definition: UT_Swap.h:35
void setFullFrameRange(fpreal start, fpreal end, fpreal finc)
Definition: ROP_Node.h:632
virtual fpreal getH() const
Node position/scale is used by the UI.
#define SYS_VISIBILITY_EXPORT
virtual void FINC_SET(fpreal val)
Definition: ROP_Node.h:474
UT_String myRenderOutput
Definition: ROP_Node.h:482
bool myExecuteSingle
Definition: ROP_Node.h:491
GT_API const UT_StringHolder time
const GLdouble * v
Definition: glcorearb.h:836
GLuint start
Definition: glcorearb.h:474
virtual void FEND_SET(fpreal val)
Definition: ROP_Node.h:472
virtual fpreal FEND()
Definition: ROP_Node.h:238
virtual OP_OpTypeId getOpTypeID() const =0
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
bool getAlfred() const
Definition: ROP_Node.h:499
const GLuint GLenum const void * binary
Definition: glcorearb.h:1923
void setExecuteOverride(ROP_ExecuteOverride f, void *d)
Definition: ROP_Node.h:181
int myCurrentFrame
Definition: ROP_Node.h:489
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
void addSystemError(const char *msg=0)
Definition: ROP_Node.h:428
bool isFirstFrame() const
Definition: ROP_Node.h:691
UT_ErrorSeverity
Definition: UT_Error.h:25
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
OP_VERSION myCachedVersion
Definition: ROP_Node.h:506
GLint y
Definition: glcorearb.h:102
ROP_RenderItemHandle getLastRenderDepItem() const
Definition: ROP_Node.h:397
fpreal myCachedTime
Definition: ROP_Node.h:507
void clearTemporaryInputs()
Definition: ROP_Node.h:381
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &parms)
UT_String myRenderDevice
Definition: ROP_Node.h:483
virtual void SETDORANGE(int val)
Definition: ROP_Node.h:221
fpreal myCachedStart
Definition: ROP_Node.h:503
int myTotalFrames
Definition: ROP_Node.h:490
png_uint_32 i
Definition: png.h:2877
virtual OP_ERROR cookMe(OP_Context &context)=0
void setRenderSerial(int render_serial)
Definition: ROP_Node.h:681
#define ROP_API
Definition: ROP_API.h:10
fpreal getFullEnd() const
Definition: ROP_Node.h:637
std::ostream * getVerbose() const
Definition: ROP_Node.h:497
void setFirstFrame(bool first)
Definition: ROP_Node.h:690
void setDoInputsFlag(bool do_inputs)
Definition: ROP_Node.h:662
const ROP_RenderDepParms & operator=(const ROP_RenderDepParms &copy)
Definition: ROP_Node.h:696
void setLastRenderDepItem(ROP_RenderItemHandle item)
Definition: ROP_Node.h:462
GLfloat f
Definition: glcorearb.h:1925
virtual const char * getOpType() const =0
ROP_RenderDepParms(const ROP_RenderDepParms &copy)
Definition: ROP_Node.h:617
ROP_RenderMode getRenderMode()
Definition: ROP_Node.h:202
virtual const char * getInteractiveImageDevice() const
Definition: ROP_Node.h:468
virtual void DORANGE_SET(int val)
Definition: ROP_Node.h:476
virtual void RENDER_TAKE(UT_String &take)
Definition: ROP_Node.h:479
void forceBackgroundRender(bool f=true)
Definition: ROP_Node.h:373
virtual fpreal FSTART()
Definition: ROP_Node.h:231
ROP_Node * getTopLevelRop() const
Definition: ROP_Node.h:669
const std::enable_if<!VecTraits< T >::IsVec, T >::type & max(const T &a, const T &b)
Definition: Composite.h:133
void evalString(UT_String &val, int pi, int vi, fpreal t) const
GLuint GLuint end
Definition: glcorearb.h:474
virtual void * getCookedData(OP_Context &)
void setFullAscendingFrameRange(ROP_Node &rop)
Definition: ROP_Node.h:643
virtual bool getOutputResolution(int &x, int &y)
Definition: ROP_Node.h:310
bool getForceBackgroundRender() const
Definition: ROP_Node.h:375
void addWarning(int code, const char *msg=0)
Definition: ROP_Node.h:432
#define FLT_SET(name, vi, t, val)
Definition: ROP_Node.h:84
float myRenderAspect
Definition: ROP_Node.h:485
ROP_Node * getTemporaryInputs(int i) const
Definition: ROP_Node.h:531
void copyErrorsInto(UT_ErrorManager &error_manager)
Definition: ROP_Node.h:388
void addError(int code, const char *msg=0)
Definition: ROP_Node.h:430
void(* ROP_ExecuteOverride)(ROP_Node *me, fpreal time, void *data)
Definition: ROP_Node.h:79
#define INT_SET(name, vi, t, val)
Definition: ROP_Node.h:92
virtual bool referenceSingleParameter(OP_Parameters *from, int parm_idx, const char *relative_path=NULL)
virtual fpreal getW() const
Node position/scale is used by the UI.
OP_OpTypeId
Definition: OP_OpTypeId.h:15
GLboolean * data
Definition: glcorearb.h:130
fpreal CHgetEvalTime()
Definition: CH_Manager.h:1716
GLuint const GLchar * name
Definition: glcorearb.h:785
fpreal myCachedInc
Definition: ROP_Node.h:505
fpreal getFrameInc() const
Definition: ROP_Node.h:641
const ROP_RenderItemHandle & getDepParent() const
Definition: ROP_Node.h:688
virtual OP_DataType getCookedDataType() const =0
bool operator==(const ROP_RenderDepParms &copy)
Definition: ROP_Node.h:715
int getNumTemporaryInputs() const
Definition: ROP_Node.h:528
void setFrameRange(fpreal start, fpreal end, fpreal finc)
Definition: ROP_Node.h:634
void setTemporaryInputs(const UT_ValArray< ROP_Node * > &in)
Definition: ROP_Node.h:379
bool getDoInputs() const
Definition: ROP_Node.h:663
GLenum mode
Definition: glcorearb.h:98
void setPreExecuteOverride(ROP_ExecuteOverride f, void *d)
Definition: ROP_Node.h:185
virtual bool evalVariableValue(UT_String &v, int index, int thread)
Definition: ROP_Node.h:437
int stealErrors(UT_ErrorManager &victim, int rangestart=0, int rangeend=-1, UT_ErrorSeverity severity=UT_ERROR_NONE, bool borrow_only=false)
fpreal getFullStart() const
Definition: ROP_Node.h:636
virtual void inputConnectChanged(int which)
virtual const char * getChildType() const
int myRenderX
Definition: ROP_Node.h:486
void setExecuteContext(ROP_ExecuteContext *c)
Definition: ROP_Node.h:178
double fpreal
Definition: SYS_Types.h:270
bool getIgnoreBypass() const
Definition: ROP_Node.h:677
virtual fpreal FINC()
Definition: ROP_Node.h:246
virtual const char * getFileExtension(int binary) const =0
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
void setIgnoreFlags(bool ignore_bypass, bool ignore_locks)
Definition: ROP_Node.h:672
virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms)
ROP_RenderList & getOrder() const
Definition: ROP_Node.h:629
UT_String myJobFrames
Definition: ROP_Node.h:493
void copyErrorsFrom(UT_ErrorManager &error_manager)
Definition: ROP_Node.h:392
struct tm FAR * ttime
Definition: png.h:1668
GLuint index
Definition: glcorearb.h:785
File options for manipulating image data on load or save. This class allows you to modify the incomin...
Definition: IMG_FileParms.h:34
UT_String myRenderSuffix
Definition: ROP_Node.h:484
void setFrameMerge(bool merge)
Definition: ROP_Node.h:693
GLint GLenum GLint x
Definition: glcorearb.h:408
void(* ROP_RenderButtonCB)(ROP_Node *, ROP_RenderMode)
Definition: ROP_Node.h:80
ROP_ExecuteContext * getExecuteContext()
Definition: ROP_Node.h:177
GLuint GLfloat * val
Definition: glcorearb.h:1607
ROP_RenderMode myRenderMode
Definition: ROP_Node.h:488
A global error manager scope.
ROP_RenderMode
Definition: ROP_Node.h:55
OP_DataType
Definition: OP_DataTypes.h:28
virtual OP_OpTypeId getChildTypeID() const =0
fpreal myCachedEnd
Definition: ROP_Node.h:504
virtual bool evalVariableValue(UT_String &val, int index, int thread)
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:126
void setTopLevelRop(ROP_Node *rop)
Definition: ROP_Node.h:668
bool getIgnoreLocks() const
Definition: ROP_Node.h:678
ROP_Verbose & getRopVerbose()
Definition: ROP_Node.h:495
bool getFrameMerge() const
Definition: ROP_Node.h:694
void setRenderMode(ROP_RenderMode mode)
Definition: ROP_Node.h:197
virtual int DORANGE()
Definition: ROP_Node.h:223
virtual bool isPreviewAllowed()
Override if preview is supported by rendering to 'ip'.
Definition: ROP_Node.h:540
virtual void onCreated(void)
Overriden in VOPs.
Definition: OP_Node.h:2910
SYS_VISIBILITY_EXPORT void newDriverOperator(OP_OperatorTable *table)
Definition: ROP_Dumper.C:173
virtual bool getGeometryHandle(const char *path, fpreal t, GU_DetailHandle &gdh, UT_DMatrix4 &world_xform)
Definition: ROP_Node.h:367
virtual OP_ERROR bypassMe(OP_Context &context, int &copied_input)=0
UT_LockedRawPtr< UT_ErrorManager, OP_Lock > getLockedErrorManager()
void setPostExecuteOverride(ROP_ExecuteOverride f, void *d)
Definition: ROP_Node.h:189
fpreal getStart() const
Definition: ROP_Node.h:639
CH_ScriptLanguage
int myCachedDoRange
Definition: ROP_Node.h:502
int getRenderSerial() const
Definition: ROP_Node.h:683
virtual void deleteCookedData()=0
UT_String myJobTag
Definition: ROP_Node.h:492