HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_Python.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  * COMMENTS:
7  * An object that cooks its transform by running a Python script.
8  *
9  * This node gets the Python code from a section in the containing
10  * digital asset.
11  */
12 
13 #ifndef __OBJ_Python_h__
14 #define __OBJ_Python_h__
15 
16 #include "OBJ_API.h"
17 #include "OBJ_SubNet.h"
18 class OP_ScriptOperator;
19 class OP_OTLDefinition;
20 
22 {
23 public:
24  static OP_ScriptOperator *createScriptOperator(
25  const OP_OTLDefinition &definition);
26 
27  static OP_Node *myConstructor(
28  OP_Network *network, const char *name, OP_Operator *op_type);
29 
30  OBJ_Python(
31  OP_Network *network, const char *name,
32  OP_ScriptOperator *script_op_type);
33 
34  // These methods are used by HOMF_ObjNode::setCookTransform()
35  // to set the parm transform from within the Python cook code.
36  bool isCooking() const { return myIsCooking; }
37  void setCookParmTransform(const UT_DMatrix4 &xform)
38  { myCookParmTransform = xform; }
39 
40  virtual bool getParmTransform(OP_Context &context, UT_DMatrix4 &xform);
41 
42 private:
43  UT_DMatrix4 myCookParmTransform;
44  bool myIsCooking;
45 };
46 
47 #endif
virtual bool getParmTransform(OP_Context &context, UT_DMatrix4 &xform)
bool isCooking() const
Definition: OBJ_Python.h:36
GLuint const GLchar * name
Definition: glcorearb.h:785
void setCookParmTransform(const UT_DMatrix4 &xform)
Definition: OBJ_Python.h:37
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
#define OBJ_API
Definition: OBJ_API.h:10