diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2020-01-10 22:52:23 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2020-01-13 12:36:32 +0300 |
commit | cca88a08d5f5537f5c5cf57d061bf4d4b935de71 (patch) | |
tree | f7a700c3a2ae93d1bbe5eaf590b5bb1f47f8807b /blenderkit | |
parent | c96469928a3b0f6db6c31e183481f68b5d35c050 (diff) |
BlenderKit: more UI improvement
dynamic tooltip for asset bar and search
a lot of tooltips updated.
Diffstat (limited to 'blenderkit')
-rw-r--r-- | blenderkit/__init__.py | 18 | ||||
-rw-r--r-- | blenderkit/bkit_oauth.py | 4 | ||||
-rw-r--r-- | blenderkit/ui.py | 6 | ||||
-rw-r--r-- | blenderkit/ui_panels.py | 14 |
4 files changed, 24 insertions, 18 deletions
diff --git a/blenderkit/__init__.py b/blenderkit/__init__.py index 5409a441..a2a4a9f8 100644 --- a/blenderkit/__init__.py +++ b/blenderkit/__init__.py @@ -257,11 +257,11 @@ def asset_type_callback(self, context): ) else: items = ( - ('MODEL', 'Upload Model', 'Browse models', 'OBJECT_DATAMODE', 0), + ('MODEL', 'Upload Model', 'Upload a model to BlenderKit', 'OBJECT_DATAMODE', 0), # ('SCENE', 'SCENE', 'Browse scenes', 'SCENE_DATA', 1), - ('MATERIAL', 'Uplaod Material', 'Browse materials', 'MATERIAL', 2), + ('MATERIAL', 'Uplaod Material', 'Upload a material to BlenderKit', 'MATERIAL', 2), # ('TEXTURE', 'Texture', 'Browse textures', 'TEXTURE', 3), - ('BRUSH', 'Upload Brush', 'Browse brushes', 'BRUSH_DATA', 3) + ('BRUSH', 'Upload Brush', 'Upload a brush to BlenderKit', 'BRUSH_DATA', 3) ) return items @@ -269,9 +269,9 @@ class BlenderKitUIProps(PropertyGroup): down_up: EnumProperty( name="Download vs Upload", items=( - ('SEARCH', 'Search', 'Searching is active', 'VIEWZOOM', 0), - ('UPLOAD', 'Upload', 'Uploads are active', 'COPYDOWN', 1), - # ('RATING', 'Rating', 'Rating is active', 'SOLO_ON', 2) + ('SEARCH', 'Search', 'Sctivate searching', 'VIEWZOOM', 0), + ('UPLOAD', 'Upload', 'Activate uploading', 'COPYDOWN', 1), + # ('RATING', 'Rating', 'Activate rating', 'SOLO_ON', 2) ), description="BLenderKit", default="SEARCH", @@ -813,19 +813,19 @@ class BlenderKitModelUploadProps(PropertyGroup, BlenderKitCommonUploadProps): manufacturer: StringProperty( name="Manufacturer", - description="Manufacturer, company making a design peace or product", + description="Manufacturer, company making a design peace or product. Not you", default="", ) designer: StringProperty( name="Designer", - description="Author of the original design piece depicted", + description="Author of the original design piece depicted. Usually not you", default="", ) design_collection: StringProperty( name="Design Collection", - description="Fill if this piece is part of a design collection", + description="Fill if this piece is part of a real world design collection", default="", ) diff --git a/blenderkit/bkit_oauth.py b/blenderkit/bkit_oauth.py index 259fedf5..a3d86793 100644 --- a/blenderkit/bkit_oauth.py +++ b/blenderkit/bkit_oauth.py @@ -99,7 +99,7 @@ def write_tokens(auth_token, refresh_token, oauth_response): class RegisterLoginOnline(bpy.types.Operator): - """Bring linked object hierarchy to scene and make it editable.""" + """Login online on BlenderKit webpage.""" bl_idname = "wm.blenderkit_login" bl_label = "BlenderKit login or signup" @@ -124,7 +124,7 @@ class RegisterLoginOnline(bpy.types.Operator): class Logout(bpy.types.Operator): - """Bring linked object hierarchy to scene and make it editable.""" + """Logout from BlenderKit immediately.""" bl_idname = "wm.blenderkit_logout" bl_label = "BlenderKit logout" diff --git a/blenderkit/ui.py b/blenderkit/ui.py index 8db62433..72d0e4b8 100644 --- a/blenderkit/ui.py +++ b/blenderkit/ui.py @@ -1186,6 +1186,12 @@ class AssetBarOperator(bpy.types.Operator): description="search only subtree of this category", default="", options={'SKIP_SAVE'}) + tooltip: bpy.props.StringProperty(default = 'runs search and displays the asset bar at the same time') + + @classmethod + def description(cls, context, properties): + return properties.tooltip + def search_more(self): sro = bpy.context.scene.get('search results orig') if sro is not None and sro.get('next') is not None: diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py index ed6c993b..95dddc48 100644 --- a/blenderkit/ui_panels.py +++ b/blenderkit/ui_panels.py @@ -270,12 +270,16 @@ def draw_assetbar_show_hide(layout, props): if ui_props.assetbar_on: icon = 'HIDE_OFF' + ttip = 'Click to Hide Asset Bar' else: icon = 'HIDE_ON' + ttip = 'Click to Show Asset Bar' op = layout.operator('view3d.blenderkit_asset_bar', text='', icon=icon) op.keep_running = False op.do_search = False + op.tooltip = ttip + def draw_panel_model_search(self, context): s = context.scene @@ -681,6 +685,8 @@ class VIEW3D_PT_blenderkit_unified(Panel): op = layout.operator('view3d.blenderkit_asset_bar', text=text, icon='EXPORT') op.keep_running = False op.do_search = False + op.tooltip = 'Show/Hide asset preview' + e = s.render.engine if e not in ('CYCLES', 'BLENDER_EEVEE'): rtext = 'Only Cycles and EEVEE render engines are currently supported. ' \ @@ -984,13 +990,7 @@ def header_search_draw(self, context): layout.separator_spacer() layout.prop(ui_props, "asset_type", text='', icon='URL') layout.prop(props, "search_keywords", text="", icon='VIEWZOOM') - if ui_props.assetbar_on: - icon = 'HIDE_OFF' - else: - icon = 'HIDE_ON' - op = layout.operator('view3d.blenderkit_asset_bar', text='', icon=icon) - op.keep_running = False - op.do_search = False + draw_assetbar_show_hide(layout, props) # We can store multiple preview collections here, |