Open webbrowser after submitting a Flamenco job
This can be disabled in the add-on preferences.
This commit is contained in:
parent
60018cd78c
commit
95699aca36
@ -200,6 +200,11 @@ class BlenderCloudPreferences(AddonPreferences):
|
||||
default=0,
|
||||
soft_max=4,
|
||||
)
|
||||
flamenco_open_browser_after_submit = BoolProperty(
|
||||
name='Open Browser after Submitting Job',
|
||||
description='When enabled, Blender will open a webbrowser',
|
||||
default=True
|
||||
)
|
||||
|
||||
def draw(self, context):
|
||||
import textwrap
|
||||
@ -389,6 +394,8 @@ class BlenderCloudPreferences(AddonPreferences):
|
||||
props = path_box.operator('flamenco.explore_file_path', text='', icon='DISK_DRIVE')
|
||||
props.path = str(output_path.parent)
|
||||
|
||||
flamenco_box.prop(self, 'flamenco_open_browser_after_submit')
|
||||
|
||||
# TODO: make a reusable way to select projects, and use that for Attract and Flamenco.
|
||||
note_box = flamenco_box.column(align=True)
|
||||
note_box.label('NOTE: For now, Flamenco uses the same project as Attract.')
|
||||
|
@ -201,6 +201,14 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
||||
self.quit()
|
||||
return
|
||||
|
||||
if prefs.flamenco_open_browser_after_submit:
|
||||
import webbrowser
|
||||
from urllib.parse import urljoin
|
||||
from ..blender import PILLAR_WEB_SERVER_URL
|
||||
|
||||
url = urljoin(PILLAR_WEB_SERVER_URL, '/flamenco/jobs/%s/redir' % job_info['_id'])
|
||||
webbrowser.open_new_tab(url)
|
||||
|
||||
# Do a final report.
|
||||
if missing_sources:
|
||||
names = (ms.name for ms in missing_sources)
|
||||
|
Reference in New Issue
Block a user