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-01-27 20:15:34 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-01-28 15:45:44 +0300
commitf78b7f9618085f35edab46c5a599bdb1c5f843e0 (patch)
tree2b7fe5c3b4777865a4fdd8f319a140b308e5c473 /blenderkit/ui_panels.py
parent4300021a7a8ec4bd092237848daa1ecb96616df7 (diff)
BlenderKit: prevent blender crashes + undo fix
Blender tends to crash during unregistration process when some functions still run (like UI) this is a bug that should be reported, however this fixes the problem at least for BlenderKit now. appending an asset now runs undo push operator with faked context - works surprisingly well. improving lots of tooltips. ratings download license display default sorting by uploaded last
Diffstat (limited to 'blenderkit/ui_panels.py')
-rw-r--r--blenderkit/ui_panels.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index 00ff869e..8bd9fd58 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -44,7 +44,7 @@ def label_multiline(layout, text='', icon='NONE', width=-1):
threshold = int(width / 5.5)
else:
threshold = 35
- maxlines = 6
+ maxlines = 8
li = 0
for l in lines:
while len(l) > threshold:
@@ -584,7 +584,9 @@ def draw_panel_material_search(self, context):
if props.search_advanced:
layout.separator()
- layout.prop(props, "search_procedural", expand=True)
+ layout.label(text = 'texture types')
+ col = layout.column()
+ col.prop(props, "search_procedural", expand=True)
if props.search_procedural == 'TEXTURE_BASED':
# TEXTURE RESOLUTION
@@ -1046,6 +1048,10 @@ class VIEW3D_PT_blenderkit_downloads(Panel):
def header_search_draw(self, context):
'''Top bar menu in 3d view'''
+
+ if not utils.guard_from_crash():
+ return;
+
preferences = bpy.context.preferences.addons['blenderkit'].preferences
if preferences.search_in_header:
layout = self.layout
@@ -1071,7 +1077,6 @@ def header_search_draw(self, context):
preview_collections = {}
classess = (
SetCategoryOperator,
-
VIEW3D_PT_blenderkit_profile,
VIEW3D_PT_blenderkit_login,
VIEW3D_PT_blenderkit_unified,
@@ -1090,5 +1095,6 @@ def register_ui_panels():
def unregister_ui_panels():
for c in classess:
+ print('unregister', c)
bpy.utils.unregister_class(c)
bpy.types.VIEW3D_MT_editor_menus.remove(header_search_draw)