1 # SPDX-License-Identifier: GPL-2.0-or-later
3 from .base_exporter
import BasePrimitiveDXFExporter
6 class LampDXFExporter(BasePrimitiveDXFExporter
):
9 #-----------------------------------------------------
10 def exportLamp(ob
, mx
, mw
, **common
):
11 """converts Lamp-Object to desired projection and representation(DXF-Entity type)
13 p
= mathutils
.Vector(ob
.loc
)
14 [p
] = projected_co([p
], mx
)
15 [p
] = toGlobalOrigin([p
])
18 c
= light_as_list
[GUI_A
['light_as'].val
]
19 if c
=="POINT": # export as POINT
20 dxfPOINT
= DXF
.Point(points
=[p
],**common
)
21 entities
.append(dxfPOINT
)