diff options
author | Vilem Duha <vilem.duha@gmail.com> | 2019-06-06 15:28:10 +0300 |
---|---|---|
committer | Vilem Duha <vilem.duha@gmail.com> | 2019-06-06 15:28:33 +0300 |
commit | ae500d28913b17248653f79842d038c75b353e86 (patch) | |
tree | 5c3d633038f5f6c9e7c692c0b994f28f975beffb | |
parent | 9823579a2da0d65f8e545e7daefd18a38676e859 (diff) |
BlenderKit: oauth logout is now only in preferences.
-rw-r--r-- | blenderkit/__init__.py | 7 | ||||
-rw-r--r-- | blenderkit/ui_panels.py | 3 |
2 files changed, 6 insertions, 4 deletions
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): |