Hey Martin,
So, to give you more insight into how all this is meant to work. We DO have Excel from the client with all manner of information in it, including file paths to 3 types of player images (Head Shots, Action Shot, and Studio Shots). All of that is actually working fine with traditional datalinq keys and some VL to switch between the image types. Where things are going a little sideways for me and where the script is coming into play has to do with the MATTE material we are using to reveal the player images. These are using materials which have the same image file in them as the visible player image, but the settings of the material are such that it works as a sort of reverse mask wherein the player silhouette is the alpha. This allows the colored 'sleeves' to reveal the player in a particular way.
What needs to happen here, is for that matte material to update to have the image file of the currently selected (via DL key) populate that MATTE material, as we don't have a folder full of images formatted that way to pull from.
I have considered that perhaps I need unique materials for every scene, but when we've had the folks at Ross help me with that sort of thing in the past, that wasn't a step that we took.
I am attaching below a few screenshots which show the reveal in progress, the resolve, the materials and my object hierarchy to hopefully clear things up for you and anyone else who wants to help me solve this. The full script relevant to the functionality I seek is as follow:
dim PlayerImg, PlayerMask as xpBaseObject
dim PlayerImgMat, PlayerMaskMat as xpMaterial
dim PlayerImgSha, PlayerMaskSha as xpBaseShader
dim MatFilePath as String
'get file from image for head shot-----------------------------
Self.GetObjectByName("P-IMG Head-1", PlayerImg)
PlayerImg.GetMaterial(0, PlayerImgMat)
PlayerImgMat.GetShader(0, PlayerImgSha)
MatFilePath = PlayerImgSha.FileName
'set file to mask head shot--------------------------------
Self.GetObjectByName("P-MATTE Head-1", PlayerMask)
PlayerMask.GetMaterial(0, PlayerMaskMat)
PlayerMaskMat.GetShader(0, PlayerMaskSha)
PlayerMaskSha.SetFileName(MatFilePath)
'get file from image for drama shot-----------------------------
Self.GetObjectByName("P-IMG Dram-1", PlayerImg)
PlayerImg.GetMaterial(0, PlayerImgMat)
PlayerImgMat.GetShader(0, PlayerImgSha)
MatFilePath = PlayerImgSha.FileName
'set file to mask drama shot--------------------------------
Self.GetObjectByName("P-MATTE Dram-1", PlayerMask)
PlayerMask.GetMaterial(0, PlayerMaskMat)
PlayerMaskMat.GetShader(0, PlayerMaskSha)
PlayerMaskSha.SetFileName(MatFilePath)
'get file from image for action shot-----------------------------
Self.GetObjectByName("P-IMG Action-1", PlayerImg)
PlayerImg.GetMaterial(0, PlayerImgMat)
PlayerImgMat.GetShader(0, PlayerImgSha)
MatFilePath = PlayerImgSha.FileName
'set file to mask action shot--------------------------------
Self.GetObjectByName("P-MATTE Action-1", PlayerMask)
PlayerMask.GetMaterial(0, PlayerMaskMat)
PlayerMaskMat.GetShader(0, PlayerMaskSha)
PlayerMaskSha.SetFileName(MatFilePath)
'get file from image for head shot-----------------------------
Self.GetObjectByName("P-IMG Head-2", PlayerImg)
PlayerImg.GetMaterial(0, PlayerImgMat)
PlayerImgMat.GetShader(0, PlayerImgSha)
MatFilePath = PlayerImgSha.FileName
'set file to mask head shot--------------------------------
Self.GetObjectByName("P-MATTE Head-2", PlayerMask)
PlayerMask.GetMaterial(0, PlayerMaskMat)
PlayerMaskMat.GetShader(0, PlayerMaskSha)
PlayerMaskSha.SetFileName(MatFilePath)
'get file from image for drama shot-----------------------------
Self.GetObjectByName("P-IMG Dram-2", PlayerImg)
PlayerImg.GetMaterial(0, PlayerImgMat)
PlayerImgMat.GetShader(0, PlayerImgSha)
MatFilePath = PlayerImgSha.FileName
'set file to mask drama shot--------------------------------
Self.GetObjectByName("P-MATTE Dram-2", PlayerMask)
PlayerMask.GetMaterial(0, PlayerMaskMat)
PlayerMaskMat.GetShader(0, PlayerMaskSha)
PlayerMaskSha.SetFileName(MatFilePath)
'get file from image for action shot-----------------------------
Self.GetObjectByName("P-IMG Action-2", PlayerImg)
PlayerImg.GetMaterial(0, PlayerImgMat)
PlayerImgMat.GetShader(0, PlayerImgSha)
MatFilePath = PlayerImgSha.FileName
'set file to mask action shot--------------------------------
Self.GetObjectByName("P-MATTE Action-2", PlayerMask)
PlayerMask.GetMaterial(0, PlayerMaskMat)
PlayerMaskMat.GetShader(0, PlayerMaskSha)
PlayerMaskSha.SetFileName(MatFilePath)




#XPression