I first heard about this possibility from WarpCat’s blog:
My latest project requires some MotionBuilder scripting again and now that I am used to scripting like a pro w/ a real IDE and debugging, I was desperate to get Wing to connect to my MotionBuilder python process.
It turns out to be rather simple
- Put this file into one of your MotionBuilder python paths: wingdbstub.py
- Then type ‘import wingdbstub’ in your MoBu python console.
- Set a breakpoint in your code loaded into Wing
- Run your script from MotionBuilder
Voila! Wing should grab it.
*Added bonus. For autocomplete in Eclipse, you can add this line:
if False: from pyfbsdk_gen_doc import *
It turns out that there is a stub file for the pyfbsdk docs in pyfbsdk_gen_doc.py. So if you import this file, Eclipse (and other IDE’s, I presume) will reference this file for the docs for all classes and methods. The problem is that if you actually important this file, it will overwrite the functionality of the commands and they will not do anything. So by putting the ‘if False’ condition in there, when you run any of these scripts, it will not actually import the code. But Eclipse does not know any better and will still check this file for doc reference.