Beispiel #1
0
def saveiv(scene, filename):
    """saveiv(scene,filename): saves an .iv file with the contents of the given coin node"""

    wa = coin.SoWriteAction()
    wa.getOutput().openFile(filename)
    wa.getOutput().setBinary(False)
    wa.apply(sc)
    wa.getOutput().closeFile()
Beispiel #2
0
def test_save():
    cube_lv = make_mother_daughter()
    writer = coin.SoWriteAction()
    out = writer.getOutput()
    out.openFile("test_pivy.iv")
    out.setBinary(False)
    writer.apply(cube_lv)
    out.closeFile()
Beispiel #3
0
def output(top, filename):
    '''
    '''
    writer = coin.SoWriteAction()
    out = writer.getOutput()
    out.openFile(filename)
    out.setBinary(False)
    writer.apply(top)
    out.closeFile()
Beispiel #4
0
 def toText(self, root):
     wa = coin.SoWriteAction()
     return wa.apply(root)