BGE PyController module type.

- Added support for any number of attributes, this means packages are supported automatically.
 so as well as "myModule.myFunc" you can do "myPackage.myModule.myFunc", nested packages work too.
- pass the controller to the python function as an argument for functions that take 1 arg, this check is only done at startup so it wont slow things down.

added support for
This commit is contained in:
2009-05-02 15:09:06 +00:00
parent 41f42099ac
commit 40fc1d2af7
2 changed files with 50 additions and 13 deletions

View File

@@ -44,9 +44,11 @@ class SCA_PythonController : public SCA_IController
Py_Header;
struct _object * m_bytecode; /* SCA_PYEXEC_SCRIPT only */
PyObject* m_function; /* SCA_PYEXEC_MODULE only */
int m_function_argc;
bool m_bModified;
bool m_debug; /* use with SCA_PYEXEC_MODULE for reloading every logic run */
int m_mode;
protected:
STR_String m_scriptText;