-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BB nodes will return null if not located in default packages folder #15
Comments
Great suggestion, I will have that incorporated. Yes, originally when I wrote it I don't think that people could actually define their own custom location for packages. Great catch. |
This should get the job done: import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)
import os
appDataPath = os.getenv('APPDATA')
dynPath = appDataPath + r"\Dynamo\0.9"
if dynPath not in sys.path:
sys.path.Add(dynPath)
bbPath = appDataPath + r"\Dynamo\0.9\packages\Bumblebee\extra"
if bbPath not in sys.path:
try:
sys.path.Add(bbPath)
import bumblebee as bb
except:
import xml.etree.ElementTree as et
root = et.parse(dynPath + "\DynamoSettings.xml").getroot()
for child in root:
if child.tag == "CustomPackageFolders":
for path in child:
if path not in sys.path:
sys.path.Add(path)
import bumblebee as bb I will post update all of the nodes and post it to package manager. |
Ps. Let me know if this solved it and i will close this issue. Cheers! |
pushed a package update out...should fix that. |
Doesn't work for me. Maybe because Please note: I copy/pasted this into an Excel Read node in BB 2016.1.22 as that is the last 0.9.0 compatible version. So if it does work under 0.9.1 please ignore - I created a local 0.9.0 compatible version that has our package path hardcoded... |
Just couldn't leave this alone... :-)
|
yes, you are right my friend. Please see the latest in package manager. |
Im currently experiencing same issue on Dynamo 1.0 and Bumblebee 2016.6.30. I posted screenshots to the Dynamo forum. |
After moving my packages to a custom folder I noticed that BB nodes would return null.
The reason for this is that the Python scripts are looking for bumblebee.py in the default package location. A possible solution for this would be to have your script look at the package folder paths stored in DynamoSettings.xml, iterate through them and try to locate the file that way.
The text was updated successfully, but these errors were encountered: