def wavsExport(scene): buffer="" for source in Acoustic.getSources(): wavFilename=Acoustic.getWav(source) if wavFilename==0 or source.sel==0: continue objectName=source.name buffer+=WavLineTemplate % vars() return buffer
def wavsExport(scene): buffer = "" for source in Acoustic.getSources(): wavFilename = Acoustic.getWav(source) if wavFilename == 0 or source.sel == 0: continue objectName = source.name buffer += WavLineTemplate % vars() return buffer
def layoutSources(sources,label="audio sources",offset=(0,0)): yPosition=offset[1]+yLayoutMarks['sources'] xPosition=offset[0]+xLayoutMarks['labels'] Blender.Draw.Label(label,xPosition,yPosition,120,20) for object in sources: objectIndex=sources.index(object) xPosition=offset[0]+xLayoutMarks['sublabels'] Blender.Draw.Label(object.name,xPosition,yPosition,150,20) xPosition=offset[0]+xLayoutMarks['setters'] menu="imported sounds %t" counter=indexFile=1 for sound in Blender.Sound.Get(): if sound.getFilename()==Acoustic.getWav(object): indexFile=counter menu+="|"+sound.getFilename()+"%x"+str(counter) counter+=1 menu=Blender.Draw.Menu(menu,objectIndex|Events['wav_source'],xPosition,yPosition,200,20,indexFile,"select sound file",callBackSourcesMenu) xPosition=offset[0]+xLayoutMarks['buttons'] selected=object.sel export=Blender.Draw.Toggle ("select",objectIndex|Events['export'],xPosition,yPosition,100,20,selected,"select to include it on exportation",callBackSourcesMenu) yPosition-=30 return yPosition