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-31 01:14:33 +0300
committerVilem Duha <vilem.duha@gmail.com>2019-06-01 19:49:19 +0300
commit07d74a9b2e341c2eea77404b25d45791e3c46296 (patch)
tree5dad2159cb1c4850fd5ae44d8fafdb982e869544 /blenderkit/ui_panels.py
parent7f6405130af3e693a9d806d3ebd4cd414a59b245 (diff)
BlenderKit: Further login and Oauth tweaks
Diffstat (limited to 'blenderkit/ui_panels.py')
-rw-r--r--blenderkit/ui_panels.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index b74e3bbe..197f208f 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -544,10 +544,17 @@ def draw_panel_brush_ratings(self, context):
def draw_login_buttons(layout):
- layout.operator("wm.blenderkit_login", text="Login",
- icon='URL').signup = False
- layout.operator("wm.blenderkit_login", text="Sign up",
- icon='URL').signup = True
+ user_preferences = bpy.context.preferences.addons['blenderkit'].preferences
+
+ if user_preferences.login_attempt:
+ layout.label(text='Login through browser')
+ layout.label(text='in progress.')
+ layout.operator("wm.blenderkit_login_cancel", text="Cancel", icon='CANCEL')
+ else:
+ layout.operator("wm.blenderkit_login", text="Login",
+ icon='URL').signup = False
+ layout.operator("wm.blenderkit_login", text="Sign up",
+ icon='URL').signup = True
class VIEW3D_PT_blenderkit_unified(Panel):