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:
authorCampbell Barton <ideasman42@gmail.com>2017-03-29 06:57:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-03-30 04:27:36 +0300
commitfba8c3db998fb8deb2e85037581b748ee895952c (patch)
tree479a8759bef2966ff39862ec2d487d958481cf26 /io_export_pc2.py
parent5a2c3d67f7f61caea570f139219ddb760da51325 (diff)
Fix export pc2 poll function
Assumed active object
Diffstat (limited to 'io_export_pc2.py')
-rw-r--r--io_export_pc2.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/io_export_pc2.py b/io_export_pc2.py
index e00ee46b..fdc72324 100644
--- a/io_export_pc2.py
+++ b/io_export_pc2.py
@@ -153,7 +153,11 @@ class Export_pc2(bpy.types.Operator, ExportHelper):
@classmethod
def poll(cls, context):
- return context.active_object.type in {'MESH', 'CURVE', 'SURFACE', 'FONT'}
+ obj = context.active_object
+ return (
+ obj is not None and
+ obj.type in {'MESH', 'CURVE', 'SURFACE', 'FONT'}
+ )
def execute(self, context):
start_time = time.time()