Reformat commenting, remove prints, and remove BrickStore.project

This commit is contained in:
Trashman247
2023-06-26 16:01:26 -07:00
parent bcd7c79004
commit 64d1fb4ee7
+4 -7
View File
@@ -319,24 +319,21 @@ class Brick(blenderbim.core.tool.Brick):
@classmethod @classmethod
def serialize_brick(cls, file_name): def serialize_brick(cls, file_name):
#temporary file path, could either be user selected for "save as" or use the BrickStore.path for simply "save" #temporary file path, could either be user selected for "save as" or use the BrickStore.path for simply "save"
print("Serializing: \"" + file_name + "\" ... ")
cwd = os.path.dirname(os.path.realpath(__file__)) cwd = os.path.dirname(os.path.realpath(__file__))
dest = os.path.join(cwd, "..", "bim", "schema", file_name) dest = os.path.join(cwd, "..", "bim", "schema", file_name)
BrickStore.get_project().serialize(destination=dest, format="turtle") BrickStore.get_project().serialize(destination=dest, format="turtle")
print("finished!")
class BrickStore: class BrickStore:
schema = None # this is now a os path schema = None # this is now a os path
graph = None # this is the VersionedGraphCollection with 2 arbitrarily named graphs: "schema" and "project" path = None # file path if the project was loaded in
# "schema" holds the Brick.ttl metadata; "project" holds all the authored entities graph = None # this is the VersionedGraphCollection with 2 arbitrarily named graphs: "schema" and "project"
project = None # this is the graph named "project" from the VersionedGraphCollection # "SCHEMA" holds the Brick.ttl metadata; "PROJECT" holds all the authored entities
path = None
@staticmethod @staticmethod
def purge(): def purge():
BrickStore.schema = None BrickStore.schema = None
BrickStore.graph = None BrickStore.graph = None
BrickStore.project = None
BrickStore.path = None BrickStore.path = None
@classmethod @classmethod