Skip to content

Commit c0048d4

Browse files
committed
Fix robot model artist for Blender
1 parent 5e087af commit c0048d4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Changed
1313

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

1617
### Removed
1718

src/compas_blender/artists/artist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ 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)
28+
2929

3030
@property
3131
def collection(self) -> bpy.types.Collection:

src/compas_blender/artists/robotmodelartist.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def redraw(self, timeout: float = 0.0) -> None:
6363
def clear(self) -> None:
6464
compas_blender.delete_objects(self.collection.objects)
6565

66+
def draw(self) -> None:
67+
self.draw_visual()
68+
6669
def draw_visual(self) -> None:
6770
visuals = super(RobotModelArtist, self).draw_visual()
6871
for visual in visuals:

0 commit comments

Comments
 (0)