def drawCallback(): size=Blender.Window.GetAreaSize() xPos=0 yPos=size[1] sources=Acoustic.getSources() yPos=layoutSources(sources,"Audio sources:",(xPos,yPos))-40 materials=Acoustic.getMaterials() yPos=layoutMaterials(materials,"Acoustic materials:",(xPos,yPos))-40 listeners=Acoustic.getListeners() yPos=layoutListeners(listeners,"Select listener:",(xPos,yPos))-10 layoutExporter((xPos,yPos)) return
def callBackMaterialButtons(event,val): try: val=float(val) except: return material=Acoustic.getMaterials()[event&EventsMask] if event&Events['impedance']: # print "material: %s" % material impedance=Acoustic.getImpedance(material) if (event&Events['impedance_imaginary'])==Events['impedance_imaginary']: Acoustic.setImpedance(material,complex(impedance.real,val)) # print "setting imag to %s" % val return else: Acoustic.setImpedance(material,complex(val,impedance.imag)) # print "setting real to %s" % val return else: # print "setting diffusion to %s" % val Acoustic.setDiffusion(material,val) return