From: <ror...@us...> - 2007-07-06 00:16:23
|
Revision: 86 http://roreditor.svn.sourceforge.net/roreditor/?rev=86&view=rev Author: rorthomas Date: 2007-07-05 17:16:10 -0700 (Thu, 05 Jul 2007) Log Message: ----------- * added bat shortcuts for depchecker * added ogrecmdlinetools to tools\ Modified Paths: -------------- trunk/lib/ror/depchecker/ror_mesh.py Added Paths: ----------- trunk/depchecker.bat trunk/depchecker.py trunk/tools/OgreCommandLineTools/ trunk/tools/OgreCommandLineTools/OgreMain.dll trunk/tools/OgreCommandLineTools/OgreMaterialUpgrade.exe trunk/tools/OgreCommandLineTools/OgreMeshUpgrade.exe trunk/tools/OgreCommandLineTools/OgreXmlConverter.exe trunk/tools/OgreCommandLineTools/Readme.txt trunk/tools/OgreCommandLineTools/devil.dll trunk/tools/OgreCommandLineTools/ilu.dll trunk/tools/OgreCommandLineTools/ilut.dll trunk/tools/OgreCommandLineTools/zlib1.dll Added: trunk/depchecker.bat =================================================================== --- trunk/depchecker.bat (rev 0) +++ trunk/depchecker.bat 2007-07-06 00:16:10 UTC (rev 86) @@ -0,0 +1 @@ +%systemdrive%\python25\python.exe depchecker.py %1 %2 %3 %4 %5 %6 %7 %8 %9 Added: trunk/depchecker.py =================================================================== --- trunk/depchecker.py (rev 0) +++ trunk/depchecker.py 2007-07-06 00:16:10 UTC (rev 86) @@ -0,0 +1,28 @@ +#Thomas Fischer 31/05/2007, th...@th... +import sys, os, os.path + +def main(): + """ + main method + """ + + sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib")) + import ror.settingsManager + path = ror.settingsManager.getSettingsManager().getSetting("RigsOfRods", "BasePath") + if not os.path.isfile(os.path.join(path,"RoR.exe")): + import ror.starter + ror.starter.startApp() + + # Import Psyco if available + try: + import psyco + psyco.full() + except ImportError: + pass + + import ror.depchecker + ror.depchecker.main() + + +if __name__=="__main__": + main() \ No newline at end of file Modified: trunk/lib/ror/depchecker/ror_mesh.py =================================================================== --- trunk/lib/ror/depchecker/ror_mesh.py 2007-07-05 23:52:07 UTC (rev 85) +++ trunk/lib/ror/depchecker/ror_mesh.py 2007-07-06 00:16:10 UTC (rev 86) @@ -1,7 +1,8 @@ -import os, os.path, re +import sys, os, os.path, re import subprocess -CONVERTERBIN = "C:\\OgreCommandLineTools\\OgreXmlConverter.exe" +# todo remove this hardcoded stuff here! +CONVERTERBIN = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..\\..\\..\\tools\\OgreCommandLineTools\\OgreXmlConverter.exe")) REs = [r".*material\s?=[\"\']([a-zA-Z0-9_/\-\\]*)[\"\'].*"] def readFile(filename): Added: trunk/tools/OgreCommandLineTools/OgreMain.dll =================================================================== (Binary files differ) Property changes on: trunk/tools/OgreCommandLineTools/OgreMain.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/OgreCommandLineTools/OgreMaterialUpgrade.exe =================================================================== (Binary files differ) Property changes on: trunk/tools/OgreCommandLineTools/OgreMaterialUpgrade.exe ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/OgreCommandLineTools/OgreMeshUpgrade.exe =================================================================== (Binary files differ) Property changes on: trunk/tools/OgreCommandLineTools/OgreMeshUpgrade.exe ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/OgreCommandLineTools/OgreXmlConverter.exe =================================================================== (Binary files differ) Property changes on: trunk/tools/OgreCommandLineTools/OgreXmlConverter.exe ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/OgreCommandLineTools/Readme.txt =================================================================== --- trunk/tools/OgreCommandLineTools/Readme.txt (rev 0) +++ trunk/tools/OgreCommandLineTools/Readme.txt 2007-07-06 00:16:10 UTC (rev 86) @@ -0,0 +1,108 @@ +OGRE COMMAND-LINE UTILITIES +=========================== + +This archive contains a few prebuilt command-line tools for manipulating your +media. For further info, visit http://www.ogre3d.org + +OgreXMLConverter +---------------- +Converts between the binary and XML formats for .mesh and .skeleton. Will also +allow you to generate LOD information if you are converting to the binary +format. This tool is necessary to convert from the XML to OGRE's native runtime +format if your exporter produces XML. You can find the XML Schema for the .mesh +and .skeleton formats in the Ogre source under Tools/XMLConverter/docs. + +Usage: OgreXMLConverter [options] sourcefile [destfile] + +Available options: +-i = interactive mode - prompt for options +(The next 4 options are only applicable when converting XML to Mesh) +-l lodlevels = number of LOD levels +-d loddist = distance increment to reduce LOD +-p lodpercent = Percentage triangle reduction amount per LOD +-f lodnumtris = Fixed vertex reduction per LOD +-e = DON'T generate edge lists (for stencil shadows) +-r = DON'T reorganise vertex buffers to OGRE recommended format. +-t = Generate tangents (for normal mapping) +-o = DON'T optimise out redundant tracks & keyframes +-d3d = Prefer D3D packed colour formats (default on Windows) +-gl = Prefer GL packed colour formats (default on non-Windows) +-E endian = Set endian mode 'big' 'little' or 'native' (default) +-q = Quiet mode, less output +-log filename = name of the log file (default: 'OgreXMLConverter.log') +sourcefile = name of file to convert +destfile = optional name of file to write to. If you don't + specify this OGRE works it out through the extension + and the XML contents if the source is XML. For example + test.mesh becomes test.xml, test.xml becomes test.mesh + if the XML document root is <mesh> etc. + +Because the default behaviour is to convert binary to XML and vice versa, you +can simply drag files onto this converter and it will convert between the 2 +formats, although you will not be able to use it to generate LOD levels this +way. + +OgreMeshUpgrade +--------------- + +This tool upgrades a .mesh file from any previous version of OGRE to the latest +version. You will be advised in Ogre.log if your meshes are of an old version; +OGRE can still load old versions but performance may not be as good as it would +be with the latest version. You are advised to upgrade your meshes whenever you +update to another major version of OGRE. + +Usage: OgreMeshUpgrader [options] sourcefile [destfile] +-i = Interactive mode, prompt for options +-l lodlevels = number of LOD levels +-d loddist = distance increment to reduce LOD +-p lodpercent = Percentage triangle reduction amount per LOD +-f lodnumtris = Fixed vertex reduction per LOD +-e = DON'T generate edge lists (for stencil shadows) +-t = Generate tangents (for normal mapping) +-r = DON'T reorganise buffers to recommended format +-d3d = Convert to D3D colour formats +-gl = Convert to GL colour formats +-srcd3d = Interpret ambiguous colours as D3D style +-srcgl = Interpret ambiguous colours as GL style +-E endian = Set endian mode 'big' 'little' or 'native' (default) +sourcefile = name of file to convert +destfile = optional name of file to write to. If you don't + specify this OGRE overwrites the existing file. + +Again you can drag files onto this tool, so long as you don't mind it +overwriting the file in place. If you'd prefer to keep a backup, make a copy or +use the command line to upgrade to a different file. + +Reorganising vertex buffers: this tool now allows you to restructure the vertex +buffers in your mesh. If you are upgrading from a version prior to 0.15.0, then +you should answer 'y' when asked if you want to reorganise the buffers, since +0.15.0 and later allows more efficient structures in the binary mesh. You will +then be shown the buffer structures for each of the geometry sections; you can +either reorganise the buffers yourself, or use 'automatic' mode, which is +recommended unless you know what you're doing. + +OgreMaterialUpgrade +------------------- +Upgrades a .material script from any previous version of OGRE to the new +.material format. Note that upgraded scripts do not use any new features of the +material, and you may find that some attributes are re-written as their +'complex' variants rather than their simplified versions (e.g. "scene_blend add" +will be written as "scene_blend one one" because this is what 'add' maps down +to. + +You only need to run this tool if you have .material scripts from a version of +OGRE older than 0.13.0. Material scripts written for 0.13.0 onwards do not +need upgrading. + +Usage: + +OgreMaterialUpgrade sourcefile [destfile] +sourcefile = name of file to convert +destfile = optional name of file to write to. If you don't + specify this OGRE overwrites the existing file. + +Again you can drag files onto this tool, so long as you don't mind it +overwriting the file in place. If you'd prefer to keep a backup, make a copy or +use the command line to upgrade to a different file. + +Copyright 2004 The OGRE Team Added: trunk/tools/OgreCommandLineTools/devil.dll =================================================================== (Binary files differ) Property changes on: trunk/tools/OgreCommandLineTools/devil.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/OgreCommandLineTools/ilu.dll =================================================================== (Binary files differ) Property changes on: trunk/tools/OgreCommandLineTools/ilu.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/OgreCommandLineTools/ilut.dll =================================================================== (Binary files differ) Property changes on: trunk/tools/OgreCommandLineTools/ilut.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tools/OgreCommandLineTools/zlib1.dll =================================================================== (Binary files differ) Property changes on: trunk/tools/OgreCommandLineTools/zlib1.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |