mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
bonsai other ifcopenshell packages #5178
This commit is contained in:
@@ -68,7 +68,7 @@ def ensure_addons_are_enabled(*addon_names: str) -> None:
|
||||
raise Exception("Some issues were found trying to enable IFC Sverchok:\n" + "\n".join(errors))
|
||||
|
||||
|
||||
ensure_addons_are_enabled("blenderbim", "sverchok")
|
||||
ensure_addons_are_enabled("bonsai", "sverchok")
|
||||
|
||||
|
||||
from sverchok.ui.nodeview_space_menu import add_node_menu
|
||||
|
||||
@@ -24,8 +24,8 @@ import ifcopenshell
|
||||
import ifcsverchok.helper
|
||||
import ifcopenshell.api
|
||||
from ifcsverchok.ifcstore import SvIfcStore
|
||||
import blenderbim.tool as tool
|
||||
import blenderbim.core.geometry as core
|
||||
import bonsai.tool as tool
|
||||
import bonsai.core.geometry as core
|
||||
from bpy.props import (
|
||||
StringProperty,
|
||||
EnumProperty,
|
||||
@@ -35,7 +35,7 @@ from bpy.props import (
|
||||
)
|
||||
from sverchok.node_tree import SverchCustomTreeNode
|
||||
from sverchok.data_structure import updateNode, flatten_data, fixed_iter, flat_iter
|
||||
from blenderbim.bim.module.root.prop import get_contexts
|
||||
from bonsai.bim.module.root.prop import get_contexts
|
||||
from sverchok.data_structure import zip_long_repeat, node_id
|
||||
from sverchok.core.socket_data import sv_get_socket
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import logging
|
||||
import ifcopenshell
|
||||
import ifcsverchok.helper
|
||||
from ifcsverchok.ifcstore import SvIfcStore
|
||||
import blenderbim.bim.import_ifc
|
||||
import bonsai.bim.import_ifc
|
||||
from bpy.props import StringProperty, PointerProperty, BoolProperty
|
||||
from sverchok.node_tree import SverchCustomTreeNode
|
||||
from sverchok.data_structure import updateNode, flatten_data
|
||||
@@ -84,10 +84,10 @@ class SvIfcCreateShape(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.
|
||||
if not entity.is_a("IfcProduct"):
|
||||
return
|
||||
logger = logging.getLogger("ImportIFC")
|
||||
self.ifc_import_settings = blenderbim.bim.import_ifc.IfcImportSettings.factory(bpy.context, "", logger)
|
||||
self.ifc_import_settings = bonsai.bim.import_ifc.IfcImportSettings.factory(bpy.context, "", logger)
|
||||
settings = ifcopenshell.geom.settings()
|
||||
shape = ifcopenshell.geom.create_shape(settings, entity)
|
||||
ifc_importer = blenderbim.bim.import_ifc.IfcImporter(self.ifc_import_settings)
|
||||
ifc_importer = bonsai.bim.import_ifc.IfcImporter(self.ifc_import_settings)
|
||||
ifc_importer.file = self.file
|
||||
mesh = ifc_importer.create_mesh(entity, shape)
|
||||
obj = bpy.data.objects.new("IFC Element", mesh)
|
||||
|
||||
@@ -23,7 +23,7 @@ import ifcsverchok.helper
|
||||
from bpy.props import StringProperty
|
||||
from sverchok.node_tree import SverchCustomTreeNode
|
||||
from sverchok.data_structure import updateNode
|
||||
from blenderbim.bim.ifc import IfcStore
|
||||
from bonsai.bim.ifc import IfcStore
|
||||
|
||||
|
||||
class SvIfcSelectBlenderObjectsRefresh(bpy.types.Operator):
|
||||
|
||||
@@ -23,8 +23,8 @@ import ifcsverchok.helper
|
||||
import ifcopenshell.api
|
||||
import ifcopenshell.util.representation
|
||||
from ifcsverchok.ifcstore import SvIfcStore
|
||||
import blenderbim.tool as tool
|
||||
import blenderbim.core.geometry as core
|
||||
import bonsai.tool as tool
|
||||
import bonsai.core.geometry as core
|
||||
from bpy.props import StringProperty, EnumProperty, IntProperty, FloatVectorProperty
|
||||
from sverchok.node_tree import SverchCustomTreeNode
|
||||
from sverchok.data_structure import updateNode, ensure_min_nesting
|
||||
|
||||
Reference in New Issue
Block a user