diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2021-02-28 23:57:32 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2021-03-16 19:12:17 +0300 |
commit | 7164debdd6cea41807e5bdc160f05175f1a1d804 (patch) | |
tree | 0930d0be5226ccbb8438afdfdc79588c188ee858 /blenderkit/paths.py | |
parent | c3b43de9ece49e4f72a35f9b6e8734657e039adf (diff) |
BlenderKit: several fixes
drag drop start was too sensitive and practically disabled click behaviour.
resolution - swapping from original resolution invoke
asset name is shortened for the purpose of saving to files - There were some assets that couldn't download because of super-long names.
category fix mode -
Diffstat (limited to 'blenderkit/paths.py')
-rw-r--r-- | blenderkit/paths.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/blenderkit/paths.py b/blenderkit/paths.py index 2a133064..f5e9a3f2 100644 --- a/blenderkit/paths.py +++ b/blenderkit/paths.py @@ -169,7 +169,7 @@ def slugify(slug): import unicodedata, re slug = slug.lower() - characters = '.," <>()' + characters = '<>:"/\\|?*., ()' for ch in characters: slug = slug.replace(ch, '_') # import re @@ -179,6 +179,8 @@ def slugify(slug): slug = re.sub(r'[-]+', '-', slug) slug = re.sub(r'/', '_', slug) slug = re.sub(r'\\\'\"', '_', slug) + if len(slug)>50: + slug = slug[:50] return slug |