mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 11:24:19 +00:00
Fix sequence module test bugs
This commit is contained in:
@@ -105,7 +105,6 @@ class AssignWorkSchedule(bpy.types.Operator, tool.Ifc.Operator):
|
||||
def _execute(self, context):
|
||||
core.assign_work_schedule(
|
||||
tool.Ifc,
|
||||
tool.Sequence,
|
||||
work_plan=tool.Ifc.get().by_id(self.work_plan),
|
||||
work_schedule=tool.Ifc.get().by_id(self.work_schedule),
|
||||
)
|
||||
@@ -121,7 +120,6 @@ class UnassignWorkSchedule(bpy.types.Operator, tool.Ifc.Operator):
|
||||
def _execute(self, context):
|
||||
core.unassign_work_schedule(
|
||||
tool.Ifc,
|
||||
work_plan=tool.Ifc.get().by_id(self.work_plan),
|
||||
work_schedule=tool.Ifc.get().by_id(self.work_schedule),
|
||||
)
|
||||
|
||||
|
||||
@@ -58,12 +58,11 @@ def remove_work_schedule(ifc, work_schedule=None):
|
||||
ifc.run("sequence.remove_work_schedule", work_schedule=work_schedule)
|
||||
|
||||
|
||||
def assign_work_schedule(ifc, sequence, work_plan=None, work_schedule=None):
|
||||
def assign_work_schedule(ifc, work_plan=None, work_schedule=None):
|
||||
if work_schedule:
|
||||
return ifc.run("aggregate.assign_object", relating_object=work_plan, product=work_schedule)
|
||||
|
||||
|
||||
def unassign_work_schedule(ifc, work_plan=None, work_schedule=None):
|
||||
def unassign_work_schedule(ifc, work_schedule=None):
|
||||
ifc.run("aggregate.unassign_object", product=work_schedule)
|
||||
|
||||
|
||||
|
||||
@@ -1230,7 +1230,7 @@ class Sequence(blenderbim.core.tool.Sequence):
|
||||
elif product_frame["type"] in ["ATTENDANCE", "MAINTENANCE", "OPERATION", "RENOVATION"]:
|
||||
cls.animate_operation(obj, start_frame, product_frame, color)
|
||||
elif product_frame["type"] in ["LOGISTIC", "MOVE"]:
|
||||
cls.animate_movement_to(obj, product_frame, color)
|
||||
cls.animate_movement_to(obj, start_frame, product_frame, color)
|
||||
else:
|
||||
cls.animate_operation(obj, start_frame, product_frame, color)
|
||||
|
||||
|
||||
@@ -523,7 +523,7 @@ Scenario: Animate the consumption of a wall
|
||||
And "scene.objects.get('IfcWall/Cube').hide_viewport" is "False"
|
||||
And "scene.objects.get('IfcWall/Cube').hide_render" is "False"
|
||||
When I am on frame "2"
|
||||
Then "scene.objects.get('IfcWall/Cube').color" is "[0.0, 1.0, 1.0, 1]"
|
||||
Then "scene.objects.get('IfcWall/Cube').color" is "[0.2, 0.2, 0.2, 1]"
|
||||
And "scene.objects.get('IfcWall/Cube').hide_viewport" is "False"
|
||||
And "scene.objects.get('IfcWall/Cube').hide_render" is "False"
|
||||
When I am on frame "7"
|
||||
|
||||
Reference in New Issue
Block a user