HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROP_Dop.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: Base class for Dop output
9  *
10  */
11 
12 #ifndef __ROP_Dop_h__
13 #define __ROP_Dop_h__
14 
15 #include "ROP_API.h"
16 #include <DOP/DOP_Parent.h>
17 #include "ROP_Node.h"
18 
19 #define STR_PARM(name, vi, t) \
20  { evalString(str, name, vi, t); }
21 #define INT_PARM(name, vi, t) \
22  { return evalInt(name, vi, t); }
23 
24 class DOP_Node;
25 
26 enum {
40  // ROP_DOP_BACKGROUND,
53 
55 };
56 
57 class ROP_API ROP_Dop : public ROP_Node
58 {
59 public:
60  bool updateParmsFlags() override;
62  int thread) override;
63  bool evalVariableValue(fpreal &v, int index,
64  int thread) override;
65 
66  static CH_LocalVariable myVariableList[];
67  static PRM_Template *getTemplates();
68  static OP_Node *myConstructor(OP_Network *net,
69  const char *name,
70  OP_Operator *op);
71 
72  void getNodeSpecificInfoText(OP_Context &context,
73  OP_NodeInfoParms &iparms) override;
75  const OP_NodeInfoTreeParms &parms) override;
76 
77  static void buildSaveMenu(
78  void *, PRM_Name *, int,
79  const PRM_SpareData *, const PRM_Parm *);
80  bool detectIfExistingOutputFiles() override;
81  void deleteExistingOutputFiles() override;
82 
83  DOP_Node *getSourceDOP(fpreal t) const;
84 protected:
85  ROP_Dop(OP_Network *net, const char *name, OP_Operator *entry);
86  ~ROP_Dop() override;
87 
88  int startRender(int nframes, fpreal s, fpreal e) override;
90  ROP_RENDER_CODE endRender() override;
91 
92  void getDescriptiveParmName(UT_String &name) const override
93  { name = "dopoutput"; }
94 
95 private:
96  void DOPPATH(UT_String &str, fpreal t) const
97  { STR_PARM("doppath", 0, t)}
98 
99  void OUTPUT(UT_String &str, fpreal t)
100  { getOutputOverrideEx(str, t, "dopoutput", "mkpath"); }
101 
102  int INITSIM() const
103  { INT_PARM("initsim", 0, 0) }
104 
105  void COMPRESSSIMS(UT_String &str, fpreal t) const
106  { STR_PARM("compresssims", 0, t) }
107 
108  bool SAVEBACKGROUND(fpreal t) const
109  {
110  return false;
111  //INT_PARM("savebackground", 0, t);
112  }
113  bool ALFPROGRESS() const
114  { INT_PARM("alfprogress", 0, 0) }
115 
116  bool USESIMFRAMES() const
117  { INT_PARM("usesimframes", 0, 0) }
118 
119  DOP_Node *myDop;
120  fpreal myEndTime;
121  fpreal myStartTime;
122  bool myModifiedPlayFlag;
123  bool myBackgroundRender;
124  int myLastSimFrame;
125 };
126 
127 
128 #undef INT_PARM
129 #undef STR_PARM
130 
131 #endif
ROP_RENDER_CODE
Definition: ROP_Node.h:48
virtual ROP_RENDER_CODE endRender()
bool updateParmsFlags() override
GT_API const UT_StringHolder time
const GLdouble * v
Definition: glcorearb.h:837
bool getOutputOverrideEx(UT_String &result, fpreal t, const char *output_parm_name, const char *mkdir_parm_name)
GLdouble s
Definition: glad.h:3009
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
bool evalVariableValue(UT_String &v, int index, int thread) override
Definition: ROP_Node.h:468
#define ROP_API
Definition: ROP_API.h:10
#define INT_PARM(name, vi, t)
Definition: ROP_Dop.h:21
#define STR_PARM(name, vi, t)
Definition: ROP_Dop.h:19
void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms) override
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual ROP_RENDER_CODE renderFrame(fpreal time, UT_Interrupt *boss=0)
GLdouble t
Definition: glad.h:2397
**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
virtual void deleteExistingOutputFiles()
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
fpreal64 fpreal
Definition: SYS_Types.h:277
GLuint index
Definition: glcorearb.h:786
This is the base class for all DOP nodes.
Definition: DOP_Node.h:77
void getDescriptiveParmName(UT_String &name) const override
Definition: ROP_Dop.h:92
void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &iparms) override
virtual bool detectIfExistingOutputFiles()
virtual int startRender(int nframes, fpreal tstart, fpreal tend)