Where is favorite Collections info being stored?
-
I know i18n.dat contains Default Favorite Collections info, but can't figure out where favorite collections info get's stored when a user updates it. I'm trying to give user an easy way to add a collection to favorites through my plugin.
Here's the excerpt i18n.dat:
[DEFAULT FAVORITE COLLECTIONS] NUMBER_DEFAULT_COLLECTIONS=6; COLLECTION_0_NAME=Architecture; COLLECTION_0_URL=http://sketchup.google.com/3dwarehouse/data/entities?clid=578dd83d965235a69943445eb5ff139e&q=is;downloadable&hl={CULTURE}; COLLECTION_1_NAME=Landscape; COLLECTION_1_URL=http://sketchup.google.com/3dwarehouse/data/entities?clid=74f1f4bc15880d539d72d32da159e115&q=is;downloadable&hl={CULTURE}; COLLECTION_2_NAME=Construction; COLLECTION_2_URL=http://sketchup.google.com/3dwarehouse/data/entities?clid=7c6adff4dfc2274cbdec1b0b6b8425ca&q=is;downloadable&hl={CULTURE}; COLLECTION_3_NAME=People; COLLECTION_3_URL=http://sketchup.google.com/3dwarehouse/data/entities?clid=4f8bf1d61dccd5b68095ba2080357053&q=is;downloadable&hl={CULTURE}; COLLECTION_4_NAME=Playground; COLLECTION_4_URL=http://sketchup.google.com/3dwarehouse/data/entities?clid=198ab77991db28b58095ba2080357053&q=is;downloadable&hl={CULTURE}; COLLECTION_5_NAME=Transportation; COLLECTION_5_URL=http://sketchup.google.com/3dwarehouse/data/entities?clid=a854971e9dfb05cea5ab2a72c8b8cb68&q=is;downloadable&hl={CULTURE};
I've spent a few days on this, and I've run out of ideas. Any help is much appreciated.
-
That dat file is only used on first run of Sketchup I believe.
Those entries are copied into the Windows Registry or the plist file on the Mac.
Unfortunately..
Sketchup.write_default()
cannot write DWORD values. -
What is so hard about creating a local collection now? Seems purty easy to me. Choose the menu option, make a directory.. etc.
Downloading a collection from the 3DWarehouse is all point and click.
-
I agree it's pretty easy, but just trying to make it even easier. I have a growing collection of models that works with my plugin on the warehouse, and it would be great if there was a shortcut to those models in the user's favorites.
-
Well.. hmmm. unless you are an expert at the format of the Mac plist, and the Windows Registry, it's best to tell the user how to add the collection manually.
Otherwise see if there is already a library extension by some other plugin author that your plugin could call.
Check the Code Snippet list.. and or the Plugin Index in the "Plugins" forum.
Advertisement