Hey Garner...
I was able to get the script in that scene to work by changing the file path of the image and what-not, but when I try to do basically the same thing on my scene, it doesn't work.
Does it matter if the text that it is looking to is coming from a datalinq source?
Here's my code:
'defines the text objects and quads that the script will
dim Team1 as xpTextObject
dim Team2 as xpTextObject
dim Team3 as xpTextObject
dim Team4 as xpTextObject
dim Team5 as xpTextObject
dim Team6 as xpTextObject
dim Logo1 as xpBaseObject
dim Logo2 as xpBaseObject
dim Logo3 as xpBaseObject
dim Logo4 as xpBaseObject
dim Logo5 as xpBaseObject
dim Logo6 as xpBaseObject
dim material as xpMaterial
dim shader as xpBaseShader
dim FilePath as string
'Find the text obect with the image name in it and the quad that will have the image assigned
self.GetObjectByName("Team1", Team1)
self.GetObjectByName("Logo1", Logo1)
self.GetObjectByName("Team2", Team1)
self.GetObjectByName("Logo2", Logo2)
self.GetObjectByName("Team3", Team1)
self.GetObjectByName("Logo3", Logo3)
self.GetObjectByName("Team4", Team1)
self.GetObjectByName("Logo4", Logo4)
self.GetObjectByName("Team5", Team1)
self.GetObjectByName("Logo5", Logo5)
self.GetObjectByName("Team6", Team1)
self.GetObjectByName("Logo6", Logo6)
'the file path of the directory containing the images & the image format
'put the content of the text object above into the file path
FilePath = "I:\Sports Logos\NHL\Atlantic Division" + Team1.text + ".png"
'find a material and change the file path of the texture in it
engine.GetMaterialByName("Logo1", material)
material.GetShader(0, shader)
shader.SetFileName(FilePath)
'the file path of the directory containing the images & the image format
'put the content of the text object above into the file path
FilePath = "I:\Sports Logos\NHL\Atlantic Division" + Team2.text + ".png"
'find a material and change the file path of the texture in it
engine.GetMaterialByName("Logo2", material)
material.GetShader(0, shader)
shader.SetFileName(FilePath)
'the file path of the directory containing the images & the image format
'put the content of the text object above into the file path
FilePath = "I:\Sports Logos\NHL\Atlantic Division" + Team3.text + ".png"
'find a material and change the file path of the texture in it
engine.GetMaterialByName("Logo3", material)
material.GetShader(0, shader)
shader.SetFileName(FilePath)
'the file path of the directory containing the images & the image format
'put the content of the text object above into the file path
FilePath = "I:\Sports Logos\NHL\Atlantic Division" + Team4.text + ".png"
'find a material and change the file path of the texture in it
engine.GetMaterialByName("Logo4", material)
material.GetShader(0, shader)
shader.SetFileName(FilePath)
'the file path of the directory containing the images & the image format
'put the content of the text object above into the file path
FilePath = "I:\Sports Logos\NHL\Atlantic Division" + Team5.text + ".png"
'find a material and change the file path of the texture in it
engine.GetMaterialByName("Logo5", material)
material.GetShader(0, shader)
shader.SetFileName(FilePath)
'the file path of the directory containing the images & the image format
'put the content of the text object above into the file path
FilePath = "I:\Sports Logos\NHL\Atlantic Division" + Team6.text + ".png"
'find a material and change the file path of the texture in it
engine.GetMaterialByName("Logo6", material)
material.GetShader(0, shader)
shader.SetFileName(FilePath)
So, I've got text objects named Team1, Team2, etc., and I have empty quad objects named Logo1, Logo2, etc.
I've got files in the I:\Sports Logos\NHL\Atlantic Division folder, which is a shared network drive. Each file is just the Team City, which is what gets populated through the RSS feed and datalinq.
Can you see anything wrong with what I'm doing?
Thanks!
#XPression