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>2020-12-27 23:26:55 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-12-27 23:26:55 +0300
commit317934f41738179fbd18acda57cc3ff85eb3ac27 (patch)
treecc489c3d9232ea9eadc060de6285755fddf69856 /blenderkit/ui_panels.py
parent5a6b7e99c1297d60022117ad596d5614892340ed (diff)
BlenderKit: several improvements to rating
Try to make rating more prominent in the interface by adding some messages to tooltips (by now only for validators), reorder rating in the menu Fix texture resolution in tooltips.
Diffstat (limited to 'blenderkit/ui_panels.py')
-rw-r--r--blenderkit/ui_panels.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index 9d8d6460..daa88f82 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -1134,6 +1134,14 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
author_id = str(asset_data['author'].get('id'))
wm = bpy.context.window_manager
+
+ layout.operator_context = 'INVOKE_DEFAULT'
+
+ op = layout.operator('wm.blenderkit_menu_rating_upload', text='Rate')
+ op.asset_name = asset_data['name']
+ op.asset_id = asset_data['id']
+ op.asset_type = asset_data['assetType']
+
if wm.get('bkit authors') is not None and author_id is not None:
a = bpy.context.window_manager['bkit authors'].get(author_id)
if a is not None:
@@ -1181,12 +1189,7 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
# if asset_data['downloaded'] == 100: # only show for downloaded/used assets
# if ui_props.asset_type in ('MODEL', 'MATERIAL'):
# layout.menu(OBJECT_MT_blenderkit_resolution_menu.bl_idname)
- layout.operator_context = 'INVOKE_DEFAULT'
- op = layout.operator('wm.blenderkit_menu_rating_upload', text='Rate')
- op.asset_name = asset_data['name']
- op.asset_id = asset_data['id']
- op.asset_type = asset_data['assetType']
if ui_props.asset_type in ('MODEL', 'MATERIAL', 'HDR') and \
utils.get_param(asset_data, 'textureResolutionMax') is not None and \