Renato Lima
09-14-2010, 02:15 PM
I have been trying to generate some charts on the fly and then apply them as textures to objects. However, viz.add triggers the following message when I try to add an image that has been saved to memory:
File "C:\Program Files (x86)\WorldViz\Vizard30/python\viz.py", line 8704, in add raise ValueError, 'Unrecognized file extension: '+fileType
This is my code:
t = pylab.arange(0.0, 2.0, 0.01)
s = pylab.sin(2*pylab.pi*t)
pylab.plot(t, s, linewidth=1.0)
pylab.xlabel('supertime (s)')
pylab.ylabel('voltage (mV)')
savemem = StringIO.StringIO()
pylab.savefig(imgData, format='png' )
pylab.close()
texturetoapply = viz.add(imgData.read)
Is it a limitation of vizard? or am I doing something wrong? I really don't want to save the file to the disk as it greatly reduces performance.
Thanks
File "C:\Program Files (x86)\WorldViz\Vizard30/python\viz.py", line 8704, in add raise ValueError, 'Unrecognized file extension: '+fileType
This is my code:
t = pylab.arange(0.0, 2.0, 0.01)
s = pylab.sin(2*pylab.pi*t)
pylab.plot(t, s, linewidth=1.0)
pylab.xlabel('supertime (s)')
pylab.ylabel('voltage (mV)')
savemem = StringIO.StringIO()
pylab.savefig(imgData, format='png' )
pylab.close()
texturetoapply = viz.add(imgData.read)
Is it a limitation of vizard? or am I doing something wrong? I really don't want to save the file to the disk as it greatly reduces performance.
Thanks