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