@c -*-texinfo-*-
@node  io_scene_cs Installing, io_scene_cs First Steps, Blender, Blender
@subsection Installing the @code{io_scene_cs} add-on script
@cindex Installing @code{io_scene_cs}
@cindex Installing Blender Exporter

This section describes the installation procedure of the @code{io_scene_cs} add-on script.

@subsubheading Getting the add-on

The @code{io_scene_cs} add-on script is available in the Crystal Space package,
within the @samp{CS/scripts/blender} directory. The script should be used with
the corresponding version of Crystal Space.

@subsubheading Installing the add-on

Since the script is composed of several files, you cannot simply use the @samp{Install Add-On}
button of the Blender interface. Instead, you need to copy manually the folder
@samp{CS/scripts/blender/io_scene_cs} into the Blender add-ons directory
(@samp{blender/$version/scripts/addons}). By default, this directory should be at:

@itemize @bullet
@item
@samp{Windows 7}: @file{C:\Users\%username%\AppData\Roaming\Blender Foundation\Blender\%version%\scripts\addons}
@item
@samp{Windows XP}: @file{C:\Documents and Settings\%username%\Application Data\Blender Foundation\Blender\%version%\scripts\addons}
@item
@samp{Linux}: @file{/home/$username/.blender/$version/scripts/addons}
@end itemize

See
@url{http://wiki.blender.org/index.php/Doc:2.6/Manual/Extensions/Python/Add-Ons, the official Blender manual}
for more information on the actual process.

@subsubheading Enabling the add-on

Blender add-ons are found in the @samp{Add-Ons} tab of the @samp{Files > User Preferences}
window. Once an add-on has been installed, it has to be enabled before it can be used.
Simply place a check mark on the @samp{Enable an addon} box of the add-on called
@samp{Import-Export: Export Crystal Space 3D format}. 

If the add-on doesn't appear in the list, then this probably means that the installation
was not made correctly. Please check the directory where you placed the @code{io_scene_cs}
add-on script, or check the Blender console for any problems.

@picturess{content,blender,blender_preferences}

The new export functionality is now integrated into Blender and can be used. If you want to
disable the functionality, uncheck the box. To get more information on the add-on you can
press the arrow at the left of the entry. Finally, this add-on can be enabled everytime
you start Blender simply by saving your user preferences (@samp{Save As Default} at the
bottom of the window).

@subsubheading Testing the presence of the add-on

Close the Blender @samp{User Preferences} window, then go and check if the
@samp{Crystal Space Export} panel appears in the @samp{Render} context of the
@samp{Properties} (or @samp{Buttons}) window (it can appear either at the top
or at the bottom of the context).

@picturess{content,blender,io_scene_cs_interface}

If you don't see the interface, then you may:

@itemize @bullet
@item
Scroll either to the top and to the bottom of the @samp{Render} context since
the Crystal Space panel may appear in both places.
@item
Check that you have the exporter add-on correctly installed and enabled.
@item
Check the @url{http://wiki.blender.org/index.php/Doc:2.6/Manual/Interface/Window_system/Console_window, Blender console window}
to see if there are any error messages about the exporter. In this case, you may consider
to @ref{Feedback, create a bug report}.
@end itemize


@subsubheading Configuring Crystal Space

Finally, if you want to test your exported meshes and models, you should have a valid
Crystal Space package installed on your computer, with the @samp{CRYSTAL} environment
variable pointing to the installation directory. Although this variable is not technically
needed to use the @code{io_scene_cs} script, you will need it in order to view your
exported files and to use the @samp{Export and Run} functionality of the script.
@xref{HOWTO Setting the CRYSTAL environment variable} for more information on the way to
do this.

