Thanks for the response Simon! I'm trying assign a folder of textures to multiple quad objects. The script I shared is added to each quad in my scene (specifically, to a child text object under OnSetText). So, if I have 8 Getty Images in a folder with their current name conventions, I want to apply those across quads 1-8 based on their index. What I haven't been able to sort out is how to tell the SetVolatileTextureFile to pull image 1, 2, 3 etc.
We have images coming in red hot on events and breaking news, so for multi-image templates my goal is to drag and drop the downloaded images, and then the control room partner just types in the folder path and bam!, the graphic template is populated. Attached is a visual sample of a simple 2 image project. I'm just trying to push the SetVolatileTexture command as far as I can, and the index component is just tripping me up (not a big coder). The ".jpg" ".jpeg" ".png" is just my current solve to import the image regardless of file type.
long story short, thanks for any guidance or help you can provide!
------------------------------
Chris Jordan
Graphic Artist in Charge
NBCUniversal
------------------------------
Original Message:
Sent: 09-28-2023 12:16
From: Simon Redmile
Subject: SetVolatileTextureFile - but use the index of folder images to texture quads
Hey, you want to set multiple faces of 1 object or 1 face multiple objects?
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
Original Message:
Sent: 09-27-2023 19:13
From: Chris Jordan
Subject: SetVolatileTextureFile - but use the index of folder images to texture quads
Greetings All,
I'm working through some image based templates that would allow the population of Slideshows/Carousels to happen by pasting a folder path in a published template link. So far, working great - but I'd like a solution that wasn't dependent on a common file naming convention....so distributing textures across quads by index is what I'm going for (through a OnSetText, text is child of each Quad):
' establish a text object for the file path
dim path as xpTextObject
Scene.GetObjectByName("Source Folder", path)
dim imagePath as String
imagePath = path.text
' define all possible file extensions
dim fileName1, filename2, filename3 as String
fileName1 = "1" & ".jpg"
fileName2 = "1" & ".jpeg"
fileName3 = "1" & ".png"
' map the quad
dim Quad as xpBaseObject
Self.GetParent(Quad)
Quad.SetVolatileTextureFile(0, imagePath & "\" + fileName1)
Quad.SetVolatileTextureFile(0, imagePath & "\" + fileName2)
Quad.SetVolatileTextureFile(0, imagePath & "\" + fileName3)
Is such a thing even possible? I'm working with version 9, so trying to hack my way to a Dynamic solution with scripting. I haven't been able to find any kind of wildcard convention in the SDK, so kind of stuck on how to proceed. Any guidance/suggestions would be greatly appreciated!
------------------------------
Chris Jordan
Graphic Artist in Charge
NBCUniversal
------------------------------