Fix own mistake in recent rB74361eebe68c.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 5 Dec 2018 19:52:47 +0000 (20:52 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 5 Dec 2018 19:54:02 +0000 (20:54 +0100)
One cannot assign to Class.__dict__, that is not a 'real' dictionnary...

Thanks to @JacquesLucke for noting the issue.

release/scripts/modules/bpy_extras/io_utils.py

index 420c2bfc9298c4d3fb1ec3067930bb5a2195599e..d7cca7cc8965918b31b140ca41b1716fdf804b55 100644 (file)
@@ -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]: