Refresh Images

General discussion about the R.U.B.E editor
Post Reply
joolean
Posts: 19
Joined: Mon Jun 24, 2013 7:46 am

Refresh Images

Post by joolean »

What does 'Refresh images' and 'Refresh objects' in the Edit menu do?
I can't find any mention of them in the help via the search function nor even on these forums.

I have an image in Rube that frequently gets changed externally and I use a script hook tied to key_press in Rube to refresh it with:

string filepath = img.getFile();
img.setFile('');
img.setFile(filepath);

Is 'Refresh images' meant to do that or does it have another purpose?
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Refresh Images

Post by iforce2d »

Yes, it is meant to update the image/object after it has been changed externally.

You can have this done automatically so that you don't need to push a key or make a script. Look in the "Editing" tab of the Options dialog, check the checkbox and set a time to check for changes.
joolean
Posts: 19
Joined: Mon Jun 24, 2013 7:46 am

Re: Refresh Images

Post by joolean »

Thanks for the reply iforce but neither 'Refresh images' nor turning on those auto-refresh options in Editing works.
I'm running 1.7.3 on Win 7 64.

Are you using win api events or the QT equivalent to be notified of changes or checking manually? Perhaps there's something on my system that is blocking those events for some reason.
Watching along on Process Monitor though there is no activity when using 'Refresh images' from the Edit menu.

It's no biggie though as the script solution works fine.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Refresh Images

Post by iforce2d »

Are they regular files? It may not work for files accessed through network shares, or even files in different partitions.
I'm checking manually, but that should be irrelevant for the case where you trigger the refresh yourself.
joolean
Posts: 19
Joined: Mon Jun 24, 2013 7:46 am

Re: Refresh Images

Post by joolean »

Just regular png files on the same partition.
When I select 'Refresh images' from the menu, just nothing seems to happen. I don't see any file operations in Process Monitor.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Refresh Images

Post by iforce2d »

I just tried this myself and it seems to be not working... sorry I didn't check earlier. I'll see if I can figure out where this started to go wrong.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Refresh Images

Post by iforce2d »

arrghh... it was commented out for some reason. It's not really worth a new release version so I have made the change in the 1.7.3 code. You can download it again to get a fixed version. I have started a build for you. Thanks for the report!
joolean
Posts: 19
Joined: Mon Jun 24, 2013 7:46 am

Re: Refresh Images

Post by joolean »

lol that's pretty funny. The new version works fine.
Thanks for that.
Post Reply