[Bf-extensions-cvs] [ab57ec6a] master: BlenderKit: Change the way tips are created.

Vilem Duha noreply at git.blender.org
Sun May 19 16:02:55 CEST 2019


Commit: ab57ec6a76cf344c6ae2c2d61b446a6e9bc4b0db
Author: Vilem Duha
Date:   Thu May 9 11:21:49 2019 +0200
Branches: master
https://developer.blender.org/rBAab57ec6a76cf344c6ae2c2d61b446a6e9bc4b0db

BlenderKit: Change the way tips are created.

===================================================================

M	blenderkit/search.py

===================================================================

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 = ''



More information about the Bf-extensions-cvs mailing list