mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Enable displaying number of resources used by a task
This commit is contained in:
@@ -275,6 +275,7 @@ class WorkPlan(PropertyGroup):
|
||||
class TaskResource(PropertyGroup):
|
||||
name: StringProperty(name="Name")
|
||||
ifc_definition_id: IntProperty(name="IFC Definition ID")
|
||||
schedule_usage: FloatProperty(name="Schedule Usage")
|
||||
|
||||
|
||||
class TaskProduct(PropertyGroup):
|
||||
|
||||
@@ -473,6 +473,7 @@ class BIM_UL_task_resources(UIList):
|
||||
if item:
|
||||
row = layout.row(align=True)
|
||||
row.prop(item, "name", emboss=False, text="")
|
||||
row.prop(item, "schedule_usage", emboss=False, text="")
|
||||
|
||||
|
||||
class BIM_UL_task_outputs(UIList):
|
||||
|
||||
@@ -422,6 +422,7 @@ class Sequence(blenderbim.core.tool.Sequence):
|
||||
new = props.task_resources.add()
|
||||
new.ifc_definition_id = resource.id()
|
||||
new.name = resource.Name or "Unnamed"
|
||||
new.schedule_usage = resource.Usage.ScheduleUsage or 1 if resource.Usage else 0
|
||||
|
||||
@classmethod
|
||||
def load_resources(cls):
|
||||
|
||||
Reference in New Issue
Block a user