mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 16:22:53 +00:00
Modifications to scheduled dates can now cascade through the task tree
This commit is contained in:
@@ -565,12 +565,15 @@ class AssignPredecessor(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
props = context.scene.BIMWorkScheduleProperties
|
||||
self.file = IfcStore.get_file()
|
||||
ifcopenshell.api.run(
|
||||
rel = ifcopenshell.api.run(
|
||||
"sequence.assign_sequence",
|
||||
self.file,
|
||||
relating_process=IfcStore.get_file().by_id(self.task),
|
||||
related_process=IfcStore.get_file().by_id(props.active_task_id),
|
||||
)
|
||||
ifcopenshell.api.run(
|
||||
"sequence.edit_sequence", self.file, rel_sequence=rel, attributes={"SequenceType": "FINISH_START"}
|
||||
)
|
||||
Data.load(self.file)
|
||||
bpy.ops.bim.load_task_properties(task=self.task)
|
||||
return {"FINISHED"}
|
||||
@@ -584,12 +587,15 @@ class AssignSuccessor(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
props = context.scene.BIMWorkScheduleProperties
|
||||
self.file = IfcStore.get_file()
|
||||
ifcopenshell.api.run(
|
||||
rel = ifcopenshell.api.run(
|
||||
"sequence.assign_sequence",
|
||||
self.file,
|
||||
relating_process=IfcStore.get_file().by_id(props.active_task_id),
|
||||
related_process=IfcStore.get_file().by_id(self.task),
|
||||
)
|
||||
ifcopenshell.api.run(
|
||||
"sequence.edit_sequence", self.file, rel_sequence=rel, attributes={"SequenceType": "FINISH_START"}
|
||||
)
|
||||
Data.load(self.file)
|
||||
bpy.ops.bim.load_task_properties(task=self.task)
|
||||
return {"FINISHED"}
|
||||
|
||||
Reference in New Issue
Block a user