Compare commits

...

5 Commits

Author SHA1 Message Date
01ae0f5f54 Bumped version to 1.6.4 2017-04-21 18:16:14 +02:00
1e80446870 Added file exclusion filter for Flamenco.
A filter like "*.abc;*.mkv;*.mov" can be used to prevent certain files
from being copied to the job storage directory. Requires a Blender that is
bundled with BAM 1.1.7 or newer.
2017-04-21 18:15:59 +02:00
8d5c97931e Fixed capitalisation of label 2017-03-21 14:26:08 +01:00
1a0c00b87a Removed my name from changelog entry 2017-03-21 14:20:15 +01:00
32befc51f8 Include CHANGELOG.md as data file in distribution 2017-03-21 14:18:58 +01:00
6 changed files with 43 additions and 15 deletions

View File

@@ -1,5 +1,13 @@
# Blender Cloud changelog # Blender Cloud changelog
## Version 1.6.4 (2017-04-21)
- Added file exclusion filter for Flamenco. A filter like "*.abc;*.mkv;*.mov" can be
used to prevent certain files from being copied to the job storage directory.
Requires a Blender that is bundled with BAM 1.1.7 or newer.
## Version 1.6.3 (2017-03-21) ## Version 1.6.3 (2017-03-21)
- Fixed bug where local project path wasn't shown for projects only set up for Flamenco - Fixed bug where local project path wasn't shown for projects only set up for Flamenco
@@ -9,7 +17,7 @@
## Version 1.6.2 (2017-03-17) ## Version 1.6.2 (2017-03-17)
- Flamenco: when opening non-existing file path, open parent instead - Sybren A. Stüvel - Flamenco: when opening non-existing file path, open parent instead
- Fix T50954: Improve Blender Cloud add-on project selector - Fix T50954: Improve Blender Cloud add-on project selector

View File

@@ -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, 6, 3), 'version': (1, 6, 4),
'blender': (2, 77, 0), 'blender': (2, 77, 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 '

View File

@@ -228,6 +228,11 @@ class BlenderCloudPreferences(AddonPreferences):
default='//../') default='//../')
flamenco_manager = PointerProperty(type=flamenco.FlamencoManagerGroup) flamenco_manager = PointerProperty(type=flamenco.FlamencoManagerGroup)
flamenco_exclude_filter = StringProperty(
name='File Exclude Filter',
description='Filter like "*.abc;*.mkv" to prevent certain files to be packed '
'into the output directory',
default='')
# TODO: before making Flamenco public, change the defaults to something less Institute-specific. # TODO: before making Flamenco public, change the defaults to something less Institute-specific.
# NOTE: The assumption is that the workers can also find the files in the same path. # NOTE: The assumption is that the workers can also find the files in the same path.
# This assumption is true for the Blender Institute. # This assumption is true for the Blender Institute.
@@ -418,13 +423,15 @@ class BlenderCloudPreferences(AddonPreferences):
# This is only needed when the project is set up for either Attract or Flamenco. # This is only needed when the project is set up for either Attract or Flamenco.
project_box.prop(self, 'cloud_project_local_path', project_box.prop(self, 'cloud_project_local_path',
text='Local Cloud project path') text='Local Cloud 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)
header_row.label('Flamenco:', icon_value=icon('CLOUD')) header_row.label('Flamenco:', icon_value=icon('CLOUD'))
manager_box = flamenco_box.row(align=True) manager_split = flamenco_box.split(0.32, align=True)
manager_split.label('Manager:')
manager_box = manager_split.row(align=True)
if bcp.status in {'NONE', 'IDLE'}: if bcp.status in {'NONE', 'IDLE'}:
if not bcp.available_managers or not bcp.manager: if not bcp.available_managers or not bcp.manager:
@@ -432,26 +439,33 @@ class BlenderCloudPreferences(AddonPreferences):
text='Find Flamenco Managers', text='Find Flamenco Managers',
icon='FILE_REFRESH') icon='FILE_REFRESH')
else: else:
manager_box.prop(bcp, 'manager', text='Manager') manager_box.prop(bcp, 'manager', text='')
manager_box.operator('flamenco.managers', manager_box.operator('flamenco.managers',
text='', text='',
icon='FILE_REFRESH') icon='FILE_REFRESH')
else: else:
manager_box.label('Fetching available managers.') manager_box.label('Fetching available managers.')
path_box = flamenco_box.row(align=True) path_split = flamenco_box.split(0.32, align=True)
path_box.prop(self, 'flamenco_job_file_path') path_split.label(text='Job File Path:')
path_box = path_split.row(align=True)
path_box.prop(self, 'flamenco_job_file_path', text='')
props = path_box.operator('flamenco.explore_file_path', text='', icon='DISK_DRIVE') props = path_box.operator('flamenco.explore_file_path', text='', icon='DISK_DRIVE')
props.path = self.flamenco_job_file_path props.path = self.flamenco_job_file_path
job_output_box = flamenco_box.column(align=True) job_output_box = flamenco_box.column(align=True)
path_box = job_output_box.row(align=True) path_split = job_output_box.split(0.32, align=True)
path_box.prop(self, 'flamenco_job_output_path') path_split.label(text='Job Output Path:')
path_box = path_split.row(align=True)
path_box.prop(self, 'flamenco_job_output_path', text='')
props = path_box.operator('flamenco.explore_file_path', text='', icon='DISK_DRIVE') props = path_box.operator('flamenco.explore_file_path', text='', icon='DISK_DRIVE')
props.path = self.flamenco_job_output_path props.path = self.flamenco_job_output_path
job_output_box.prop(self, 'flamenco_job_output_strip_components', job_output_box.prop(self, 'flamenco_exclude_filter')
text='Strip Components')
prop_split = job_output_box.split(0.32, align=True)
prop_split.label('Strip Components:')
prop_split.prop(self, 'flamenco_job_output_strip_components', text='')
from .flamenco import render_output_path from .flamenco import render_output_path

View File

@@ -300,6 +300,8 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
outdir = Path(prefs.flamenco_job_file_path) / unique_dir outdir = Path(prefs.flamenco_job_file_path) / unique_dir
outfile = outdir / filepath.name outfile = outdir / filepath.name
exclusion_filter = prefs.flamenco_exclude_filter or None
try: try:
outdir.mkdir(parents=True) outdir.mkdir(parents=True)
except Exception as ex: except Exception as ex:
@@ -309,7 +311,7 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
return None, [] return None, []
try: try:
missing_sources = await bam_interface.bam_copy(filepath, outfile) missing_sources = await bam_interface.bam_copy(filepath, outfile, exclusion_filter)
except bam_interface.CommandExecutionError as ex: except bam_interface.CommandExecutionError as ex:
self.log.exception('Unable to execute BAM pack') self.log.exception('Unable to execute BAM pack')
self.report({'ERROR'}, 'Unable to execute BAM pack: %s' % ex) self.report({'ERROR'}, 'Unable to execute BAM pack: %s' % ex)

View File

@@ -14,7 +14,8 @@ class CommandExecutionError(Exception):
pass pass
async def bam_copy(base_blendfile: Path, target_blendfile: Path) -> typing.List[Path]: async def bam_copy(base_blendfile: Path, target_blendfile: Path,
exclusion_filter: str) -> typing.List[Path]:
"""Uses BAM to copy the given file and dependencies to the target blendfile. """Uses BAM to copy the given file and dependencies to the target blendfile.
Due to the way blendfile_pack.py is programmed/structured, we cannot import it Due to the way blendfile_pack.py is programmed/structured, we cannot import it
@@ -41,6 +42,9 @@ async def bam_copy(base_blendfile: Path, target_blendfile: Path) -> typing.List[
'--mode', 'FILE', '--mode', 'FILE',
] ]
if exclusion_filter:
args.extend(['--exclude', exclusion_filter])
cmd_to_log = ' '.join(shlex.quote(s) for s in args) cmd_to_log = ' '.join(shlex.quote(s) for s in args)
log.info('Executing %s', cmd_to_log) log.info('Executing %s', cmd_to_log)

View File

@@ -227,11 +227,11 @@ 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.6.3', version='1.6.4',
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('.'),
data_files=[('blender_cloud', ['README.md', 'README-flamenco.md']), data_files=[('blender_cloud', ['README.md', 'README-flamenco.md', 'CHANGELOG.md']),
('blender_cloud/icons', glob.glob('blender_cloud/icons/*'))], ('blender_cloud/icons', glob.glob('blender_cloud/icons/*'))],
scripts=[], scripts=[],
url='https://developer.blender.org/diffusion/BCA/', url='https://developer.blender.org/diffusion/BCA/',