Fix export pc2 poll function

Assumed active object
This commit is contained in:
Campbell Barton
2017-03-29 14:57:24 +11:00
parent 5a2c3d67f7
commit fba8c3db99

View File

@ -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()