mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
forgotten bits and bobs + run black
This commit is contained in:
@@ -766,6 +766,7 @@ class Sequence:
|
|||||||
def show_snapshot(cls, product_states): pass
|
def show_snapshot(cls, product_states): pass
|
||||||
def update_task_ICOM(cls, task): pass
|
def update_task_ICOM(cls, task): pass
|
||||||
def update_visualisation_date(cls, start_date, finish_date): pass
|
def update_visualisation_date(cls, start_date, finish_date): pass
|
||||||
|
def refresh_task_resources(cls): pass
|
||||||
|
|
||||||
|
|
||||||
@interface
|
@interface
|
||||||
|
|||||||
@@ -198,8 +198,12 @@ class Sequence(blenderbim.core.tool.Sequence):
|
|||||||
item.name = task.Name or "Unnamed"
|
item.name = task.Name or "Unnamed"
|
||||||
item.identification = task.Identification or "XXX"
|
item.identification = task.Identification or "XXX"
|
||||||
if props.highlighted_task_id:
|
if props.highlighted_task_id:
|
||||||
item.is_predecessor = props.highlighted_task_id in [rel.RelatedProcess.id() for rel in task.IsPredecessorTo]
|
item.is_predecessor = props.highlighted_task_id in [
|
||||||
item.is_successor = props.highlighted_task_id in [rel.RelatingProcess.id() for rel in task.IsSuccessorFrom]
|
rel.RelatedProcess.id() for rel in task.IsPredecessorTo
|
||||||
|
]
|
||||||
|
item.is_successor = props.highlighted_task_id in [
|
||||||
|
rel.RelatingProcess.id() for rel in task.IsSuccessorFrom
|
||||||
|
]
|
||||||
calendar = ifcopenshell.util.sequence.derive_calendar(task)
|
calendar = ifcopenshell.util.sequence.derive_calendar(task)
|
||||||
if task.HasAssignments:
|
if task.HasAssignments:
|
||||||
for rel in task.HasAssignments:
|
for rel in task.HasAssignments:
|
||||||
@@ -466,9 +470,11 @@ class Sequence(blenderbim.core.tool.Sequence):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_highlighted_task(cls):
|
def get_highlighted_task(cls):
|
||||||
props = bpy.context.scene.BIMWorkScheduleProperties
|
tasks = bpy.context.scene.BIMTaskTreeProperties.tasks
|
||||||
task_props = bpy.context.scene.BIMTaskTreeProperties
|
if len(tasks) and len(tasks) > bpy.context.scene.BIMWorkScheduleProperties.active_task_index:
|
||||||
return tool.Ifc.get().by_id(task_props.tasks[props.active_task_index].ifc_definition_id)
|
return tool.Ifc.get().by_id(
|
||||||
|
tasks[bpy.context.scene.BIMWorkScheduleProperties.active_task_index].ifc_definition_id
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_direct_nested_tasks(cls, task):
|
def get_direct_nested_tasks(cls, task):
|
||||||
@@ -1667,4 +1673,11 @@ class Sequence(blenderbim.core.tool.Sequence):
|
|||||||
resources = cls.get_task_resources(task)
|
resources = cls.get_task_resources(task)
|
||||||
cls.load_task_inputs(inputs)
|
cls.load_task_inputs(inputs)
|
||||||
cls.load_task_outputs(outputs)
|
cls.load_task_outputs(outputs)
|
||||||
cls.load_task_resources(resources)
|
cls.load_task_resources(resources)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def refresh_task_resources(cls):
|
||||||
|
task = cls.get_highlighted_task()
|
||||||
|
if not task:
|
||||||
|
return
|
||||||
|
cls.load_task_resources(cls.get_task_resources(task))
|
||||||
|
|||||||
Reference in New Issue
Block a user