mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Readable error trying to create a texture style without textures #5855
This commit is contained in:
@@ -825,14 +825,17 @@ class EditSurfaceStyle(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
"Define shading/render style first",
|
"Define shading/render style first",
|
||||||
)
|
)
|
||||||
return {"CANCELLED"}
|
return {"CANCELLED"}
|
||||||
textures = tool.Ifc.run("style.add_surface_textures", textures=self.get_texture_attributes(), uv_maps=[])
|
textures = self.get_texture_attributes()
|
||||||
if textures:
|
if not textures:
|
||||||
texture_style = tool.Ifc.run(
|
self.report({"ERROR"}, "Cannot create texture style without any textures.")
|
||||||
"style.add_surface_style",
|
return {"CANCELLED"}
|
||||||
style=self.style,
|
textures = tool.Ifc.run("style.add_surface_textures", textures=textures, uv_maps=[])
|
||||||
ifc_class="IfcSurfaceStyleWithTextures",
|
texture_style = tool.Ifc.run(
|
||||||
attributes={"Textures": textures},
|
"style.add_surface_style",
|
||||||
)
|
style=self.style,
|
||||||
|
ifc_class="IfcSurfaceStyleWithTextures",
|
||||||
|
attributes={"Textures": textures},
|
||||||
|
)
|
||||||
tool.Loader.create_surface_style_with_textures(material, shading_style, texture_style)
|
tool.Loader.create_surface_style_with_textures(material, shading_style, texture_style)
|
||||||
else:
|
else:
|
||||||
attributes = tool.Style.get_style_ui_props_attributes(self.props.is_editing_class)
|
attributes = tool.Style.get_style_ui_props_attributes(self.props.is_editing_class)
|
||||||
|
|||||||
Reference in New Issue
Block a user