You are here

Output several poses in a silent file

2 posts / 0 new
Last post
Output several poses in a silent file
#1

Hi,

If I have a list of poses, how can I go about writing a single silent file that contains these poses?  I see there's a SilentFilePoseInputStream class, but I can't find a way to output in silent format.  Can someone point me to those functions?

 

Thanks in advance.

Category: 
Post Situation: 
Tue, 2018-03-20 07:12
SenyorDrew

I was having the same question as you and I found some half answer lying around as a comment for another problem. I will paste a very raw code I managed to put together that actually can work for what you want:

silentOptions = core.io.silent.SilentFileOptions()
silentOptions.in_fullatom(True)
silentFile = core.io.silent.SilentFileData(silentOptions)
for pose in poses:
    silentStruct = core.io.silent.BinarySilentStruct(silentOptions,pose)
    silentFile.add_structure(silentStruct)
silentFile.write_all('silent.out')

Of course you can play with some options (e.g. tags) to make it more elegant. 

Tue, 2018-12-11 05:43
Martin Floor