blob: 01a65abdfd002c4f1637d189ab35b2594b8d37b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
from .base_exporter import BasePrimitiveDXFExporter
class LampDXFExporter(BasePrimitiveDXFExporter):
pass
#-----------------------------------------------------
def exportLamp(ob, mx, mw, **common):
"""converts Lamp-Object to desired projection and representation(DXF-Entity type)
"""
p = mathutils.Vector(ob.loc)
[p] = projected_co([p], mx)
[p] = toGlobalOrigin([p])
entities = []
c = lamp_as_list[GUI_A['lamp_as'].val]
if c=="POINT": # export as POINT
dxfPOINT = DXF.Point(points=[p],**common)
entities.append(dxfPOINT)
return entities
|