mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Merge branch 'v0.7.0' of https://github.com/IfcOpenShell/IfcOpenShell into IfcOpenShell-v0.7.0
This commit is contained in:
@@ -89,7 +89,7 @@ def i_add_an_empty():
|
||||
|
||||
|
||||
@given("I add a sun")
|
||||
@when("I add an sun")
|
||||
@when("I add a sun")
|
||||
def i_add_a_sun():
|
||||
bpy.ops.object.light_add(type="SUN")
|
||||
|
||||
@@ -100,17 +100,15 @@ def i_add_a_material():
|
||||
bpy.context.active_object.active_material = bpy.data.materials.new("Material")
|
||||
|
||||
|
||||
@given("I add a new group to IfcSelector")
|
||||
@when("I add a new group to IfcSelector")
|
||||
def i_add_a_new_collection_item():
|
||||
bpy.data.scenes["Scene"].IfcSelectorProperties.groups.add()
|
||||
@given(parsers.parse('I add a new item to "{collection}"'))
|
||||
@when(parsers.parse('I add a new item to "{collection}"'))
|
||||
def i_add_a_new_collection_item(collection):
|
||||
try:
|
||||
eval(f"bpy.context.{collection}.add()")
|
||||
except:
|
||||
assert False, "Collection does not exist"
|
||||
|
||||
|
||||
@given("I add a new query to IfcSelector")
|
||||
@when("I add a new query to IfcSelector")
|
||||
def i_add_a_new_collection_item():
|
||||
bpy.data.scenes["Scene"].IfcSelectorProperties.groups[0].queries.add()
|
||||
|
||||
|
||||
@given(parsers.parse('the material "{name}" colour is set to "{colour}"'))
|
||||
@when(parsers.parse('the material "{name}" colour is set to "{colour}"'))
|
||||
@@ -489,6 +487,7 @@ def prop_is_value(prop, value):
|
||||
except:
|
||||
pass
|
||||
if not is_value:
|
||||
print(f"bpy.context.{prop}")
|
||||
actual_value = eval(f"bpy.context.{prop}")
|
||||
assert False, f"Value is {actual_value}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user