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:
Diffstat (limited to 'ant_landscape/__init__.py')
-rw-r--r--ant_landscape/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ant_landscape/__init__.py b/ant_landscape/__init__.py
index 4b389184..9d5c6e21 100644
--- a/ant_landscape/__init__.py
+++ b/ant_landscape/__init__.py
@@ -127,8 +127,8 @@ class AntMainSettingsPanel(bpy.types.Panel):
@classmethod
def poll(cls, context):
- ob = bpy.context.active_object.ant_landscape.keys()
- return ob
+ ob = bpy.context.active_object
+ return ob.ant_landscape.keys() if ob else False
def draw(self, context):
layout = self.layout
@@ -174,8 +174,8 @@ class AntNoiseSettingsPanel(bpy.types.Panel):
@classmethod
def poll(cls, context):
- ob = bpy.context.active_object.ant_landscape.keys()
- return ob
+ ob = bpy.context.active_object
+ return ob.ant_landscape.keys() if ob else False
def draw(self, context):
layout = self.layout
@@ -342,8 +342,8 @@ class AntDisplaceSettingsPanel(bpy.types.Panel):
@classmethod
def poll(cls, context):
- ob = bpy.context.active_object.ant_landscape.keys()
- return ob
+ ob = bpy.context.active_object
+ return ob.ant_landscape.keys() if ob else False
def draw(self, context):
layout = self.layout