mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
See #1848. Refactor resource data class.
This commit is contained in:
@@ -19,7 +19,6 @@
|
|||||||
import bpy
|
import bpy
|
||||||
import ifcopenshell.api
|
import ifcopenshell.api
|
||||||
from blenderbim.bim.ifc import IfcStore
|
from blenderbim.bim.ifc import IfcStore
|
||||||
from ifcopenshell.api.resource.data import Data
|
|
||||||
import blenderbim.bim.module.pset.data
|
import blenderbim.bim.module.pset.data
|
||||||
from blenderbim.bim.prop import StrProperty, Attribute
|
from blenderbim.bim.prop import StrProperty, Attribute
|
||||||
from bpy.types import PropertyGroup
|
from bpy.types import PropertyGroup
|
||||||
@@ -53,7 +52,6 @@ def updateResourceName(self, context):
|
|||||||
self.file,
|
self.file,
|
||||||
**{"resource": self.file.by_id(self.ifc_definition_id), "attributes": {"Name": self.name}},
|
**{"resource": self.file.by_id(self.ifc_definition_id), "attributes": {"Name": self.name}},
|
||||||
)
|
)
|
||||||
Data.load(IfcStore.get_file())
|
|
||||||
if props.active_resource_id == self.ifc_definition_id:
|
if props.active_resource_id == self.ifc_definition_id:
|
||||||
attribute = props.resource_attributes.get("Name")
|
attribute = props.resource_attributes.get("Name")
|
||||||
attribute.string_value = self.name
|
attribute.string_value = self.name
|
||||||
|
|||||||
Reference in New Issue
Block a user