Exemplo n.º 1
0
    def effect(self):
        # Prepare the document for exporting
        SynfigPrep.effect(self)

        svg = self.document.getroot()
        width = get_dimension(svg.get("width", 1024))
        height = get_dimension(svg.get("height", 768))

        title = svg.xpath("svg:title", namespaces=NSS)
        if len(title) == 1:
            name = title[0].text
        else:
            name = svg.get(addNS("docname", "sodipodi"), "Synfig Animation 1")

        d = SynfigDocument(width, height, name)

        layers = []
        for node in svg.iterchildren():
            layers += self.convert_node(node, d)

        root_canvas = d.get_root_canvas()
        for layer in layers:
            root_canvas.append(layer)

        d.get_root_tree().write(sys.stdout)
Exemplo n.º 2
0
    def effect(self):
        # Prepare the document for exporting
        SynfigPrep.effect(self)
        svg = self.document.getroot()
        width = get_dimension(svg.get("width", 1024))
        height = get_dimension(svg.get("height", 768))

        title = svg.getElement('svg:title')
        if title:
            name = title.text
        else:
            name = svg.get('sodipodi:docname', "Synfig Animation 1")

        doc = SynfigDocument(width, height, name)

        layers = []
        for node in svg.iterchildren():
            layers += self.convert_node(node, doc)

        root_canvas = doc.get_root_canvas()
        for layer in layers:
            root_canvas.append(layer)

        self.synfig_document = doc.get_root_tree()
Exemplo n.º 3
0
 def __init__(self):
     SynfigPrep.__init__(self)
Exemplo n.º 4
0
 def __init__(self):
     SynfigPrep.__init__(self)