This commit is contained in:
Andrej730
2025-03-31 12:05:10 +05:00
parent 42c49af4e3
commit cba6161043
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -18,6 +18,7 @@
# ############################################################################ #
from __future__ import annotations
import bpy
import bonsai.core.tool
import bonsai.tool as tool
@@ -30,10 +31,17 @@ import ifcopenshell.util.date as ifcdateutils
import ifcopenshell.util.cost
import ifcopenshell.util.resource
import ifcopenshell.util.constraint
from typing import Any, Union
from typing import Any, Union, TYPE_CHECKING
if TYPE_CHECKING:
from bonsai.bim.module.resource.prop import BIMResourceProperties
class Resource(bonsai.core.tool.Resource):
@classmethod
def get_resource_props(cls) -> BIMResourceProperties:
return bpy.context.scene.BIMResourceProperties
@classmethod
def load_resources(cls) -> None:
def create_new_resource_li(resource, level_index):
+1 -1
View File
@@ -450,7 +450,7 @@ class Sequence(bonsai.core.tool.Sequence):
@classmethod
def load_task_resources(cls, task: ifcopenshell.entity_instance) -> None:
props = cls.get_work_schedule_props()
rprops = cls.get_resource_props()
rprops = tool.Resource.get_resource_props()
props.task_resources.clear()
rprops.is_resource_update_enabled = False
for resource in cls.get_task_resources(task) or []: