00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __SOP_MDD__
00023 #define __SOP_MDD__
00024
00025 #include "SOP_API.h"
00026 #include <sys/types.h>
00027
00028 #include <UT/UT_Vector4Array.h>
00029
00030 #include "SOP_Node.h"
00031
00032 class sopMDDFile;
00033
00034 class SOP_API SOP_MDD : public SOP_Node
00035 {
00036 public:
00037 SOP_MDD(OP_Network *net, const char *name, OP_Operator *entry);
00038 virtual ~SOP_MDD();
00039
00040 virtual unsigned disableParms();
00041
00042 virtual void getNodeSpecificInfoText(OP_Context &context,
00043 int verbose,
00044 UT_WorkBuffer &text);
00045
00046 static OP_Node *myConstructor(OP_Network *net,
00047 const char *name,
00048 OP_Operator *entry);
00049 static PRM_Template myTemplateList[];
00050
00051 enum CoordSysType {
00052 COORDSYS_LEFT,
00053 COORDSYS_RIGHT
00054 };
00055
00056 protected:
00057 virtual OP_ERROR cookMySop(OP_Context &context);
00058 virtual int reloadNewFiles(float now);
00059
00060
00061 static int reloadMDDStatic(void *op, int idx,
00062 float t, const PRM_Template *);
00063 private:
00064 bool evaluateMDD(float t, UT_Vector4Array *&);
00065
00066 void FNAME(UT_String &str, float t)
00067 { evalString(str, 0, 0, t); }
00068 int INTERP()
00069 { return evalInt("interp", 0, 0); }
00070 float FRAME(float t)
00071 { return evalFloat("frame", 0, t); }
00072 CoordSysType COORDSYS()
00073 { return (CoordSysType)
00074 evalInt("coordsys", 0, 0); }
00075
00076 time_t myLastModified;
00077 UT_String myLastFilename;
00078 sopMDDFile *myFile;
00079 };
00080
00081 #endif