Fix #37338: Add objects from addon work in a Linked Scene
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Nov 2013 08:40:47 +0000 (08:40 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Nov 2013 08:40:47 +0000 (08:40 +0000)
Added a poll function to add object helper which checks
whether scene is linked or not.

All the primitives which are delivered from this helper
will work properly for linked scenes. If there're still
primitives which are not delivered from this class, well
nothing i can do now.

release/scripts/modules/bpy_extras/object_utils.py

index 7ce5aff581aa8ac730b5dd11ccfb947f9bfe7fca..a14f0128444483750d3ead189af888a339c51cf8 100644 (file)
@@ -201,6 +201,10 @@ class AddObjectHelper:
             subtype='EULER',
             )
 
+    @classmethod
+    def poll(self, context):
+        return context.scene.library is None
+
 
 def object_add_grid_scale(context):
     """