Hi Community,
Working on a custom graphic for a sports package.I want to set the material color of the object to match the swatch color value for a given team. So far I have created 3 objects:
1) A quad with a Generic Logo image (Logo Away LOGO)
2) A quad with ESPN_INSERT_Image (Logo Away SWATCH) - (a swatch graphic containing the swatch properties of the team)
3) Quad1 (a quad that I want to take the primary color value of the team from the swatch graphic)
4) A Text object (where I type in the name of the team)
I have edited the text object's script to say:
dim logo, swatch as xpBaseObject
dim logopath as string
scene.GetObjectByName ("Logo Away LOGO", logo)
scene.GetObjectByName ("Logo Away SWATCH", swatch)
logopath = "D:\IMS Images"
if scene.iscopy then
logo.SetVolatileTextureFile(0, logopath & "\Primary\" & ucase(Replace(Replace(text," ","_"), "&", "")) & ".png")
swatch.SetVolatileTextureFile(0, logopath & "\Swatches\" & ucase(Replace(Replace(text," ","_"), "&", "")) & ".png")
end if
When I type the team abbreviation into the text field, the generic logo image is replaced with the team's primary logo - PERFECT!
However, rather than turn the quad into the primary color of the team, it changes the color values on the swatch file, keeping the entire swatch graphic rather than just pulling values from it.
How do I get the quad to pull the values from the swatch rather than display the swatch image with all of its values?
P.S. I have attempted to do this in Visual Logic:
Logo Away SWATCH (Faces.Face) ---> Quad1 (Faces.Face)
Didn't work. Any thoughts?