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