-
Notifications
You must be signed in to change notification settings - Fork 234
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
updated bootstrap script for non developers #669
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
works on 2.93 or 3.0 import re
import os
import zipfile
import urllib
import bpy
from urllib.request import urlopen
# 2.93 or 3.0 ... you don't need to set this manually anymore.
MAJOR, MINOR = bpy.app.version_file[0:2]
blender_version = f"{MAJOR}.{MINOR}"
url = "https://gist.githubusercontent.com/zeffii/5a4440e7455940174ab9/raw/bootstrap.py"
def get_sv():
print("getting sverchok bootstrapper")
string_load = urlopen(url).read().decode()
# depending on the current version...
new_string_load = re.sub("version=(\d\.\d+)", f"version={blender_version}", string_load)
svbl = bpy.data.texts.new('sverchok bootloader')
svbl.write(new_string_load)
print("obtained bootstrapper code from github")
ctx = bpy.context.copy()
ctx['edit_text'] = svbl # specify the text datablock to execute
bpy.ops.text.run_script(ctx)
print("execution bootstrapper complete")
get_sv()
|
i got this error when running on my macbook: Traceback (most recent call last): Error: Python script failed, check the message in the system console |
If you used the "install Addon" button in Blender preferences, then Blender will put the add-on in a system-specific folder. as you use osx, if you get the message |
maybe Blender 3.0 needs to be given permissions to modify the filesystem ? else Python can not create a directory to unzip the sverchok source correctly. |
Maybe - but why did all other adons work?🙈 |
beats me. |
Or don’t they create folders? I don’t know. You are the expert. |
ok, don't know why and don't know how...maybe because i downloaded the newest blender3.0 alpha....but all of a sudden it showed now for the first time the 1.0 version in sverchok and i could enable it. And believe or not ....rendering works too now. But i have no idea why i now could see 1.0 and it worked. Whenever i saw 1.0 version until now, i wasn't able to enable it. |
rename it to sverchok , the extra |
correct, i have no explanation at the moment for the folder being called |
next "clean try" was: renaming it to sverchok BEFORE enabling, same result with "no module named 'sverchok-1' ...it's weird. |
if there was no other folder in but i'm not certain. |
nope, that's why i wrote "clean try" and copied the folder structure as screenshot for you. There were no sverchok folders. |
well.. now you've seen the dirtier side of add-on development. |
I just cannot believe I am the only one with a macOS having this problem….🙈 |
https://gist.github.com/zeffii/a325ab87931114311198c4571322b82b this is a slightly modified that drops features i planned but never used. |
Wow this works!! Thank you haha...After trying with many versions I gave it a try and it worked. |
the long form of the script... node
readall()
should now beread()
The text was updated successfully, but these errors were encountered: