Difference between revisions of "Nif Optimization"
python 2.5 -> python 2.6
imported>Amorilia (→FAQ: more nifs that don't work) |
imported>Amorilia (python 2.5 -> python 2.6) |
||
Line 36: | Line 36: | ||
To get the script to work you need Python and PyFFI. Python is an open source programming language, while PyFFI is an interface between Python and nif files. | To get the script to work you need Python and PyFFI. Python is an open source programming language, while PyFFI is an interface between Python and nif files. | ||
*Install [http://www.python.org/download/ Python 2. | *Install [http://www.python.org/download/ Python 2.6] (in this article it will be assume that you use the default installation path, C:\Python26). | ||
*Install [http://sourceforge.net/project/platformdownload.php?group_id=199269&sel_platform=3089 PyFFI]. | *Install [http://sourceforge.net/project/platformdownload.php?group_id=199269&sel_platform=3089 PyFFI]. | ||
Line 59: | Line 59: | ||
In the text box under "Application used to perform action", you see this text string: | In the text box under "Application used to perform action", you see this text string: | ||
"C:\ | "C:\Python26\python.exe" "C:\Python26\Scripts\niftoaster.py" --pause optimize "%1" | ||
You can add new options between <tt>--pause</tt> and <tt>"%1"</tt>, for instance: | You can add new options between <tt>--pause</tt> and <tt>"%1"</tt>, for instance: | ||
"C:\ | "C:\Python26\python.exe" "C:\Python26\Scripts\niftoaster.py" --pause -x NiMaterialProperty optimize "%1" | ||
if you do not want the script to optimize NiMaterialProperty blocks when you run it from the context menu. | if you do not want the script to optimize NiMaterialProperty blocks when you run it from the context menu. | ||
Line 75: | Line 75: | ||
*Open the start menu in Windows and select Run ([http://s11.photobucket.com/albums/a177/SilgradTower/AmoriliasScript/RunOnStartMenu.jpg img]). In the popup, write cmd and hit enter ([http://s11.photobucket.com/albums/a177/SilgradTower/AmoriliasScript/cmd.jpg img]). Now a Windows shell with command prompt will appear. [[Image:PythonScriptInDos.jpg|thumb| This is what the DOS window should look like if using the default commands.]] | *Open the start menu in Windows and select Run ([http://s11.photobucket.com/albums/a177/SilgradTower/AmoriliasScript/RunOnStartMenu.jpg img]). In the popup, write cmd and hit enter ([http://s11.photobucket.com/albums/a177/SilgradTower/AmoriliasScript/cmd.jpg img]). Now a Windows shell with command prompt will appear. [[Image:PythonScriptInDos.jpg|thumb| This is what the DOS window should look like if using the default commands.]] | ||
*Type | *Type | ||
cd C:\ | cd C:\Python26 | ||
followed by enter, to tell the Windows shell to go to your Python install folder. If you did not install Python in the default location then just replace the folder with your Python install folder. If you are unsure about where Python is installed, open the start menu then go to "Programs > Python 2. | followed by enter, to tell the Windows shell to go to your Python install folder. If you did not install Python in the default location then just replace the folder with your Python install folder. If you are unsure about where Python is installed, open the start menu then go to "Programs > Python 2.6", right-click any of the shortcuts and choose properties. Open the Shortcut tab, where the Python path is displayed in the "Target:" textbox. Write that url in your DOS window in the same format as the example. | ||
*Next, type | *Next, type | ||
python.exe Scripts\niftoaster.py optimize C:\nifoptimize | python.exe Scripts\niftoaster.py optimize C:\nifoptimize |