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  virtual bool updateParmsFlags();
61  virtual bool evalVariableValue(UT_String &v, int index, int thread);
62  virtual bool evalVariableValue(fpreal &v, int index, int thread);
63  virtual void inputConnectChanged(int which);
64 
65  static CH_LocalVariable myVariableList[];
66  static PRM_Template *getTemplates();
67  static OP_Node *myConstructor(OP_Network *net,
68  const char *name,
69  OP_Operator *op);
70 
71  virtual void getNodeSpecificInfoText(OP_Context &context,
72  OP_NodeInfoParms &iparms);
73  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
74  const OP_NodeInfoTreeParms &parms);
75 
76  static void buildSaveMenu(
77  void *, PRM_Name *, int,
78  const PRM_SpareData *, const PRM_Parm *);
79  virtual bool detectIfExistingOutputFiles();
80  virtual void deleteExistingOutputFiles();
81 
82  DOP_Node *getSourceDOP(fpreal t) const;
83 protected:
84  ROP_Dop(OP_Network *net, const char *name, OP_Operator *entry);
85  virtual ~ROP_Dop();
86 
87  virtual int startRender(int nframes, fpreal s, fpreal e);
89  virtual ROP_RENDER_CODE endRender();
90 
91  virtual void getDescriptiveParmName(UT_String &name) const
92  { name = "dopoutput"; }
93 
94 private:
95  void DOPPATH(UT_String &str, fpreal t) const
96  { STR_PARM("doppath", 0, t)}
97 
98  void OUTPUT(UT_String &str, fpreal t)
99  { getOutputOverrideEx(str, t, "dopoutput", "mkpath"); }
100 
101  int INITSIM(void) const
102  { INT_PARM("initsim", 0, 0) }
103 
104  void COMPRESSSIMS(UT_String &str, fpreal t) const
105  { STR_PARM("compresssims", 0, t) }
106 
107  bool SAVEBACKGROUND(fpreal t) const
108  {
109  return false;
110  //INT_PARM("savebackground", 0, t);
111  }
112  bool ALFPROGRESS() const
113  { INT_PARM("alfprogress", 0, 0) }
114 
115  bool USESIMFRAMES() const
116  { INT_PARM("usesimframes", 0, 0) }
117 
118  DOP_Node *myDop;
119  fpreal myEndTime;
120  fpreal myStartTime;
121  bool myModifiedPlayFlag;
122  bool myBackgroundRender;
123  int myLastSimFrame;
124 };
125 
126 
127 #undef INT_PARM
128 #undef STR_PARM
129 
130 #endif
ROP_RENDER_CODE
Definition: ROP_Node.h:48
virtual ROP_RENDER_CODE endRender()
GT_API const UT_StringHolder time
virtual void inputConnectChanged(int which)
const GLdouble * v
Definition: glcorearb.h:836
bool getOutputOverrideEx(UT_String &result, fpreal t, const char *output_parm_name, const char *mkdir_parm_name)
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
virtual void getDescriptiveParmName(UT_String &name) const
Definition: ROP_Dop.h:91
#define ROP_API
Definition: ROP_API.h:10
virtual bool updateParmsFlags()
#define INT_PARM(name, vi, t)
Definition: ROP_Dop.h:21
#define STR_PARM(name, vi, t)
Definition: ROP_Dop.h:19
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &iparms)
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual ROP_RENDER_CODE renderFrame(fpreal time, UT_Interrupt *boss=0)
virtual bool evalVariableValue(UT_String &v, int index, int thread)
Definition: ROP_Node.h:437
double fpreal
Definition: SYS_Types.h:270
virtual void deleteExistingOutputFiles()
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
GLuint index
Definition: glcorearb.h:785
virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms)
This is the base class for all DOP nodes.
Definition: DOP_Node.h:75
virtual bool detectIfExistingOutputFiles()
virtual int startRender(int nframes, fpreal tstart, fpreal tend)