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:
authorVilém Duha <vilda.novak@gmail.com>2021-04-30 09:23:29 +0300
committerVilém Duha <vilda.novak@gmail.com>2021-04-30 09:23:29 +0300
commitf1d959b003e28ee2226b26651dfd6b0fff13d2e1 (patch)
tree3ce54163a9656d9fcce90793cd895a3dade012c3 /blenderkit/upload.py
parentbe10f1a6b9244d348947023ed5842eb432ca9657 (diff)
BlenderKit: fix layout of the floating preview
was unorganized after recent cleanup -cleaned part of the old code
Diffstat (limited to 'blenderkit/upload.py')
-rw-r--r--blenderkit/upload.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/blenderkit/upload.py b/blenderkit/upload.py
index b1d20f94..9fd54187 100644
--- a/blenderkit/upload.py
+++ b/blenderkit/upload.py
@@ -567,6 +567,14 @@ def update_free_full(self, context):
" based on our fair share system. " \
"Part of subscription is sent to artists based on usage by paying users.")
+def user_is_owner(asset_data=None):
+ '''Checks if the current logged in user is owner of the asset'''
+ profile = bpy.context.window_manager.get('bkit profile')
+ if profile is None:
+ return False
+ if int(asset_data['author']['id']) == int(profile['user']['id']):
+ return True
+ return False
def can_edit_asset(active_index=-1, asset_data=None):
if active_index < 0 and not asset_data: