Extension for Python – a dynamic library. All MoBu’s functionality performed as an extension using boost.python and connects calling “from pyfbsdk import *”
For extending python there is very usefull library python.boost
- install python 2.6.1
- build boost.python library and preferably dll. The resulting library will be dependent on the version of your compiler and profile (debug, release), so it must be copied to the root directory of Mobu, to where there is an executable file.
- From boost python examples I took a file to start getting_started1.cpp
- I started a new project win32 dynamic library, to compile include paths to python and boost.
- in resulted library you need to change the extension to *. pyd and copy to the folder MotionBuilder 2010 \ bin \ win32 \ python \ lib \ plat-win \ DLLs \
- My library, I called python_ext, while changing the identifier in the call BOOST_PYTHON_MODULE before compilation. And running Mobu successfully perform a test function call in python: