- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I've been having some issues with imported Python Scripts on Motionbuilder.
I have a small module that I created, but I did not want to leave it at
C:\Program Files\Autodesk\MotionBuilder 2015\bin\x64\python\lib
where MotionBuilder will look for scripts.
I am leaving them in another folder. For this reason I am importing my other folder into the Path variable, such as follows
from pyfbsdk import *
import json
import os, sys
#Expand path, and import module
lib_folder = os.path.expanduser('~User321\\Drive\\scripts')
if sys.path[-1] != lib_folder:
sys.path.append(lib_folder)
import serialize_helperI am assuming the folder would be at the last position of my sys.path.
This solution works. The problem happens when I want to make some modifications to the file "serialize_helper.py". Motionbuilder won't reload the updated script, unless I close the whole program, and try restarting it. Does anybody have a suggestion. Am I doing it wrong? Is there a proper way of loading modules?
Solved! Go to Solution.