00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc 00008 * 123 Front Street West, Suite 1401 00009 * Toronto, Ontario 00010 * Canada M5J 2M2 00011 * 416-504-9876 00012 * 00013 * COMMENTS: 00014 * An object that cooks its transform by running a Python script. 00015 * 00016 * This node gets the Python code from a section in the containing 00017 * digital asset. 00018 */ 00019 00020 #ifndef __OBJ_Python_h__ 00021 #define __OBJ_Python_h__ 00022 00023 #include "OBJ_API.h" 00024 #include "OBJ_SubNet.h" 00025 class OP_ScriptOperator; 00026 class OP_OTLDefinition; 00027 00028 class OBJ_API OBJ_Python : public OBJ_SubNet 00029 { 00030 public: 00031 static OP_ScriptOperator *createScriptOperator( 00032 const OP_OTLDefinition &definition); 00033 00034 static OP_Node *myConstructor( 00035 OP_Network *network, const char *name, OP_Operator *op_type); 00036 00037 OBJ_Python( 00038 OP_Network *network, const char *name, 00039 OP_ScriptOperator *script_op_type); 00040 00041 // These methods are used by HOMF_ObjNode::setCookTransform() 00042 // to set the parm transform from within the Python cook code. 00043 bool isCooking() const { return myIsCooking; } 00044 void setCookParmTransform(const UT_DMatrix4 &xform) 00045 { myCookParmTransform = xform; } 00046 00047 virtual void getParmTransform(OP_Context &context, UT_DMatrix4 &xform); 00048 00049 private: 00050 UT_DMatrix4 myCookParmTransform; 00051 bool myIsCooking; 00052 }; 00053 00054 #endif
1.5.9