Page 1 of 1

Resource/Archive/Filesystem change notification for sync

Posted: Mon Sep 29, 2014 6:44 pm
by quiasmo
Hey.

So I'm wondering if it makes sense to have some kind of "isInSyncWithOrigin" for resources, or even a "filesystemChangeListener" pattern.
I would use this to know when a resource object is out of sync with the filesystem and chose to selectively refresh and reload objects built from these resources.

I think this would help me simplify my edit/test cycles for custom resources like behaviour scripts and certain type of resource that needs a lot of tweaking.

Looking at it from a more general viewpoint I think it would allow for a clear game / editor separation by having filesystem changes trigger events in Ogre.

Somebody here have similar thoughts with their Ogre projects?

Re: Resource/Archive/Filesystem change notification for sync

Posted: Tue Sep 30, 2014 10:58 pm
by dark_sylinc
While the idea sounds attractive, reloading is not as straightforward for all resources as some pointers may get recreated, thus leaving old (or dangling) pointers in a few places; and won't see a full update; leaving an inconsistent state.

Plus, we've also have yet to integrate the Resource system made in GSoC2013 by Owen Sheppard; and see how that fits in all this.