[Bf-extensions-cvs] [ae500d28] master: BlenderKit: oauth logout is now only in preferences.

Vilem Duha noreply at git.blender.org
Thu Jun 6 14:31:02 CEST 2019


Commit: ae500d28913b17248653f79842d038c75b353e86
Author: Vilem Duha
Date:   Thu Jun 6 14:28:10 2019 +0200
Branches: master
https://developer.blender.org/rBAae500d28913b17248653f79842d038c75b353e86

BlenderKit: oauth logout is now only in preferences.

===================================================================

M	blenderkit/__init__.py
M	blenderkit/ui_panels.py

===================================================================

diff --git a/blenderkit/__init__.py b/blenderkit/__init__.py
index c6be61fd..e2b6445a 100644
--- a/blenderkit/__init__.py
+++ b/blenderkit/__init__.py
@@ -1350,8 +1350,13 @@ class BlenderKitAddonPreferences(AddonPreferences):
                 op = layout.operator("wm.url_open", text="Register online and get your API Key",
                                      icon='QUESTION')
                 op.url = paths.BLENDERKIT_SIGNUP_URL
+        else:
+            if self.enable_oauth:
+                layout.operator("wm.blenderkit_logout", text="Logout",
+                                icon='URL')
 
-        layout.prop(self, "api_key", text='Your API Key')
+        if not self.enable_oauth:
+            layout.prop(self, "api_key", text='Your API Key')
         # layout.label(text='After you paste API Key, categories are downloaded, so blender will freeze for a few seconds.')
         layout.prop(self, "global_dir")
         layout.prop(self, "project_subdir")
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index 37b84aeb..480d1afe 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -425,9 +425,6 @@ class VIEW3D_PT_blenderkit_profile(Panel):
                     layout.label(text='Remaining private storage: %i MiB' % (me['remainingPrivateQuota']))
             layout.operator("wm.url_open", text="See my uploads",
                             icon='URL').url = paths.BLENDERKIT_USER_ASSETS
-            if user_preferences.enable_oauth:
-                layout.operator("wm.blenderkit_logout", text="Logout",
-                                icon='URL')
 
 
 def draw_panel_model_rating(self, context):



More information about the Bf-extensions-cvs mailing list