Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

280: Particle System is broken because of AttributeError #511

Closed
tngreene opened this issue Dec 21, 2019 · 0 comments
Closed

280: Particle System is broken because of AttributeError #511

tngreene opened this issue Dec 21, 2019 · 0 comments

Comments

@tngreene
Copy link
Contributor

tngreene commented Dec 21, 2019

This is really silly.

objs = self.xplaneFile.objects

                if not list(filter(lambda obj: obj[1].type == "EMPTY" and\
                        obj[1].blenderObject.xplane.special_empty_props.special_type == EMPTY_USAGE_EMITTER_PARTICLE or\
                        obj[1].blenderObject.xplane.special_empty_props.special_type == EMPTY_USAGE_EMITTER_SOUND,\
                        objs.items())):

when we changed from xplaneFile.objects to xplaneFile.get_xplane_objects we started returning a list instead of a dict. Here's the fix.

                objs = self.xplaneFile.get_xplane_objects()

                if not list(filter(lambda obj: obj.type == "EMPTY" and\
                        obj.blenderObject.xplane.special_empty_props.special_type == EMPTY_USAGE_EMITTER_PARTICLE or\
                        obj.blenderObject.xplane.special_empty_props.special_type == EMPTY_USAGE_EMITTER_SOUND,\
                        objs)):

This would have been very easily caught by fixing the unit test for this. #493 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant