Hi Wang Rui,
On Tue, Oct 19, 2010 at 4:12 AM, Wang Rui <[email protected]> wrote: > But it is still interesting to discuss about configuring plugin settings. > The PluginStringData mechanism is good for handling all kinds of options > and referenced values, but most plugins still make heavy use of > getOptionString() and have to parse parameters from a long sentence like > "key1=value1 key2=value2". I wonder if we could have the whole option string > automatcailly parsed into 'key and value' map? Plugins can read them then > with getPluginStringData() while reading/writing objects, for example: > > In the user level: > readNodeFile(somefile, new osgDB::Options("max_num=1000 > texture_path=somepath enable_light")); > In the osgDB::Options constructor, we can output the string to the data map > for use: > setPluginStringData("max_num", "1000"); > setPluginStringData("texture_path", "somepath"); > setPluginStringData("enable_light", "true"); > Will it a little convenient for development? This approach is exactly what I have been wondering about for quite some while. It's convenient to pass in a single string when setting some options, but for the ReaderWriters themselves it's a bit of a pain, and it isn't something than scales well at all. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

