Resource/Archive/Filesystem change notification for sync

What it says on the tin: a place to discuss proposed new features.
User avatar
quiasmo
Kobold
Posts: 28
Joined: Thu Jun 03, 2010 6:59 pm

Resource/Archive/Filesystem change notification for sync

Post 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?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5436
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1343

Re: Resource/Archive/Filesystem change notification for sync

Post 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.