HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 override;
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) override;
46  virtual bool canCreateNewOpType() const override
47  { return true; }
48 
49 protected:
50 
51  virtual int *getIndirect() const override
52  { return pythonIndirect; }
53 
54 private:
55 
56  UT_DMatrix4 myCookParmTransform;
57  bool myIsCooking;
58  static int *pythonIndirect;
59 
60 };
61 
62 #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
virtual bool canCreateNewOpType() const override
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 override
virtual OBJ_OBJECT_TYPE getObjectType() const
#define OBJ_API
Definition: OBJ_API.h:10
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:71