diff --git a/src/bonsai/docs/conf.py b/src/bonsai/docs/conf.py index 70d8872840..45f051fec5 100644 --- a/src/bonsai/docs/conf.py +++ b/src/bonsai/docs/conf.py @@ -36,7 +36,7 @@ import os # -- Project information ----------------------------------------------------- -project = "BlenderBIM Add-on" +project = "Bonsai" copyright = "2020-2024 IfcOpenShell Contributors" author = "IfcOpenShell Contributors" @@ -89,7 +89,7 @@ html_logo = "https://bonsaibim.org/assets/images/blender/blender-logo.png" html_theme_options = { "source_repository": "https://github.com/IfcOpenShell/IfcOpenShell/", "source_branch": "v0.8.0", - "source_directory": "src/blenderbim/docs/", + "source_directory": "src/bonsai/docs/", "light_css_variables": { "color-brand-primary": "#39b54a", "color-brand-content": "#39b54a", @@ -132,7 +132,7 @@ html_theme_options = { }, { "name": "GitHub", - "url": "https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.8.0/src/blenderbim/docs", + "url": "https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.8.0/src/bonsai/docs", "html": """ diff --git a/src/bonsai/scripts/generate_au_library.py b/src/bonsai/scripts/generate_au_library.py index 291be2ab5e..b350de2ff6 100644 --- a/src/bonsai/scripts/generate_au_library.py +++ b/src/bonsai/scripts/generate_au_library.py @@ -22,7 +22,7 @@ import bpy import ifcopenshell import ifcopenshell.api -import blenderbim.tool as tool +import bonsai.tool as tool class LibraryGenerator: @@ -183,7 +183,7 @@ class LibraryGenerator: self.create_type("IfcDoorType", "DEMO1", {"model_body": "Door", "plan_body": "Door-Annotation"}) self.create_type("IfcFurnitureType", "BUNNY", {"model_body": "Bunny", "plan_body": "Bunny-Annotation"}) - self.file.write("blenderbim-au-library.ifc") + self.file.write("bonsai-au-library.ifc") def create_layer_set_type(self, name, data): element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class=data["type"], name=name) diff --git a/src/bonsai/scripts/generate_demo_library.py b/src/bonsai/scripts/generate_demo_library.py index 749daf2140..2265785c65 100644 --- a/src/bonsai/scripts/generate_demo_library.py +++ b/src/bonsai/scripts/generate_demo_library.py @@ -19,7 +19,7 @@ import bpy import ifcopenshell import ifcopenshell.api -import blenderbim.tool as tool +import bonsai.tool as tool class LibraryGenerator: @@ -28,11 +28,9 @@ class LibraryGenerator: ifcopenshell.api.post_listeners = {} self.file = ifcopenshell.api.run("project.create_file") - self.project = ifcopenshell.api.run( - "root.create_entity", self.file, ifc_class="IfcProject", name="BlenderBIM Demo" - ) + self.project = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject", name="Bonsai Demo") self.library = ifcopenshell.api.run( - "root.create_entity", self.file, ifc_class="IfcProjectLibrary", name="BlenderBIM Demo Library" + "root.create_entity", self.file, ifc_class="IfcProjectLibrary", name="Bonsai Demo Library" ) ifcopenshell.api.run( "project.assign_declaration", self.file, definitions=[self.library], relating_context=self.project diff --git a/src/bonsai/scripts/generate_entourage_library.py b/src/bonsai/scripts/generate_entourage_library.py index d5766aee38..e11930faca 100644 --- a/src/bonsai/scripts/generate_entourage_library.py +++ b/src/bonsai/scripts/generate_entourage_library.py @@ -20,13 +20,13 @@ import os import bpy import ifcopenshell import ifcopenshell.api -import blenderbim.tool as tool +import bonsai.tool as tool from pathlib import Path # When run from Blender BLEND_DIR = os.path.dirname(bpy.data.filepath) -OUT_PATH = os.path.join(BLEND_DIR, "..", "blenderbim", "bim", "data", "libraries", "IFC4 Entourage Library.ifc") +OUT_PATH = os.path.join(BLEND_DIR, "..", "bonsai", "bim", "data", "libraries", "IFC4 Entourage Library.ifc") class LibraryGenerator: diff --git a/src/bonsai/scripts/generate_furniture_library.py b/src/bonsai/scripts/generate_furniture_library.py index 0a6168cbf8..0ca842cb88 100644 --- a/src/bonsai/scripts/generate_furniture_library.py +++ b/src/bonsai/scripts/generate_furniture_library.py @@ -1929,7 +1929,7 @@ class LibraryGenerator: if __name__ == "__main__": - path = Path(__file__).parents[1] / "blenderbim/bim/data/libraries" + path = Path(__file__).parents[1] / "bonsai/bim/data/libraries" LibraryGenerator().generate( "Non-structural assets library", output_filename=str(path / "IFC4 Furniture Library.ifc") ) diff --git a/src/bonsai/scripts/generate_landscape_library.py b/src/bonsai/scripts/generate_landscape_library.py index 262ee65ec4..665e0fc13e 100644 --- a/src/bonsai/scripts/generate_landscape_library.py +++ b/src/bonsai/scripts/generate_landscape_library.py @@ -22,7 +22,7 @@ import csv import random import ifcopenshell import ifcopenshell.api -import blenderbim.tool as tool +import bonsai.tool as tool from math import cos, sin, tan, pi from pathlib import Path from itertools import chain @@ -34,7 +34,7 @@ from random import uniform # When run from Blender BLEND_DIR = os.path.dirname(bpy.data.filepath) -OUT_PATH = os.path.join(BLEND_DIR, "..", "blenderbim", "bim", "data", "libraries", "IFC4 Landscape Library.ifc") +OUT_PATH = os.path.join(BLEND_DIR, "..", "bonsai", "bim", "data", "libraries", "IFC4 Landscape Library.ifc") SimpleTreeParams = namedtuple("SimpleTreeParams", "plant_height crown_diameter trunk_diameter") LowPolyTreeParams = namedtuple( diff --git a/src/bonsai/scripts/generate_site_library.py b/src/bonsai/scripts/generate_site_library.py index cd845d08c5..7008bcf43a 100644 --- a/src/bonsai/scripts/generate_site_library.py +++ b/src/bonsai/scripts/generate_site_library.py @@ -19,7 +19,7 @@ import bpy import ifcopenshell import ifcopenshell.api -import blenderbim.tool as tool +import bonsai.tool as tool class LibraryGenerator: @@ -28,11 +28,9 @@ class LibraryGenerator: ifcopenshell.api.post_listeners = {} self.file = ifcopenshell.api.run("project.create_file") - self.project = ifcopenshell.api.run( - "root.create_entity", self.file, ifc_class="IfcProject", name="BlenderBIM Demo" - ) + self.project = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject", name="Bonsai Demo") self.library = ifcopenshell.api.run( - "root.create_entity", self.file, ifc_class="IfcProjectLibrary", name="BlenderBIM Demo Library" + "root.create_entity", self.file, ifc_class="IfcProjectLibrary", name="Bonsai Demo Library" ) ifcopenshell.api.run( "project.assign_declaration", self.file, definitions=[self.library], relating_context=self.library @@ -66,7 +64,7 @@ class LibraryGenerator: {"body": "Mobile Crane 50T", "clearance": "Mobile Crane 50T - Clearance"}, ) - self.file.write("blenderbim-site-library.ifc") + self.file.write("bonsai-site-library.ifc") def create_type(self, ifc_class, name, representations): element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class=ifc_class, name=name) diff --git a/src/bonsai/scripts/generate_steel_profiles_library.py b/src/bonsai/scripts/generate_steel_profiles_library.py index 6ad0b1352c..1156a56e43 100644 --- a/src/bonsai/scripts/generate_steel_profiles_library.py +++ b/src/bonsai/scripts/generate_steel_profiles_library.py @@ -229,7 +229,7 @@ class LibraryGenerator: if __name__ == "__main__": - path = Path(__file__).parents[1] / "blenderbim/bim/data/libraries" + path = Path(__file__).parents[1] / "bonsai/bim/data/libraries" LibraryGenerator().generate(parse_profiles_type="EU", output_filename=str(path / "IFC4 EU Steel.ifc")) LibraryGenerator().generate(parse_profiles_type="AU", output_filename=str(path / "IFC4 AU Steel.ifc")) LibraryGenerator().generate(parse_profiles_type="US", output_filename=str(path / "IFC4 US Steel.ifc")) diff --git a/src/bonsai/scripts/geonodes_modifier_prototype.py b/src/bonsai/scripts/geonodes_modifier_prototype.py index 2b288dcb09..8b2fa77f73 100644 --- a/src/bonsai/scripts/geonodes_modifier_prototype.py +++ b/src/bonsai/scripts/geonodes_modifier_prototype.py @@ -18,7 +18,7 @@ import ifcopenshell -import blenderbim.tool as tool +import bonsai.tool as tool import bpy import bmesh diff --git a/src/bonsai/scripts/get_description.py b/src/bonsai/scripts/get_description.py index cd8c8ef3a6..2d581185aa 100644 --- a/src/bonsai/scripts/get_description.py +++ b/src/bonsai/scripts/get_description.py @@ -55,7 +55,7 @@ class Describer: f.write(json.dumps(self.enum_descriptions, indent=4)) def get_html_sources(self): - html_dir = "/home/dion/Projects/IfcOpenShell/src/blenderbim/descriptions/IFC4_3/RC1/HTML" + html_dir = "/home/dion/Projects/IfcOpenShell/src/bonsai/descriptions/IFC4_3/RC1/HTML" for filename in Path(html_dir).rglob("*.htm"): if "lexical" not in str(filename): continue diff --git a/src/bonsai/scripts/headless_import.py b/src/bonsai/scripts/headless_import.py index 441d322b4d..cda13e3878 100644 --- a/src/bonsai/scripts/headless_import.py +++ b/src/bonsai/scripts/headless_import.py @@ -1,7 +1,7 @@ # This can be run using `blender -b -P headless_import.py` import bpy -from blenderbim.bim.ifc import IfcStore +from bonsai.bim.ifc import IfcStore # When federating, you may wish to manually specify the origin to ensure models # with different or arbitrary origin conventions will turn up in the right spot. diff --git a/src/bonsai/scripts/replace_drawing_path.py b/src/bonsai/scripts/replace_drawing_path.py index 11870c4513..97f00c8986 100644 --- a/src/bonsai/scripts/replace_drawing_path.py +++ b/src/bonsai/scripts/replace_drawing_path.py @@ -20,14 +20,14 @@ It is useful when an annotation drawing has been created on windows and you want to recreate the drawig in linux. -In this case, blenderbim would tell you that can't load "stylesheet" or "markers" or "symbols" or "patterns" folder. +In this case, bonsai would tell you that can't load "stylesheet" or "markers" or "symbols" or "patterns" folder. If this happens, this script comes in rescue! Basically, as the path is stored in a string, the script replaces the existing sep char with the right one. It works on the active ifc file (if exists). """ -import blenderbim.tool as tool +import bonsai.tool as tool import ifcopenshell import sys