Add materials attribute
This commit is contained in:
parent
d6677c7fdb
commit
7d19d8ab14
|
@ -21,10 +21,12 @@ class AccessNrcanCatalog:
|
|||
self, path,
|
||||
archetypes='nrcan_archetypes.json',
|
||||
constructions='nrcan_constructions_cap_3.json',
|
||||
materials='nrcan_materials_dictionaries.json',
|
||||
transparent_surfaces='nrcan_transparent_surfaces_dictionaries.json'):
|
||||
self._path = Path(path)
|
||||
self.archetypes = archetypes
|
||||
self.constructions = constructions
|
||||
self.materials = materials
|
||||
self.transparent_surfaces = transparent_surfaces
|
||||
self.hub_to_nrcan_dictionary = HubFunctionToNrcanConstructionFunction().dictionary
|
||||
|
||||
|
@ -46,6 +48,15 @@ class AccessNrcanCatalog:
|
|||
constructions_path = (self._path / constructions).resolve()
|
||||
self._constructions = json.loads(constructions_path.read_text())
|
||||
|
||||
@property
|
||||
def materials(self):
|
||||
return self._materials
|
||||
|
||||
@materials.setter
|
||||
def materials(self, materials):
|
||||
materials_path = (self._path / materials).resolve()
|
||||
self._materials = json.loads(materials_path.read_text())
|
||||
|
||||
@property
|
||||
def transparent_surfaces(self):
|
||||
return self._transparent_surfaces
|
||||
|
|
Loading…
Reference in New Issue
Block a user