Welcome to mirror list, hosted at ThFree Co, Russian Federation.

lamp_exporter.py « primitive_exporters « io_export_dxf - git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c67eb032d34b163a2dca57ce327ade27f9c1aa45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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