Skip to content
Snippets Groups Projects
Commit 2580c2b6 authored by Jason van Gumster's avatar Jason van Gumster
Browse files

Fix for corner case where there are no objects in the scene.

parent 156bcb9e
Branches
Tags
No related merge requests found
...@@ -74,7 +74,7 @@ class EditLinked(bpy.types.Operator): ...@@ -74,7 +74,7 @@ class EditLinked(bpy.types.Operator):
@classmethod @classmethod
def poll(cls, context): 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 and
context.active_object.dupli_group.library is not None) or context.active_object.dupli_group.library is not None) or
context.active_object.library is not None) context.active_object.library is not None)
...@@ -155,6 +155,10 @@ class PanelLinkedEdit(bpy.types.Panel): ...@@ -155,6 +155,10 @@ class PanelLinkedEdit(bpy.types.Panel):
bl_space_type = "VIEW_3D" bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS" bl_region_type = "TOOLS"
@classmethod
def poll(cls, context):
return (context.active_object is not None) or (settings["original_file"] != "")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
scene = context.scene scene = context.scene
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment