Feature Discussion: Reload Data Files

Involved development of the OpenMW construction set.
aesylwinn
Posts: 231
Joined: 14 Dec 2015, 20:30

Feature Discussion: Reload Data Files

Post by aesylwinn » 14 Aug 2017, 19:13

I was thinking of working on feature#3530, which involves reloading asset files when they are added or modified. This feature, as mentioned in the request, can be implemented several ways.

1. Track changes to the underlying files, and reload them as necessary.

This would be easiest for the user assuming it could be done. However, there may be some issues with implementing it, especially since it is platform dependent. Some minor research shows there is a Qt class for this purpose called QFileSystemWatcher. However, that page mentions limitations on the number of files being watched, which in my opinion is unacceptable.

2. Allow the user to manually reload asset files.

This isn't nearly as user friendly, but it should work. The downside is that it may take a while to process. This could potentially be accelerated using timestamps.

Your thoughts and opinions?

User avatar
DestinedToDie
Posts: 1061
Joined: 29 Jun 2015, 09:08

Re: Feature Discussion: Reload Data Files

Post by DestinedToDie » 14 Aug 2017, 19:44

The legend is back!

I think manual reload is fine. Something like File->Reload Assets. Tracking assets would probably be a little too intense and from the sound of it too over-complicated implement for the small payoff in comfort.

Lamoot
Posts: 59
Joined: 22 Apr 2016, 12:03

Re: Feature Discussion: Reload Data Files

Post by Lamoot » 15 Aug 2017, 10:24

The main requirement I see for reloading assets is that it's fast enough for iteration.

Let's say you're concepting and still exploring how an asset should look, or you forgot a certain setting when exporting. In both cases, you go back to the asset creation app, do the changes, and you're interested in seeing the result in the editor with as little delay as possible.

Automatic reloading of assets is nice, but doing it manually isn't bad either (even more so if automatic reloading takes longer to import the changed asset). Manual reloading can be streamlined by adding an easily accesible button and definitelly with a shortcut key.

Thank you for considering implementing this feature.

User avatar
lysol
Posts: 726
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Feature Discussion: Reload Data Files

Post by lysol » 15 Aug 2017, 13:58

I am also in favor of having a manual reload button. Not having a button for it could be frustrating if you don't know if the editor has imported the new data file yet or not.
Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page

aesylwinn
Posts: 231
Joined: 14 Dec 2015, 20:30

Re: Feature Discussion: Reload Data Files

Post by aesylwinn » 15 Aug 2017, 15:51

Those were some excellent arguments. Manual reloading it is!
DestinedToDie wrote:
14 Aug 2017, 19:44
Something like File->Reload Assets.
A good idea. I was considering a context menu, but this is much better. Would File->Reload Assets be more intuitive than Assets->Reload though?

User avatar
DestinedToDie
Posts: 1061
Joined: 29 Jun 2015, 09:08

Re: Feature Discussion: Reload Data Files

Post by DestinedToDie » 15 Aug 2017, 19:28

Now that I think of it, it makes more sense for it to be in Assets-> Reload

aesylwinn
Posts: 231
Joined: 14 Dec 2015, 20:30

Re: Feature Discussion: Reload Data Files

Post by aesylwinn » 22 Aug 2017, 23:29

The feature has now been merged into master.

User avatar
DestinedToDie
Posts: 1061
Joined: 29 Jun 2015, 09:08

Re: Feature Discussion: Reload Data Files

Post by DestinedToDie » 23 Aug 2017, 11:42

Awesome. I need to try this out next time I download a nightly.

Lamoot
Posts: 59
Joined: 22 Apr 2016, 12:03

Re: Feature Discussion: Reload Data Files

Post by Lamoot » 24 Aug 2017, 20:28

That was fast, I hope to find time this weekend to test it out.

Lamoot
Posts: 59
Joined: 22 Apr 2016, 12:03

Re: Feature Discussion: Reload Data Files

Post by Lamoot » 26 Aug 2017, 15:21

And found time I did.

Reloading works fine here, single or multiple assets get updated through the menu entry or via the shortcut key. For comparison, reloading takes around 6 seconds, while closing and opening OpenMW-CS everytime (along with setting the window layout from before) takes around 30 seconds.

I wonder though, is there a way to further speed up reloading? I've tested with a few simple meshes and 6 seconds (on an admitedly older laptop, on windows) still feels longer than desired.

In any case it's a definite workflow improvement, thank you for implementing it.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest