HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OBJ_PythonScript.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: OBJ_PythonScript.h (Custom Library, C++)
7  *
8  * COMMENTS: An object to allow contained geometries to be altered via python script
9  *
10  */
11 
12 #ifndef __OBJ_PythonScript__
13 #define __OBJ_PythonScript__
14 
15 #include "OBJ_API.h"
16 #include "OBJ_Geometry.h"
17 
18 
20 {
21 public:
22 
23  virtual OBJ_OBJECT_TYPE getObjectType() const;
24 
25 
27  const char *name,
28  OP_Operator *op);
29 
30  virtual ~OBJ_PythonScript();
31 
32  static OP_Node *myConstructor(OP_Network *net,
33  const char *name,
34  OP_Operator *entry);
35 
36  static PRM_Template *getTemplateList();
37 
38  // These methods are used by HOMF_ObjNode::setCookTransform()
39  // to set the parm transform from within the Python cook code.
40  bool isCooking() const { return myIsCooking; }
41 
42  void setCookParmTransform(const UT_DMatrix4 &xform)
43  { myCookParmTransform = xform; }
44 
45  virtual bool getParmTransform(OP_Context &context, UT_DMatrix4 &xform);
46 
47 protected:
48 
49  virtual int *getIndirect() const
50  { return pythonIndirect; }
51 
52 private:
53 
54  UT_DMatrix4 myCookParmTransform;
55  bool myIsCooking;
56  static int *pythonIndirect;
57 
58 };
59 
60 #endif
void setCookParmTransform(const UT_DMatrix4 &xform)
virtual bool getParmTransform(OP_Context &context, UT_DMatrix4 &xform)
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
bool isCooking() const
GLuint const GLchar * name
Definition: glcorearb.h:785
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
virtual int * getIndirect() const
virtual OBJ_OBJECT_TYPE getObjectType() const
#define OBJ_API
Definition: OBJ_API.h:10
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:70