Add tests for new light rendered shadows feature

This commit is contained in:
Dion Moult
2025-03-13 22:06:21 +11:00
parent 5cb9e1c68d
commit 3852e3c63f
3 changed files with 19 additions and 5 deletions
-1
View File
@@ -236,7 +236,6 @@ class BIM_PT_solar(bpy.types.Panel):
row.operator("bim.move_sun_path_to_3d_cursor")
row = self.layout.row(align=True)
# row.prop(props, "display_shadows", icon="SHADING_RENDERED")
row.prop(props, "shadow_mode", icon="SHADING_RENDERED", expand=True)
if props.shadow_mode == "SHADING":
+2 -2
View File
@@ -170,8 +170,8 @@ class BIM_PT_styles(Panel):
row.prop(self.props, "reflectance_method")
if self.props.reflectance_method not in ("PHYSICAL", "NOTDEFINED", "FLAT"):
self.layout.label(text=f"Supported reflectance methods are:")
self.layout.label(text=f"PHYSICAL / NOTDEFINED / FLAT")
self.layout.label(text="Supported reflectance methods are:")
self.layout.label(text="PHYSICAL / NOTDEFINED / FLAT")
row = self.layout.row(align=True)
row.label(text="Emissive" if self.props.reflectance_method == "FLAT" else "Diffuse")
+17 -2
View File
@@ -44,11 +44,26 @@ Scenario: Display the sun path
And I set the "Sun Path Size" property to "100.0"
Then nothing happens
Scenario: Display shadows
Scenario: See no shadows
Given an empty IFC project
When I look at the "Solar Access / Shadow" panel
Then I don't see "Sun Intensity"
And I don't see "Shadow Intensity"
Scenario: Display shaded shadows
Given an empty IFC project
And I look at the "Solar Access / Shadow" panel
When I click "Display Shadows"
When I set the "Shadow Mode" property to "Shaded"
And I set the "Shadow Intensity" property to "1.0"
And I don't see "Sun Intensity"
Then nothing happens
Scenario: Display rendered shadows
Given an empty IFC project
And I look at the "Solar Access / Shadow" panel
When I set the "Shadow Mode" property to "Rendered"
And I set the "Sun Intensity" property to "1.0"
And I don't see "Shadow Intensity"
Then nothing happens
Scenario: View from sun