mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
fix loading animation color scheme
This commit is contained in:
@@ -513,6 +513,7 @@ def visualise_work_schedule_date_range(sequence, work_schedule=None):
|
||||
product_frames = sequence.get_animation_product_frames(work_schedule, settings)
|
||||
if not sequence.has_animation_colors():
|
||||
sequence.load_default_animation_color_scheme()
|
||||
load_animation_color_scheme(sequence, scheme=sequence.get_animation_color_scheme())
|
||||
sequence.animate_objects(settings, product_frames, "date_range")
|
||||
sequence.add_text_animation_handler(settings)
|
||||
add_task_bars(sequence)
|
||||
|
||||
@@ -1699,4 +1699,9 @@ class Sequence(blenderbim.core.tool.Sequence):
|
||||
task_bars = cls.get_task_bar_list()
|
||||
if task_id in task_bars:
|
||||
task_bars.remove(task_id)
|
||||
bpy.context.scene.BIMWorkScheduleProperties.task_bars = json.dumps(task_bars)
|
||||
bpy.context.scene.BIMWorkScheduleProperties.task_bars = json.dumps(task_bars)
|
||||
|
||||
@classmethod
|
||||
def get_animation_color_scheme(cls):
|
||||
if len(bpy.context.scene.BIMAnimationProperties.saved_color_schemes) > 0:
|
||||
return tool.Ifc.get().by_id(int(bpy.context.scene.BIMAnimationProperties.saved_color_schemes))
|
||||
|
||||
Reference in New Issue
Block a user