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:
authorVilem Duha <vilem.duha@gmail.com>2019-05-09 12:21:49 +0300
committerVilem Duha <vilem.duha@gmail.com>2019-05-19 16:45:50 +0300
commitab57ec6a76cf344c6ae2c2d61b446a6e9bc4b0db (patch)
treeb63fb2ffa8efa91a82192e82a16920ff687a8841 /blenderkit
parent3c3283c92b9817a39d451de75f51e540105afc82 (diff)
BlenderKit: Change the way tips are created.
Diffstat (limited to 'blenderkit')
-rw-r--r--blenderkit/search.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/blenderkit/search.py b/blenderkit/search.py
index f3d96ada..b0ea46f9 100644
--- a/blenderkit/search.py
+++ b/blenderkit/search.py
@@ -447,13 +447,15 @@ def generate_tooltip(mdata):
if adata != None:
t += generate_author_textblock(adata)
- at = mdata['assetType']
- t += '\n'
+ t += '\n'
+ t += get_random_tip(mdata)
return t
-def get_random_tip():
+def get_random_tip(mdata):
+ at = mdata['assetType']
+ t = ''
if at == 'brush' or at == 'texture':
t += 'click to link %s' % mdata['assetType']
if at == 'model' or at == 'material':
@@ -463,7 +465,7 @@ def get_random_tip():
]
tip = 'Tip: ' + random.choice(tips)
t = writeblock(t, tip)
-
+ return t
def generate_author_textblock(adata):
t = ''