diff options
author | Bastien Montagne <bastien@blender.org> | 2021-05-27 18:26:34 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-05-27 18:26:34 +0300 |
commit | 73c752effe0d3ac18d50ec39a1431b5cb24cd5c2 (patch) | |
tree | 06761f2667d2f875d10ed0fff1af1bc7c20a2bda /render_povray/texturing_gui.py | |
parent | ea587cffd123977f5b94ed9cea9e81282b6c9b71 (diff) |
Povray: Fix bunch of issues after recent refactor.
Those were breaking automated tests, since (un)registering was not
working properly. Mainly:
* Use `hasattr` instead of try/except when batch-assigning to a variable
that does not always exist.
* Fix some incorrect call to sub-`register()` from parent `unregister()`
functions.
* Remove double definition (in two different files) of World's pov
textures.
Diffstat (limited to 'render_povray/texturing_gui.py')
-rwxr-xr-x | render_povray/texturing_gui.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/render_povray/texturing_gui.py b/render_povray/texturing_gui.py index 6d12fb62..ad889f43 100755 --- a/render_povray/texturing_gui.py +++ b/render_povray/texturing_gui.py @@ -49,12 +49,8 @@ from bl_ui import properties_texture for member in dir(properties_texture): subclass = getattr(properties_texture, member) - try: + if hasattr(subclass, "COMPAT_ENGINES"): subclass.COMPAT_ENGINES.add('POVRAY_RENDER') - except BaseException as e: - print(e.__doc__) - print('An exception occurred: {}'.format(e)) - pass del properties_texture |