Compare commits
3 Commits
version-1.
...
version-1.
Author | SHA1 | Date | |
---|---|---|---|
e32e75e3db | |||
6fa5ab5481 | |||
379580de86 |
@@ -1,5 +1,11 @@
|
||||
# Blender Cloud changelog
|
||||
|
||||
## Version 1.15 (2019-12-12)
|
||||
|
||||
- Avoid creating BAT pack when the to-be-rendered file is already inside the job storage
|
||||
directory. This assumes that the paths are already correct for the Flamenco Workers.
|
||||
|
||||
|
||||
## Version 1.14 (2019-10-10)
|
||||
|
||||
- Upgraded BAT to 1.2 for missing smoke caches, compatibility with Blender 2.81, and some
|
||||
|
@@ -21,7 +21,7 @@
|
||||
bl_info = {
|
||||
'name': 'Blender Cloud',
|
||||
"author": "Sybren A. Stüvel, Francesco Siddi, Inês Almeida, Antony Riakiotakis",
|
||||
'version': (1, 14),
|
||||
'version': (1, 15),
|
||||
'blender': (2, 80, 0),
|
||||
'location': 'Addon Preferences panel, and Ctrl+Shift+Alt+A anywhere for texture browser',
|
||||
'description': 'Texture library browser and Blender Sync. Requires the Blender ID addon '
|
||||
|
@@ -243,7 +243,7 @@ class BlenderCloudPreferences(AddonPreferences):
|
||||
name='Relative Paths Only',
|
||||
description='When enabled, only assets that are referred to with a relative path are '
|
||||
'packed, and assets referred to by an absolute path are excluded from the '
|
||||
'BAT pack. When disabled, all assets are packed.',
|
||||
'BAT pack. When disabled, all assets are packed',
|
||||
default=False,
|
||||
update=project_specific.store,
|
||||
)
|
||||
|
@@ -240,6 +240,23 @@ def guess_output_file_extension(output_format: str, scene) -> str:
|
||||
return '.' + container.lower()
|
||||
|
||||
|
||||
def is_file_inside_job_storage(prefs, current_file: Path) -> bool:
|
||||
"""Check whether current blend file is inside the storage path.
|
||||
|
||||
:return: True when 'current_file' is inside the Flamenco
|
||||
job storage directory already. In this case it won't be
|
||||
BAT-packed, as it's assumed the job storage dir is
|
||||
accessible by the workers already.
|
||||
"""
|
||||
flamenco_job_file_path = Path(prefs.flamenco_job_file_path).absolute().resolve()
|
||||
current_file = current_file.absolute().resolve()
|
||||
try:
|
||||
current_file.relative_to(flamenco_job_file_path)
|
||||
except ValueError:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@compatibility.convert_properties
|
||||
class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
||||
pillar.AuthenticatedPillarOperatorMixin,
|
||||
@@ -596,6 +613,11 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
||||
outfile = PurePath('{shaman}') / outfile
|
||||
return None, outfile, missing_sources
|
||||
|
||||
if is_file_inside_job_storage(prefs, filepath):
|
||||
# The blend file is contained in the job storage path, no need to copy anything.
|
||||
# Since BAT doesn't run, we also don't know whether files are missing.
|
||||
return filepath.parent, filepath, []
|
||||
|
||||
# Create a unique directory that is still more or less identifyable.
|
||||
# This should work better than a random ID.
|
||||
unique_dir = '%s-%s-%s' % (datetime.now().isoformat('-').replace(':', ''),
|
||||
@@ -1043,6 +1065,12 @@ class FLAMENCO_PT_render(bpy.types.Panel, FlamencoPollMixin):
|
||||
text='', icon='DISK_DRIVE')
|
||||
props.path = prefs.flamenco_job_file_path
|
||||
|
||||
|
||||
if is_file_inside_job_storage(prefs, Path(context.blend_data.filepath)):
|
||||
# File is contained in the job storage path, no need to copy anything.
|
||||
paths_layout.label(text='Current file already in job storage path; '
|
||||
'not going to create BAT pack.')
|
||||
|
||||
render_output = render_output_path(context)
|
||||
if render_output is None:
|
||||
paths_layout.label(text='Unable to render with Flamenco, outside of project directory.')
|
||||
|
2
setup.py
2
setup.py
@@ -236,7 +236,7 @@ setup(
|
||||
'wheels': BuildWheels},
|
||||
name='blender_cloud',
|
||||
description='The Blender Cloud addon allows browsing the Blender Cloud from Blender.',
|
||||
version='1.14',
|
||||
version='1.15',
|
||||
author='Sybren A. Stüvel',
|
||||
author_email='sybren@stuvel.eu',
|
||||
packages=find_packages('.'),
|
||||
|
Reference in New Issue
Block a user