Fixed Flamenco exclusion filter bug

There was a mistake in an older version of the property tooltip, showing
semicolon-separated instead of space-separated. We now just handle both.
This commit is contained in:
Sybren A. Stüvel 2018-12-07 12:25:48 +01:00
parent 4fd4ad7448
commit 8899bff5e4
2 changed files with 9 additions and 4 deletions

View File

@ -219,8 +219,8 @@ class BlenderCloudPreferences(AddonPreferences):
flamenco_manager = PointerProperty(type=flamenco.FlamencoManagerGroup) flamenco_manager = PointerProperty(type=flamenco.FlamencoManagerGroup)
flamenco_exclude_filter = StringProperty( flamenco_exclude_filter = StringProperty(
name='File Exclude Filter', name='File Exclude Filter',
description='Filter like "*.abc;*.mkv" to prevent certain files to be packed ' description='Space-separated list of filename filters, like "*.abc *.mkv", to prevent '
'into the output directory', 'matching files from being packed into the output directory',
default='', default='',
update=project_specific.store, update=project_specific.store,
) )

View File

@ -2,9 +2,10 @@
import asyncio import asyncio
import logging import logging
import pathlib
import re
import threading import threading
import typing import typing
import pathlib
import bpy import bpy
from blender_asset_tracer import pack from blender_asset_tracer import pack
@ -114,7 +115,11 @@ async def copy(context,
as packer: as packer:
with _packer_lock: with _packer_lock:
if exclusion_filter: if exclusion_filter:
packer.exclude(*exclusion_filter.split()) # There was a mistake in an older version of the property tooltip,
# showing semicolon-separated instead of space-separated. We now
# just handle both.
filter_parts = re.split('[ ;]+', exclusion_filter.strip(' ;'))
packer.exclude(*filter_parts)
packer.progress_cb = BatProgress() packer.progress_cb = BatProgress()
_running_packer = packer _running_packer = packer