kopia lustrzana https://github.com/vilemduha/blendercam
retry installation
rodzic
cc0e1ce3c3
commit
f80676fdb7
|
|
@ -10,10 +10,18 @@ bpy.ops.preferences.addon_enable(module='cam')
|
|||
bpy.ops.wm.save_userpref()
|
||||
"""
|
||||
|
||||
NUM_RETRIES=10
|
||||
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
file=pathlib.Path(td,"install.py")
|
||||
file.write_text(INSTALL_CODE)
|
||||
command = f'blender -b -P "{str(file)}"'
|
||||
subprocess.run(command, shell=True, check=True)
|
||||
# blender 4.0 installing addon crashes sometimes on mac github actions...
|
||||
for x in range(NUM_RETRIES):
|
||||
try:
|
||||
subprocess.run(command, shell=True, check=True)
|
||||
sys.exit(0)
|
||||
except Exception as e:
|
||||
print("Install addon failed, retrying:",e)
|
||||
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue