From fbda0110cd53201bd4e57e605c055c53bf6c6cca Mon Sep 17 00:00:00 2001 From: JR-Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Tue, 11 Oct 2022 18:43:36 +0100 Subject: [PATCH] fix(connector): 2.9.0 update --- bpy_speckle/operators/streams.py | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bpy_speckle/operators/streams.py b/bpy_speckle/operators/streams.py index 7290ff7..e8e17a5 100644 --- a/bpy_speckle/operators/streams.py +++ b/bpy_speckle/operators/streams.py @@ -392,8 +392,8 @@ def execute(self, context): name = "{} [ {} @ {} ]".format(stream.name, branch.name, commit.id) col = create_collection(name) col.speckle.stream_id = stream.id - col.speckle.name = stream.name - col.speckle.units = stream_data.units + col.speckle.units = stream_data.units or "m" + if col.name not in bpy.context.scene.collection.children: bpy.context.scene.collection.children.link(col) @@ -406,7 +406,7 @@ def execute(self, context): Set conversion scale from stream units """ scale = ( - get_scale_length(stream_data.units) + get_scale_length(col.speckle.units) / context.scene.unit_settings.scale_length ) diff --git a/pyproject.toml b/pyproject.toml index 426be49..92fe562 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" [tool.poetry.dependencies] python = ">=3.8, <4.0.0" -specklepy = "^2.8.0" +specklepy = "^2.9.0" [tool.poetry.dev-dependencies] devtools = "^0.6.1"