Skip to content

Commit

Permalink
Filter out colon in node path, which is also invalid in latest Godot. (
Browse files Browse the repository at this point in the history
…godotengine#383)

Also rewrite node name filtering using filter() to be concise.
  • Loading branch information
Jason0214 committed Nov 26, 2020
1 parent a353957 commit 1c6a3b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion io_scene_godot/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def __init__(self, name, node_type, parent_node):
self.parent = parent_node

# filter out special character
node_name = name.replace('.', '').replace('/', '').replace('\\', '')
invalid_chs = ('.', '\\', '/', ':')
node_name = ''.join(filter(lambda ch: ch not in invalid_chs, name))

if parent_node is not None:
# solve duplication
Expand Down

0 comments on commit 1c6a3b8

Please sign in to comment.