Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVilém Duha <vilda.novak@gmail.com>2021-01-19 20:32:26 +0300
committerVilém Duha <vilda.novak@gmail.com>2021-01-19 20:32:26 +0300
commit789773b05f53360a21e51520247c2da5a22e38d8 (patch)
tree760ea7236919c7e9939dd6d67a956323aa9bb36b /blenderkit/ui_panels.py
parentaf50ac234088b0d7eeab54cd498c0318a1f95c76 (diff)
BlenderKit: fix category upload for 3 level categories
If the subcategory1 enum was empty but the enum value would be higher than 0 from previous attempts, the metadata upload would fail.
Diffstat (limited to 'blenderkit/ui_panels.py')
-rw-r--r--blenderkit/ui_panels.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index 4948b651..40be0800 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -1592,9 +1592,9 @@ def draw_panel_categories(self, context):
# op.free_only = True
for c in cats['children']:
- if c['assetCount'] > 0:
+ if c['assetCount'] > 0 or utils.profile_is_validator():
row = col.row(align=True)
- if len(c['children']) > 0 and c['assetCount'] > 15:
+ if len(c['children']) > 0 and c['assetCount'] > 15 or utils.profile_is_validator():
row = row.split(factor=.8, align=True)
# row = split.split()
ctext = '%s (%i)' % (c['name'], c['assetCount'])
@@ -1608,7 +1608,7 @@ def draw_panel_categories(self, context):
op.keep_running = True
op.category = c['slug']
# TODO enable subcategories, now not working due to some bug on server probably
- if len(c['children']) > 0 and c['assetCount'] > 15:
+ if len(c['children']) > 0 and c['assetCount'] > 15 or utils.profile_is_validator():
# row = row.split()
op = row.operator('view3d.blenderkit_set_category', text='>>')
op.asset_type = ui_props.asset_type