[Bf-blender-cvs] [5ad217fe0ac] blender2.8: Fix own mistake in recent rB74361eebe68c.

Bastien Montagne noreply at git.blender.org
Wed Dec 5 20:54:24 CET 2018


Commit: 5ad217fe0acc8433cd6dbdffd77f18626c90c69e
Author: Bastien Montagne
Date:   Wed Dec 5 20:52:47 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB5ad217fe0acc8433cd6dbdffd77f18626c90c69e

Fix own mistake in recent rB74361eebe68c.

One cannot assign to Class.__dict__, that is not a 'real' dictionnary...

Thanks to @JacquesLucke for noting the issue.

===================================================================

M	release/scripts/modules/bpy_extras/io_utils.py

===================================================================

diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 420c2bfc929..d7cca7cc896 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -130,7 +130,7 @@ def orientation_helper(axis_forward='Y', axis_up='Z'):
         # Without that, we may end up adding those fields to some **parent** class' __annotations__ property
         # (like the ImportHelper or ExportHelper ones)! See T58772.
         if "__annotations__" not in cls.__dict__:
-            cls.__dict__["__annotations__"] = {}
+            setattr(cls, "__annotations__", {})
 
         def _update_axis_forward(self, context):
             if self.axis_forward[-1] == self.axis_up[-1]:



More information about the Bf-blender-cvs mailing list