Skip to content

switch to getattr() for annotations#34

Open
fclivaz42 wants to merge 1 commit into
h4lfheart:mainfrom
fclivaz42:main
Open

switch to getattr() for annotations#34
fclivaz42 wants to merge 1 commit into
h4lfheart:mainfrom
fclivaz42:main

Conversation

@fclivaz42
Copy link
Copy Markdown

Fixes a crash in newer python/blender versions while being retro-compatible.
Fixes the bug causing

Python: Traceback (most recent call last):
File "..../io_scene_ueformat/op/import_helpers.py", line 27, in execute
options = self.options_class.from_settings(context.scene.uf_settings)
File "..../io_scene_ueformat/options.py", line 21, in from_settings
k: v for k, v in settings.get_props().items()
~~~~~~~~~~~~~~~~~~^^
File "..../io_scene_ueformat/op/settings.py", line 23, in get_props
for key in self.__annotations__.keys():
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'UFSettings' object has no attribute '__annotations__'. Did you mean: '__annotate_func__'?

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.

1 participant