Hi Harios,
I recommend putting some debug message in the script to make sure its completing fine; depending on how you want to control the object face, instead of getting the material and its shader; you could set a volatile texture.
i'll make the change below to show you; if you enable inside your Preferences --> Advance you will be able to see these debug messages inside the XPression Debug Monitor, if you don't see the "End" message at the end then the script failed to complete
[I]'[/I]************************************************************************************************
Engine.DebugMessage("Start",0)
dim Nombre1, Nombre2, Nombre3, Nombre4, Nombre5, Apellido1 as xptextobject
dim Slab1 as xpBaseObject [I]'Slab1 is the name my empty slab[/I]
dim FilePath as String
FilePath = Engine.ProjectPath
Engine.DebugMessage("Done Dim",0)
self.getobjectbyname("Nombre1" ,Nombre1)
self.getobjectbyname("Apellido1" ,Apellido1)
self.getobjectbyname("Nombre2" ,Nombre2)
self.getobjectbyname("Nombre3" ,Nombre3)
self.getobjectbyname("Nombre4" ,Nombre4)
self.getobjectbyname("Nombre5" ,Nombre5)
Self.GetObjectByName("Slab1 " , Slab1) [I]'Here i call my slab[/I]
Engine.DebugMessage("Done Get",0)
[I]'Casilla 1 - Candidate 1[/I]
if Nombre1.text = "001" then
Nombre1.text = replace(Nombre1.text, "001", "Gustavo Petro")
Engine.DebugMessage("Done Replace",0)
[I]'So, inside this conditional i execute the function.[/I]
Slab1.SetVolatileTextureFile(FilePath + "Candidatos" + Nombre1.Text + ".png")
Engine.DebugMessage("Done Shad",0)
end if
Engine.DebugMessage("End",0)
#XPression