Skip to content

Commit 64818ef

Browse files
committed
Merge branch 'main' into occ-nurbs
2 parents aa39cd2 + 758b5c3 commit 64818ef

File tree

11 files changed

+30
-13
lines changed

11 files changed

+30
-13
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.9.1
2+
current_version = 1.9.2
33
message = Bump version to {new_version}
44
commit = True
55
tag = True

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
### Changed
13+
14+
### Removed
15+
16+
17+
## [1.9.2] 2021-11-02
18+
19+
### Added
20+
1221
* Added `draw_mesh` method to `compas_ghpython.artists.MeshArtist` to match all other mesh artists.
1322

1423
### Changed
1524

1625
* Changed new artist registration to check if subclass.
26+
* Fixed `RobotModelArtist` for blender: missing abstract method impl and handle init order.
1727

1828
### Removed
1929

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def patched_m2r2_setup(app):
3838
copyright = "Block Research Group - ETH Zurich"
3939
author = "Tom Van Mele"
4040

41-
release = "1.9.1"
41+
release = "1.9.2"
4242
version = ".".join(release.split(".")[0:2])
4343

4444
master_doc = "index"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def read(*names, **kwargs):
2525

2626
setup(
2727
name='COMPAS',
28-
version='1.9.1',
28+
version='1.9.2',
2929
description='The COMPAS framework',
3030
long_description=long_description,
3131
long_description_content_type='text/markdown',

src/compas/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
__license__ = 'MIT License'
9292
__email__ = '[email protected]'
9393

94-
__version__ = '1.9.1'
94+
__version__ = '1.9.2'
9595

9696
version = LooseVersion(compas.__version__)
9797
versionstring = version.vstring.split('-')[0]

src/compas_blender/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def redraw():
5050
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
5151

5252

53-
__version__ = '1.9.1'
53+
__version__ = '1.9.2'
5454

5555

5656
def _check_blender_version(version):

src/compas_blender/artists/artist.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ class BlenderArtist(Artist):
2121
def __init__(self,
2222
collection: Optional[Union[str, bpy.types.Collection]] = None,
2323
**kwargs: Any):
24-
25-
super().__init__(**kwargs)
26-
24+
# Initialize collection before even calling super because other classes depend on that
2725
self._collection = None
2826
self.collection = collection
27+
super().__init__(**kwargs)
2928

3029
@property
3130
def collection(self) -> bpy.types.Collection:

src/compas_blender/artists/robotmodelartist.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,28 @@ def create_geometry(self,
6060
def redraw(self, timeout: float = 0.0) -> None:
6161
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1, time_limit=timeout)
6262

63-
def clear(self) -> None:
64-
compas_blender.delete_objects(self.collection.objects)
63+
def _ensure_geometry(self):
64+
if len(self.collection.objects) == 0:
65+
self.create()
66+
67+
def draw(self) -> None:
68+
self._ensure_geometry()
69+
self.draw_visual()
6570

6671
def draw_visual(self) -> None:
72+
self._ensure_geometry()
6773
visuals = super(RobotModelArtist, self).draw_visual()
6874
for visual in visuals:
6975
visual.hide_set(False)
7076

7177
def draw_collision(self) -> None:
78+
self._ensure_geometry()
7279
collisions = super(RobotModelArtist, self).draw_collision()
7380
for collision in collisions:
7481
collision.hide_set(False)
7582

7683
def draw_attached_meshes(self) -> None:
84+
self._ensure_geometry()
7785
meshes = super(RobotModelArtist, self).draw_attached_meshes()
7886
for mesh in meshes:
7987
mesh.hide_set(False)

src/compas_ghpython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from .utilities import * # noqa: F401 F403
2323

2424

25-
__version__ = '1.9.1'
25+
__version__ = '1.9.2'
2626

2727

2828
def get_grasshopper_plugin_path(version):

src/compas_plotters/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
"""
2020

21-
__version__ = '1.9.1'
21+
__version__ = '1.9.2'
2222

2323
from .core import * # noqa: F401 F403
2424
# from .artists import * # noqa: F401 F403

0 commit comments

Comments
 (0)