HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  virtual fpreal getW() const;
65  virtual fpreal getH() const;
66 
67  static CH_LocalVariable myVariableList[];
68  static PRM_Template *getTemplates();
69  static OP_Node *myConstructor(OP_Network *net,
70  const char *name,
71  OP_Operator *op);
72 
73  virtual void getNodeSpecificInfoText(OP_Context &context,
74  OP_NodeInfoParms &iparms);
75  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
76  const OP_NodeInfoTreeParms &parms);
77 
78  static void buildSaveMenu(
79  void *, PRM_Name *, int,
80  const PRM_SpareData *, const PRM_Parm *);
81  virtual bool detectIfExistingOutputFiles();
82  virtual void deleteExistingOutputFiles();
83 
84  DOP_Node *getSourceDOP(fpreal t) const;
85 protected:
86  ROP_Dop(OP_Network *net, const char *name, OP_Operator *entry);
87  virtual ~ROP_Dop();
88 
89  virtual int startRender(int nframes, fpreal s, fpreal e);
90  virtual ROP_RENDER_CODE renderFrame(fpreal time, UT_Interrupt *boss);
91  virtual ROP_RENDER_CODE endRender();
92 
93  virtual void getDescriptiveParmName(UT_String &name) const
94  { name = "dopoutput"; }
95 
96 private:
97  void DOPPATH(UT_String &str, fpreal t) const
98  { STR_PARM("doppath", 0, t)}
99 
100  void OUTPUT(UT_String &str, fpreal t)
101  { getOutputOverrideEx(str, t, "dopoutput", "mkpath"); }
102 
103  int INITSIM(void) const
104  { INT_PARM("initsim", 0, 0) }
105 
106  void COMPRESSSIMS(UT_String &str, fpreal t) const
107  { STR_PARM("compresssims", 0, t) }
108 
109  bool SAVEBACKGROUND(fpreal t) const
110  {
111  return false;
112  //INT_PARM("savebackground", 0, t);
113  }
114  bool ALFPROGRESS() const
115  { INT_PARM("alfprogress", 0, 0) }
116 
117  bool USESIMFRAMES() const
118  { INT_PARM("usesimframes", 0, 0) }
119 
120  DOP_Node *myDop;
121  fpreal myEndTime;
122  fpreal myStartTime;
123  bool myModifiedPlayFlag;
124  bool myBackgroundRender;
125  int myLastSimFrame;
126 };
127 
128 
129 #undef INT_PARM
130 #undef STR_PARM
131 
132 #endif
ROP_RENDER_CODE
Definition: ROP_Node.h:48
virtual ROP_RENDER_CODE endRender()
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:93
#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:435
double fpreal
Definition: SYS_Types.h:269
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)
virtual fpreal getW() const
Node position/scale is used by the UI.
This is the base class for all DOP nodes.
Definition: DOP_Node.h:75
virtual fpreal getH() const
Node position/scale is used by the UI.
virtual bool detectIfExistingOutputFiles()
virtual int startRender(int nframes, fpreal tstart, fpreal tend)