Skip to content

Commit f82c669

Browse files
committed
add encoding to group
1 parent 60f5f91 commit f82c669

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
* Changed `SceneObject.worldtransformation` to the multiplication of all transformations from the scene object to the root of the scene tree, there will no longer be an additional transformation in relation to the object's frame.
2121
* Fixed call to `astar_shortest_path` in `Graph.shortest_path`.
2222
* Fixed a bug when printing an empty `Tree`.
23+
* Fixed a bug in `Group` for IronPython where the decoding declaration was missing.
24+
* Fixed a bug where a `Group` without name could not be added to the scene.
2325

2426
### Removed
2527

src/compas/scene/group.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from .sceneobject import SceneObject
23

34

src/compas/scene/sceneobject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(
104104
if item and not isinstance(item, Data):
105105
raise ValueError("The item assigned to this scene object should be a data object: {}".format(type(item)))
106106

107-
name = name or item.name
107+
name = name or getattr(item, "name", None)
108108
super(SceneObject, self).__init__(name=name, **kwargs)
109109
# the scene object needs to store the context
110110
# because it has no access to the tree and/or the scene before it is added

0 commit comments

Comments
 (0)