Commit 091f0fb4 authored by Alan Taylor's avatar Alan Taylor

fallback to system Blender installation for macOS

parent d1440247
......@@ -382,6 +382,9 @@ def _locate_blender(rni):
find the location of the Blender binary on the remote render node
and perform a simple test to see if it can be executed
where possible, preference will be given to a locally installed Blender
version in ~
--------------------------------------------------------------------------
args
rni : RenderNode instance
......@@ -398,21 +401,21 @@ def _locate_blender(rni):
if _modern_blender_executable(rni, test_blender):
return 'blender'
# see if we can find the binary in ~
# see if we can find the binary in other plausible locations
blender_binloc = {
'Darwin': '~/Blender/blender.app/Contents/MacOS/blender',
'Linux': '~/Blender/blender',
'CYGWIN' : '~/Blender/blender.exe'}
b_loc = blender_binloc.get(rni.opsys, '~/Blender/blender.exe')
find_blender = 'if [ ! -f ' + b_loc + ' ]; then echo "MISSING"; fi'
find_response = _remote_command(rni, find_blender)
if 'MISSING' not in find_response:
# binary found, now test to see if we can run it
test_blender = b_loc + ' -v'
if _modern_blender_executable(rni, test_blender):
return b_loc
else:
return ''
'Darwin': ['~/Blender/blender.app/Contents/MacOS/blender', \
'/Applications/Blender/blender.app/Contents/MacOS/blender'],
'Linux': ['~/Blender/blender'],
'CYGWIN' : ['~/Blender/blender.exe']}
blender_locations = blender_binloc.get(rni.opsys, '~/Blender/blender.exe')
for b_loc in blender_locations:
find_blender = 'if [ ! -f ' + b_loc + ' ]; then echo "MISSING"; fi'
find_response = _remote_command(rni, find_blender)
if 'MISSING' not in find_response:
# binary found, now test to see if we can run it
test_blender = b_loc + ' -v'
if _modern_blender_executable(rni, test_blender):
return b_loc
# Blender was either not found or not operational
print(rni.ip_address + ' is up, but Blender was not found, or could not be executed')
......@@ -537,7 +540,7 @@ def remove_dead_nodes(available_nodes, remove=True):
# if no nodes are up, there is no point continuing
if not available_nodes:
sys.exit('exiting, as none of the given render nodes appear to be responsive')
sys.exit('exiting, as no viable render nodes were found')
##############################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment