Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason van Gumster <jason@handturkeystudios.com>2013-07-02 01:00:28 +0400
committerJason van Gumster <jason@handturkeystudios.com>2013-07-02 01:00:28 +0400
commit2580c2b6fa0ce8c711f4b13f6ffc07ec862dcf2f (patch)
tree3a87ab6df23c8794748cfbfb8246b3bfa5ab116a /object_edit_linked.py
parent156bcb9e28d1f0d79ad9eb23ff7b6c31db479b17 (diff)
Fix for corner case where there are no objects in the scene.
Diffstat (limited to 'object_edit_linked.py')
-rw-r--r--object_edit_linked.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/object_edit_linked.py b/object_edit_linked.py
index cacac612..3fb66beb 100644
--- a/object_edit_linked.py
+++ b/object_edit_linked.py
@@ -74,7 +74,7 @@ class EditLinked(bpy.types.Operator):
@classmethod
def poll(cls, context):
- return settings["original_file"] == "" and (
+ return settings["original_file"] == "" and context.active_object is not None and (
(context.active_object.dupli_group and
context.active_object.dupli_group.library is not None) or
context.active_object.library is not None)
@@ -155,6 +155,10 @@ class PanelLinkedEdit(bpy.types.Panel):
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
+ @classmethod
+ def poll(cls, context):
+ return (context.active_object is not None) or (settings["original_file"] != "")
+
def draw(self, context):
layout = self.layout
scene = context.scene