At its most basic you can do something like this onOnline.
dim plyrImg as xpBaseObject
self.GetObjectByName("Img1", plyrImg)
plyrImg.SetVolatileTextureFile(0,
P:\GRAPHICS\JOHNATHANSMITH.png")
If you want to add variables to it you can do something like.
dim plyrImg as xpBaseObject
dim tricode, filepath, first, last, uni as xpTextObject
self.GetObjectByName("FirstName", first)
self.GetObjectByName("LastName", last)
self.GetObjectByName("Tricode", tricode)
self.GetObjectByName("FilePath", filepath)
self.GetObjectByName("UNI", uni)
self.GetObjectByName("Img1", plyrImg)
plyrImg.SetVolatileTextureFile(0,filepath.Text & tricode.Text & "\" & tricode.Text & "_" & last.Text & "_" & first.Text & "_GS_" & uni.Text & "_Img.png")
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
------------------------------
Original Message:
Sent: 05-09-2022 12:03
From: Nathan S.
Subject: Changing Material/Texture URL based on Datalinq
I am looking to change the texture of a material on a quad based on a value from a datalinq. I have a list of names and I'd like to change an image based on those names. The datalinq does not include a filepath for those images.
For Example:
If I have "JOHNSMITH" as the value from my Datalinq, then how to change the image to "P:\GRAPHICS\JOHNATHANSMITH.png"
I know materials can read a filepath from a datalinq, but is there a way to supply it through scripting? Or do I need to make a bunch of materials and set them based on the name value? Thanks!
------------------------------
Nathan S.
------------------------------