Project generator and the common data directory

Hi forum,

Hi forum,
I have just started playing with OF. Currently, getting my hand wet with the video related issues. I am creating the projects with the help of the projectGenerator and so far it has been very convenient for me. Every project generator creates a bin directory which in turn contains the data directory that contains the data. The data are common for all of the video projects i am working on and i feel it to be very in-efficient to have a copy of those data in each of the data directory.

I would like to have a common directory that all the projects can access into for the common data.

Any hint to change to this ?


ofSetDataPathRoot() can be use to change where OF searches for data. typically, OF will look in the data folder, but you can make this point to another common folder.

Should i call it inside the setup() ?

yes – this changes any call to an OF file loading (ofImage::loadImage, ofTrueTypeFont::loadFont, etc).