Local project path is used by both Attract and Flamenco
It's now shown whenever the project is set up for either one.
This commit is contained in:
parent
74220e4fc4
commit
cf7adb065f
@ -220,7 +220,7 @@ class BlenderCloudPreferences(AddonPreferences):
|
|||||||
# can switch projects and the Attract and Flamenco properties switch with it.
|
# can switch projects and the Attract and Flamenco properties switch with it.
|
||||||
project = PointerProperty(type=BlenderCloudProjectGroup)
|
project = PointerProperty(type=BlenderCloudProjectGroup)
|
||||||
|
|
||||||
attract_project_local_path = StringProperty(
|
cloud_project_local_path = StringProperty(
|
||||||
name='Local Project Path',
|
name='Local Project Path',
|
||||||
description='Local path of your Attract project, used to search for blend files; '
|
description='Local path of your Attract project, used to search for blend files; '
|
||||||
'usually best to set to an absolute path',
|
'usually best to set to an absolute path',
|
||||||
@ -345,11 +345,6 @@ class BlenderCloudPreferences(AddonPreferences):
|
|||||||
self.draw_project_selector(project_box, self.project)
|
self.draw_project_selector(project_box, self.project)
|
||||||
extensions = project_extensions(self.project.project)
|
extensions = project_extensions(self.project.project)
|
||||||
|
|
||||||
# Attract stuff
|
|
||||||
if 'attract' in extensions:
|
|
||||||
attract_box = project_box.column()
|
|
||||||
self.draw_attract_buttons(attract_box, self.project)
|
|
||||||
|
|
||||||
# Flamenco stuff
|
# Flamenco stuff
|
||||||
if 'flamenco' in extensions:
|
if 'flamenco' in extensions:
|
||||||
flamenco_box = project_box.column()
|
flamenco_box = project_box.column()
|
||||||
@ -411,18 +406,19 @@ class BlenderCloudPreferences(AddonPreferences):
|
|||||||
row_buttons.label('Fetching available projects.')
|
row_buttons.label('Fetching available projects.')
|
||||||
|
|
||||||
enabled_for = project_extensions(project)
|
enabled_for = project_extensions(project)
|
||||||
if project:
|
if not project:
|
||||||
if enabled_for:
|
return
|
||||||
|
|
||||||
|
if not enabled_for:
|
||||||
|
project_box.label('This project is not set up for Attract or Flamenco')
|
||||||
|
return
|
||||||
|
|
||||||
project_box.label('This project is set up for: %s' %
|
project_box.label('This project is set up for: %s' %
|
||||||
', '.join(sorted(enabled_for)))
|
', '.join(sorted(enabled_for)))
|
||||||
else:
|
|
||||||
project_box.label('This project is not set up for Attract or Flamenco')
|
|
||||||
|
|
||||||
def draw_attract_buttons(self, attract_box, bcp: BlenderCloudProjectGroup):
|
# This is only needed when the project is set up for either Attract or Flamenco.
|
||||||
header_row = attract_box.row(align=True)
|
project_box.prop(self, 'cloud_project_local_path',
|
||||||
header_row.label('Attract:', icon_value=icon('CLOUD'))
|
text='Local Cloud project path')
|
||||||
attract_box.prop(self, 'attract_project_local_path',
|
|
||||||
text='Local Attract project path')
|
|
||||||
|
|
||||||
def draw_flamenco_buttons(self, flamenco_box, bcp: flamenco.FlamencoManagerGroup, context):
|
def draw_flamenco_buttons(self, flamenco_box, bcp: flamenco.FlamencoManagerGroup, context):
|
||||||
header_row = flamenco_box.row(align=True)
|
header_row = flamenco_box.row(align=True)
|
||||||
|
@ -514,7 +514,7 @@ def render_output_path(context, filepath: Path = None) -> typing.Optional[PurePa
|
|||||||
filepath = Path(context.blend_data.filepath)
|
filepath = Path(context.blend_data.filepath)
|
||||||
|
|
||||||
return _render_output_path(
|
return _render_output_path(
|
||||||
prefs.attract_project_local_path,
|
prefs.cloud_project_local_path,
|
||||||
filepath,
|
filepath,
|
||||||
prefs.flamenco_job_output_strip_components,
|
prefs.flamenco_job_output_strip_components,
|
||||||
prefs.flamenco_job_output_path,
|
prefs.flamenco_job_output_path,
|
||||||
|
Reference in New Issue
Block a user