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

empty_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: e849409e8cab700f962635948ad43f9bc75b6e41 (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 EmptyDXFExporter(BasePrimitiveDXFExporter):
    pass

#-----------------------------------------------------
def exportEmpty(ob, mx, mw, **common):
    """converts Empty-Object to desired projection and representation(DXF-Entity type)
    """
    p =  mathutils.Vector(ob.loc)
    [p] = projected_co([p], mx)
    [p] = toGlobalOrigin([p])

    entities = []
    c = empty_as_list[GUI_A['empty_as'].val]
    if c=="POINT": # export Empty as POINT
        dxfPOINT = DXF.Point(points=[p],**common)
        entities.append(dxfPOINT)
    return entities