mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 05:07:59 +00:00
BBIM: Disable "Create animation" buttons when no start dates/end dates are given
This commit is contained in:
@@ -1024,6 +1024,10 @@ class VisualiseWorkScheduleDate(bpy.types.Operator):
|
|||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
work_schedule: bpy.props.IntProperty()
|
work_schedule: bpy.props.IntProperty()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
return bool(bpy.context.scene.BIMWorkScheduleProperties.visualisation_start)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
props = context.scene.BIMWorkScheduleProperties
|
props = context.scene.BIMWorkScheduleProperties
|
||||||
self.file = IfcStore.get_file()
|
self.file = IfcStore.get_file()
|
||||||
@@ -1090,6 +1094,11 @@ class VisualiseWorkScheduleDateRange(bpy.types.Operator):
|
|||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
work_schedule: bpy.props.IntProperty()
|
work_schedule: bpy.props.IntProperty()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
has_start, has_finish = bpy.context.scene.BIMWorkScheduleProperties.visualisation_start, bpy.context.scene.BIMWorkScheduleProperties.visualisation_finish
|
||||||
|
return bool(has_start and has_finish)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
core.visualise_work_schedule_date_range(tool.Sequence, work_schedule=tool.Ifc.get().by_id(self.work_schedule))
|
core.visualise_work_schedule_date_range(tool.Sequence, work_schedule=tool.Ifc.get().by_id(self.work_schedule))
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|||||||
Reference in New Issue
Block a user