Skip to content

Conversation

@justinbeetle
Copy link
Contributor

…o a boolean in TileImageLayer.

pytmx/pytmx.py Outdated
:return: self
"""
self._set_properties(node)
self.name = node.get('name', None)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These attributes get set in the self._set_properties(node) call. That method, in TiledElement, correctly casts the values for these types in the _cast_and_set_attributes_from_node_items method.

return subnodes

for subnode in find_all_visible_nodes(node, 'layer'):
self.add_layer(TiledTileLayer(self, subnode))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only adds visible layers while previously non-visible layers were also added. If there is utility in also adding the non-visible layers, it has been lost. It could be restored with additional changes.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be ignoring invisible layers. For instance, a map may have a shape layer for boundaries that might be invisible on tiled, but we still want it loaded to get the shapes.

@bitcraft
Copy link
Owner

bitcraft commented Feb 5, 2021 via email

…nd_all_visible_nodes in TiledMap.parse_xml to avoid rendering layers nested inside of invisible groups.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants