Hi everyone,
I'm having a minor issue with scripting image changes.
Here's the scenario: I've set up a scene where the images take their filename from a text field, then applies it to a quad. That works for the most part.
I then have some visual logic that will sort those filenames based on a "rank" of where the new positions should be, and the script will make the changes. The problem I'm having is that when the script runs, it will make the changes correctly, but the images will flicker a bit between what was previously there and the newly applied image. I've tried many different alternatives. At first I thought maybe it was the Visual Logic causing it so I tried a different approach, but all had the same issue. The script runs when the scene is sent Online, then it's also set to run OnPreviewRender. I've also tried using it on one of the text layers that changes and all produce the same result of flickering as it changes.
These are my system specs:
Windows 10 64bit
16gb RAM
Nvidia GTX 660
Xpression Developer 6.5 Build 3639
Could it just be an issue with the Virtual Output?
I can't include the scene file, but here's the script:
Dim ChoiceCount As xpTextObject
Dim QuestionFormat As xpTextObject
Dim headshot as xpBaseObject
Dim HSFile as xpTextObject
Dim FilePath as String
Dim CurrentPOS as String
Dim ChoicePOS As xpTextObject
Self.GetObjectByName("Choice Count", ChoiceCount)
Self.GetObjectByName("Format", QuestionFormat)
Dim index As Integer
For index = 1 to ChoiceCount.Text
Self.GetObjectByName("HS" & index.ToString() & " File", HSFile)
If QuestionFormat.Text = "rank_pick" Then
Self.GetObjectByName("Choice " & index.ToString() & " POS", ChoicePOS)
CurrentPOS = ChoicePOS.Text
Else
CurrentPOS = index.ToString()
End If
Self.GetObjectByName(ChoiceCount.Text + " Rank HS" + CurrentPOS, headshot)
FilePath = Engine.ProjectPath & HSFile.Text
headshot.SetVolatileTextureFile(0, FilePath)
Next