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