mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 03:05:33 +00:00
See #5799. Remove slow / unnecessary material criticals that also have a risk of crashing
In general Blender on my machine at least sometimes has huge lag with material previews.
This commit is contained in:
@@ -260,13 +260,9 @@ class BIM_UL_styles(UIList):
|
|||||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
||||||
if item:
|
if item:
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
material_icon = 0
|
row.prop(item, "name", text="", emboss=False)
|
||||||
if material := item.blender_material:
|
|
||||||
preview = material.preview_ensure()
|
|
||||||
material_icon = preview.icon_id
|
|
||||||
row.prop(item, "name", text="", emboss=False, icon_value=material_icon)
|
|
||||||
if item.has_surface_colour:
|
if item.has_surface_colour:
|
||||||
row = row.row(align=True)
|
row = row.row(align=item.has_diffuse_colour)
|
||||||
row.enabled = False
|
row.enabled = False
|
||||||
row.prop(item, "surface_colour", text="")
|
row.prop(item, "surface_colour", text="")
|
||||||
if item.has_diffuse_colour:
|
if item.has_diffuse_colour:
|
||||||
|
|||||||
Reference in New Issue
Block a user