Hi Robert,
Hi Sebastian,

I have just done a review and while the changes aren't overly intrusive I can't help but feel it's a bad hack and counter-intuitive to anyone else other than the original implementer i.e. yourself. I really don't like the code base getting clogged up with very specific usage cases as it just reduce software quality and maintainability over the long term.
I could also make this default behavior, thus removing the code distinguishing between "plugin will simply handle everything" and "user can override behavior with callbacks".
So this would increase maintainability but might break existing code.

Could you be very specific about what information you need to log and how you go about using it. There may well be an alternative solution.
In my project I have some "compiler" step which processes the database, reordering it and make it more compact. Unfortunately with the current implementation I don't get any information about images referenced but not available. This is really bad, as it doesn't provide any feedback to artists regarding ill-referenced images (which happens a lot in big assets). So I simply wanted to move the information and retrieval of images to the user code rather than keeping it obscurely hidden inside the plugin

Cheers
Sebastian

Robert.


On 5 August 2013 16:45, Sebastian Messerschmidt <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    As already pointed out in another thread the OpenFlight plugin is
    not calling readImageFile for referenced images which are not
    found by osgDB::findDataFile.
    While this okay in usual environments, it is bad if someone
    intents to get information which OpenFlight file is missing this
    image.
    In my case a pre-compiler for the database needs to report missing
    images to a log file, while distinguishing between originally
    referenced files and support files which are optional. So for
    providing a context deferring this to the a potential
    ReadFileCallback via readImageFile instead of simply dropping out,
    this fix will help.

    Using FindFileCallback is not an option as it doesn't give any
    context (image/node, from where ...)


    In order to use the new behavior, one can set the
    readMissingImages to the osgDB::Options. Original behavior is default.

    cheers
    Sebastian

    _______________________________________________
    osg-submissions mailing list
    [email protected]
    <mailto:[email protected]>
    
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org




_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to