Loading an image into a presentation during runtime

Q and A about functionality and how to solve a special task for your application.

Loading an image into a presentation during runtime

Postby Luke47921 » 01 Dec 2016, 12:44

I have a button in my presentation that shows an image which can be selected using my remoting app. My app takes the path of the image, and copies it into Ventuz' image folder, and then sets the scene data to the new path in the Ventuz image folder. This works fine in designer, but when I try to do this in a presentation, the only images that will show are images that are already used elsewhere in the scene.

Does Ventuz do something special when it copies an image over into the images folder? Is there something that I'm doing wrong here?
Luke47921
 
Posts: 27
Joined: 21 Oct 2015, 13:23

Re: Loading an image into a presentation during runtime

Postby lerou » 01 Dec 2016, 13:34

How do you set the path? You should use a URL node with FILE scheme. Use a path like: .\images\myimage.png. The .\ in the beginning makes it relative to the project or vpr. Use the URLs output (local filename) as input for the texture loader.

If you have problems, put a 2D text into the scene, set it to the filename. That way you can see the path Ventuz is assuming even when running a VPR.

cheers,
rou
User avatar
lerou
 
Posts: 220
Joined: 06 Sep 2013, 07:14
Location: Hamburg, Germany

Re: Loading an image into a presentation during runtime

Postby Luke47921 » 01 Dec 2016, 15:08

That's fixed it, thanks! Instead of using URL with the file scheme I was trying to set the path directly as ventuz://images/myimage.png
Luke47921
 
Posts: 27
Joined: 21 Oct 2015, 13:23


Return to How to...

cron