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  OBJ_OBJECT_TYPE getObjectType() const override;
24 
25 
27  const char *name,
28  OP_Operator *op);
29 
30  ~OBJ_PythonScript() override;
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  bool getParmTransform(OP_Context &context,
46  UT_DMatrix4 &xform) override;
47  bool canCreateNewOpType() const override
48  { return true; }
49 
50 protected:
51 
52  int *getIndirect() const override
53  { return pythonIndirect; }
54 
55 private:
56 
57  UT_DMatrix4 myCookParmTransform;
58  bool myIsCooking;
59  static int *pythonIndirect;
60 
61 };
62 
63 #endif
OBJ_OBJECT_TYPE getObjectType() const override
void setCookParmTransform(const UT_DMatrix4 &xform)
int * getIndirect() const override
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:786
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
#define OBJ_API
Definition: OBJ_API.h:10
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:73
bool canCreateNewOpType() const override