Compare commits
8 Commits
version-1.
...
version-1.
Author | SHA1 | Date | |
---|---|---|---|
405b823c81 | |||
9e952035d3 | |||
d77acfb9c8 | |||
70de9741df | |||
cc37e73bc6 | |||
e32e75e3db | |||
6fa5ab5481 | |||
379580de86 |
17
CHANGELOG.md
17
CHANGELOG.md
@@ -1,5 +1,22 @@
|
|||||||
# Blender Cloud changelog
|
# Blender Cloud changelog
|
||||||
|
|
||||||
|
## Version 1.17 (2021-02-04)
|
||||||
|
|
||||||
|
- Upgrade BAT to version 1.3.1, which brings compatibility with Geometry Nodes and
|
||||||
|
fixes some issues on Windows.
|
||||||
|
|
||||||
|
|
||||||
|
## Version 1.16 (2020-03-03)
|
||||||
|
|
||||||
|
- Fixed Windows compatibility issue with the handling of Shaman URLs.
|
||||||
|
|
||||||
|
|
||||||
|
## 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)
|
## Version 1.14 (2019-10-10)
|
||||||
|
|
||||||
- Upgraded BAT to 1.2 for missing smoke caches, compatibility with Blender 2.81, and some
|
- Upgraded BAT to 1.2 for missing smoke caches, compatibility with Blender 2.81, and some
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
bl_info = {
|
bl_info = {
|
||||||
'name': 'Blender Cloud',
|
'name': 'Blender Cloud',
|
||||||
"author": "Sybren A. Stüvel, Francesco Siddi, Inês Almeida, Antony Riakiotakis",
|
"author": "Sybren A. Stüvel, Francesco Siddi, Inês Almeida, Antony Riakiotakis",
|
||||||
'version': (1, 14),
|
'version': (1, 17),
|
||||||
'blender': (2, 80, 0),
|
'blender': (2, 80, 0),
|
||||||
'location': 'Addon Preferences panel, and Ctrl+Shift+Alt+A anywhere for texture browser',
|
'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 '
|
'description': 'Texture library browser and Blender Sync. Requires the Blender ID addon '
|
||||||
|
@@ -1007,7 +1007,6 @@ def deactivate():
|
|||||||
|
|
||||||
_rna_classes = [cls for cls in locals().values()
|
_rna_classes = [cls for cls in locals().values()
|
||||||
if isinstance(cls, type) and cls.__name__.startswith('ATTRACT')]
|
if isinstance(cls, type) and cls.__name__.startswith('ATTRACT')]
|
||||||
log.info('RNA classes:\n%s', '\n'.join([repr(cls) for cls in _rna_classes]))
|
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
@@ -243,7 +243,7 @@ class BlenderCloudPreferences(AddonPreferences):
|
|||||||
name='Relative Paths Only',
|
name='Relative Paths Only',
|
||||||
description='When enabled, only assets that are referred to with a relative path are '
|
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 '
|
'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,
|
default=False,
|
||||||
update=project_specific.store,
|
update=project_specific.store,
|
||||||
)
|
)
|
||||||
|
@@ -240,6 +240,40 @@ def guess_output_file_extension(output_format: str, scene) -> str:
|
|||||||
return '.' + container.lower()
|
return '.' + container.lower()
|
||||||
|
|
||||||
|
|
||||||
|
def is_shaman_url(path_or_url: str) -> bool:
|
||||||
|
"""Check whether the given string is a Shaman URL.
|
||||||
|
|
||||||
|
:param path_or_url: A string that may represent a filesystem path or a URL.
|
||||||
|
May not be a pathlib.Path, as that would break URL notation on Windows.
|
||||||
|
"""
|
||||||
|
assert isinstance(path_or_url, str)
|
||||||
|
return any(path_or_url.startswith(scheme) for scheme in SHAMAN_URL_SCHEMES)
|
||||||
|
|
||||||
|
|
||||||
|
def is_file_inside_job_storage(prefs, current_file: typing.Union[str, 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.
|
||||||
|
"""
|
||||||
|
|
||||||
|
if isinstance(current_file, str):
|
||||||
|
# Shaman URLs are always remote, so the current file cannot be in there.
|
||||||
|
if is_shaman_url(current_file):
|
||||||
|
return False
|
||||||
|
current_file = Path(current_file)
|
||||||
|
|
||||||
|
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
|
@compatibility.convert_properties
|
||||||
class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
||||||
pillar.AuthenticatedPillarOperatorMixin,
|
pillar.AuthenticatedPillarOperatorMixin,
|
||||||
@@ -568,7 +602,7 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
|||||||
|
|
||||||
self.log.debug('projdir: %s', projdir)
|
self.log.debug('projdir: %s', projdir)
|
||||||
|
|
||||||
if any(prefs.flamenco_job_file_path.startswith(scheme) for scheme in SHAMAN_URL_SCHEMES):
|
if is_shaman_url(prefs.flamenco_job_file_path):
|
||||||
endpoint, _ = bat_interface.parse_shaman_endpoint(prefs.flamenco_job_file_path)
|
endpoint, _ = bat_interface.parse_shaman_endpoint(prefs.flamenco_job_file_path)
|
||||||
self.log.info('Sending BAT pack to Shaman at %s', endpoint)
|
self.log.info('Sending BAT pack to Shaman at %s', endpoint)
|
||||||
try:
|
try:
|
||||||
@@ -596,6 +630,11 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
|||||||
outfile = PurePath('{shaman}') / outfile
|
outfile = PurePath('{shaman}') / outfile
|
||||||
return None, outfile, missing_sources
|
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.
|
# Create a unique directory that is still more or less identifyable.
|
||||||
# This should work better than a random ID.
|
# This should work better than a random ID.
|
||||||
unique_dir = '%s-%s-%s' % (datetime.now().isoformat('-').replace(':', ''),
|
unique_dir = '%s-%s-%s' % (datetime.now().isoformat('-').replace(':', ''),
|
||||||
@@ -1043,6 +1082,12 @@ class FLAMENCO_PT_render(bpy.types.Panel, FlamencoPollMixin):
|
|||||||
text='', icon='DISK_DRIVE')
|
text='', icon='DISK_DRIVE')
|
||||||
props.path = prefs.flamenco_job_file_path
|
props.path = prefs.flamenco_job_file_path
|
||||||
|
|
||||||
|
|
||||||
|
if is_file_inside_job_storage(prefs, 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)
|
render_output = render_output_path(context)
|
||||||
if render_output is None:
|
if render_output is None:
|
||||||
paths_layout.label(text='Unable to render with Flamenco, outside of project directory.')
|
paths_layout.label(text='Unable to render with Flamenco, outside of project directory.')
|
||||||
|
@@ -70,7 +70,7 @@ def handle_project_update(_=None, _2=None):
|
|||||||
with mark_as_loading():
|
with mark_as_loading():
|
||||||
prefs = preferences()
|
prefs = preferences()
|
||||||
project_id = prefs.project.project
|
project_id = prefs.project.project
|
||||||
log.info('Updating internal state to reflect extensions enabled on current project %s.',
|
log.debug('Updating internal state to reflect extensions enabled on current project %s.',
|
||||||
project_id)
|
project_id)
|
||||||
|
|
||||||
project_extensions.cache_clear()
|
project_extensions.cache_clear()
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
lockfile==0.12.2
|
lockfile==0.12.2
|
||||||
pillarsdk==1.8.0
|
pillarsdk==1.8.0
|
||||||
wheel==0.29.0
|
wheel==0.29.0
|
||||||
blender-asset-tracer==1.2.1
|
blender-asset-tracer==1.3.1
|
||||||
|
|
||||||
# Secondary requirements:
|
# Secondary requirements:
|
||||||
asn1crypto==0.24.0
|
asn1crypto==0.24.0
|
||||||
|
2
setup.py
2
setup.py
@@ -236,7 +236,7 @@ setup(
|
|||||||
'wheels': BuildWheels},
|
'wheels': BuildWheels},
|
||||||
name='blender_cloud',
|
name='blender_cloud',
|
||||||
description='The Blender Cloud addon allows browsing the Blender Cloud from Blender.',
|
description='The Blender Cloud addon allows browsing the Blender Cloud from Blender.',
|
||||||
version='1.14',
|
version='1.17',
|
||||||
author='Sybren A. Stüvel',
|
author='Sybren A. Stüvel',
|
||||||
author_email='sybren@stuvel.eu',
|
author_email='sybren@stuvel.eu',
|
||||||
packages=find_packages('.'),
|
packages=find_packages('.'),
|
||||||
|
Reference in New Issue
Block a user