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:
authorVilem Duha <vilem.duha@gmail.com>2019-05-28 16:53:44 +0300
committerVilem Duha <vilem.duha@gmail.com>2019-05-28 21:41:32 +0300
commit2f9b3836cc8d437ad5a86a528a76dc64bd1b6033 (patch)
tree22d1750579ad5c5e374954bd70b9111bdf78d069 /blenderkit/upload.py
parent18b843223df65b40bf77cb3c57a3824e2812647b (diff)
BlenderKit: switch to new validation system, wher mark for validation isn't needed.
Further protect for unavailable quotas from the server.
Diffstat (limited to 'blenderkit/upload.py')
-rw-r--r--blenderkit/upload.py25
1 files changed, 20 insertions, 5 deletions
diff --git a/blenderkit/upload.py b/blenderkit/upload.py
index 30e707d9..e3eaae48 100644
--- a/blenderkit/upload.py
+++ b/blenderkit/upload.py
@@ -26,8 +26,9 @@ if "bpy" in locals():
imp.reload(bg_blender)
imp.reload(autothumb)
imp.reload(version_checker)
+ imp.reload(ui_panels)
else:
- from blenderkit import asset_inspector, paths, utils, bg_blender, autothumb, version_checker, search
+ from blenderkit import asset_inspector, paths, utils, bg_blender, autothumb, version_checker, search,ui_panels
import tempfile, os, subprocess, json, re
@@ -549,6 +550,7 @@ def start_upload(self, context, asset_type, as_new, metadata_only):
if props.report != '':
self.report({'ERROR_INVALID_INPUT'}, props.report)
return {'CANCELLED'}
+
if as_new:
props.asset_base_id = ''
props.id = ''
@@ -723,13 +725,26 @@ class ModelUploadOperator(Operator):
return result
def draw(self, context):
+ props = utils.get_upload_props()
layout = self.layout
- layout.label(text="Really upload as new? ")
- layout.label(text="Do this only when you create a new asset from an old one.")
- layout.label(text="For updates of thumbnail or model use reupload.")
- def invoke(self, context, event):
if self.as_new:
+ layout.label(text="Really upload as new? ")
+ layout.label(text="Do this only when you create a new asset from an old one.")
+ layout.label(text="For updates of thumbnail or model use reupload.")
+
+ if props.is_private == 'PUBLIC':
+ ui_panels.label_multiline(layout, text='Since this version (1.0.24), '
+ 'PUBLIC ASSETS ARE VALIDATED AUTOMATICALLY '
+ ' after upload. '
+ 'Click Ok to proceed.')
+
+
+
+ def invoke(self, context, event):
+ props = utils.get_upload_props()
+
+ if self.as_new or props.is_private == 'PUBLIC':
return context.window_manager.invoke_props_dialog(self)
else:
return self.execute(context)