mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Allow UV mode selection in Loader and add UI warning for SOLID Mode (no Generated or Camera UV)
This commit is contained in:
@@ -232,6 +232,8 @@ class BIM_PT_styles(Panel):
|
|||||||
row.operator("bim.add_surface_texture", text="", icon="ADD")
|
row.operator("bim.add_surface_texture", text="", icon="ADD")
|
||||||
if textures:
|
if textures:
|
||||||
self.layout.prop(self.props, "uv_mode")
|
self.layout.prop(self.props, "uv_mode")
|
||||||
|
if self.props.uv_mode in ("Generated", "Camera"):
|
||||||
|
self.layout.label(text="Not available in SOLID Mode", icon="INFO")
|
||||||
|
|
||||||
for i, texture in enumerate(textures):
|
for i, texture in enumerate(textures):
|
||||||
split = self.layout.split(factor=0.30, align=True)
|
split = self.layout.split(factor=0.30, align=True)
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class Loader(bonsai.core.tool.Loader):
|
|||||||
uv_mode = "Generated"
|
uv_mode = "Generated"
|
||||||
elif coordinates.is_a("IfcTextureCoordinateGenerator") and coordinates.Mode == "COORD-EYE":
|
elif coordinates.is_a("IfcTextureCoordinateGenerator") and coordinates.Mode == "COORD-EYE":
|
||||||
uv_mode = "Camera"
|
uv_mode = "Camera"
|
||||||
surface_texture["uv_mode"] = uv_mode or "Generated"
|
surface_texture["uv_mode"] = uv_mode or "UV"
|
||||||
return surface_texture
|
return surface_texture
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user