diff options
-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): |