zeffii / mesh_tiny_cad

a tiny set of unmissable CAD functions ( VTX, XALL ...) for Blender

Home Page:http://zeffii.github.io/mesh_tiny_cad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poll not robust enough for F3 from nodeview.

zeffii opened this issue · comments

mesh_tiny_cad/BIX.py

Lines 87 to 90 in 5f9503f

@classmethod
def poll(cls, context):
obj = context.active_object
return all([obj is not None, obj.type == 'MESH', obj.mode == 'EDIT'])

error, though harmless

Traceback (most recent call last):
  File "C:\Users\zeffi\Desktop\test_blenders\current_28\2.82\scripts\addons\mesh_tiny_cad\BIX.py", line 90, in poll
    return all([obj is not None, obj.type == 'MESH', obj.mode == 'EDIT'])
AttributeError: 'NoneType' object has no attribute 'type'

location: <unknown location>:-1

there is a scenario where the scene has no Objects yet, so no object is active. .. or the object has no .type