Hi Paul, Thanks for the explanation. Looking at your code I believe stripping the extension or when it's .vtf would be better than your approach as this would allow all the subsequent path checks to work.
Robert. On 6 September 2013 07:06, Paul Cheyrou-Lagrèze <[email protected]>wrote: > It's not about my models, or just offical Valve ones, but about all > the "modders community" models. I do not know why modders have not > agreed on one or the other way, but idea about that patch is to allows > for both. (and modding is becoming a huge thing there > > http://techcrunch.com/2010/10/22/team-fortress-2-modders-make-nearly-50000-apiece/ > ) > > For example two different models in their reference file: > . vmt textures referenced as follows: > the first: > "$ BaseTexture" "models \ weapons \ c_items \ c_fishwhacker.vtf" > the second: > "$ BaseTexture" "models \ player \ items \ sniper \ 0x00be0c45 \ > smg_barracuda \ barracuda" > > Before vtf plugin was looking for the name of the file and added texture > ".vtf" > Now Added is just a test to see if the texture file name is already > with a ".vtf" extension and do nothing in that case > Before it did not work with the first because it would end with > ".vtf.vtf", whereas new version allows for that > > > On Thu, Sep 5, 2013 at 6:15 PM, Robert Osfield <[email protected]> > wrote: > > Hi Paul, > > > > I have done another review you the code around the part that you changed > and > > feel that wider code is written about the textureName being just that, > with > > the file extensions manually added when doing searches for the associated > > file in various places - materials and ../materials directories being > > checked. With you new code change allow texureName's being passed in > with > > the .vtf extension already added it'll cause this extra searches to fail > as > > they will automatically add the extra .vtf file name extension to the > > pre-existing one. > > > > To me there seems to be an assumption made about mdl file format > > interpretation of textureName in the original code that textureName would > > never have a file extension and it should always implicitly add ".vtf". > You > > models for some reason break this assumption providing the textureName > with > > ".vtf" extension pre-added. This leads me to question what has changed > from > > normal in your models that diverge them from the types of models that the > > plugin was originally written to handle. Getting to the bottom of this > is > > important as it should reveal what the code should do to handle this > > diverging interpretations of mdl format. > > > > As things stand you submission only muddies the water w.r.t > implementation > > and way well introduce bugs as it'll break the way that the searches > would > > have worked before. It could be that a bug elsewhere in your art path > route > > has introduced this ".vtf" extenions or that perhaps the mdl format is > more > > open to interpretation than the plugin was original written to handle. > > Currently I'm inclined to think that the right thing to do would be to > > remove the ".vtf" extension to allow the old searches to work. > > > > Robert. > > > > > > > > > > > > _______________________________________________ > > 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 >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
