Fixed issue where the visible attribute was not correctly converted t…
…o a boolean in TileImageLayer.
Thanks been busy but I will take a look
On Fri, Feb 5, 2021 at 2:10 PM justinbeetle [email protected] wrote:
@justinbeetle commented on this pull request.
In pytmx/pytmx.py https://github.com/bitcraft/pytmx/pull/133#discussion_r571222371:
:param node: ElementTree xml node:param node_type: Tag name of elements to find:return: Python list of ElementTree xml nodes"""subnodes = []for subnode in node:if 'visible' in subnode.attrib and not convert_to_bool(subnode.attrib['visible']):continueif subnode.tag == node_type:subnodes.append(subnode)elif subnode.tag == 'group':subnodes += find_all_visible_nodes(subnode, node_type)return subnodesfor subnode in find_all_visible_nodes(node, 'layer'): self.add_layer(TiledTileLayer(self, subnode))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.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitcraft/pytmx/pull/133#pullrequestreview-584670899, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEH5JYPBAG2BTWWKT4KXLLS5RGCZANCNFSM4VTLCVBA .