http://code.google.com/p/tubras/source/detail?r=1902
Added:
/trunk/tools/irrb/doc/tut01.rst
/trunk/tools/irrb/doc/tut02.rst
/trunk/tools/irrb/doc/tut03.rst
/trunk/tools/irrb/doc/tut04.rst
/trunk/tools/irrb/doc/tutorials.rst
Modified:
/trunk/tools/irrb/doc/config.rst
/trunk/tools/irrb/doc/contents.rst
/trunk/tools/irrb/io_export_irrlicht.py
=======================================
--- /dev/null
+++ /trunk/tools/irrb/doc/tut01.rst Mon Jan 9 13:11:13 2012
@@ -0,0 +1,8 @@
+=========================
+Tutorial - Solid Material
+=========================
+
+.. toctree::
+ :maxdepth: 0
+
+Solid Material Tutorial.
=======================================
--- /dev/null
+++ /trunk/tools/irrb/doc/tut02.rst Mon Jan 9 13:11:13 2012
@@ -0,0 +1,8 @@
+=============================
+Tutorial - Multiple Materials
+=============================
+
+.. toctree::
+ :maxdepth: 0
+
+Multiple Materials Tutorial.
=======================================
--- /dev/null
+++ /trunk/tools/irrb/doc/tut03.rst Mon Jan 9 13:11:13 2012
@@ -0,0 +1,8 @@
+===============================
+Tutorial - Transparent Material
+===============================
+
+.. toctree::
+ :maxdepth: 0
+
+Transparent Material Tutorial.
=======================================
--- /dev/null
+++ /trunk/tools/irrb/doc/tut04.rst Mon Jan 9 13:11:13 2012
@@ -0,0 +1,8 @@
+==============================
+Tutorial - Basic Light Mapping
+==============================
+
+.. toctree::
+ :maxdepth: 0
+
+Basic Light Mapping Tutorial.
=======================================
--- /dev/null
+++ /trunk/tools/irrb/doc/tutorials.rst Mon Jan 9 13:11:13 2012
@@ -0,0 +1,95 @@
+=========
+Tutorials
+=========
+
+.. toctree::
+ :hidden:
+
+ tut01
+ tut02
+ tut03
+ tut04
+
+Below are a list of tutorials on how to use **irrB** with Blender.
+
+The tutorials on this wiki are NOT intended to teach you how to use
Blender.
+Even though the tutorials may mention Blender key combinations and mouse
buttons
+for certain functionality, you will be doing yourself a big favor by
spending a
+little time learning the basics of Blender. The Blender Wiki Manual is a
very
+good place to start for beginners.
+
+Before proceeding with a particular tutorial, please review the Tutorial
Setup
+located in the next section.
+
+----
+
+Tutorial List
+=============
+
+.. raw:: html
+
+ <br>
+ <table border="1" width="90%">
+ <tr>
+ <td><b>Tutorial</b></td>
+ <td><b>Description</b></td>
+ </tr>
+ <tr>
+ <td>
+ <a href="tut01.html">
+ Solid Material
+ </a>
+ </td>
+ <td>
+ Export an object with a single UV mapped texture. Also learn how
+ to bake a Blender defined material onto a UV assigned image.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="tut02.html">
+ Multiple Materials
+ </a>
+ </td>
+ <td>
+ Export an object with multiple UV mapped textures.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="tut03.html">
+ Transparent Material
+ </a>
+ </td>
+ <td>
+ Export an object with a transparent UV mapped texture.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="tut04.html">
+ Basic Light Mapping
+ </a>
+ </td>
+ <td>
+ Generate and export a lightmap to a secondary UV layer.
+ </td>
+ </tr>
+ </table>
+
+----
+
+Tutorial Setup
+==============
+
+The tutorials will use the irrb Utilities for viewing the exporter results.
+Installation instructions for the utilities may found in the irrb User
Guide.
+
+Each of irrb tutorials assume the following directory structure for
exported content:
+
+The scene file (Scene.irr) will be created inside of the specific tutorial
subdirectory.
+For irrbTut1, this will be "c:\irrbScenes\irrbTut1\Scene.irr". Each scenes
mesh
+data will be saved inside of the "mdl" sub-directory underneath the
appropriate tutorial.
+The same holds true for related images ("tex" sub-directory).
+
+For irrbTut1, the Output Directory would be setup as follows:
=======================================
--- /trunk/tools/irrb/doc/config.rst Mon Sep 26 10:03:18 2011
+++ /trunk/tools/irrb/doc/config.rst Mon Jan 9 13:11:13 2012
@@ -5,4 +5,10 @@
.. toctree::
:maxdepth: 2
-The irrB config file (.irrb).
+The config file (".irrb") is an .ini styled file that contains default
+configuration information used by **irrB**.
+
+It used to persist selected export options and also to control some of
**irrB**'s
+behavior.
+
+
=======================================
--- /trunk/tools/irrb/doc/contents.rst Fri Jan 6 11:03:38 2012
+++ /trunk/tools/irrb/doc/contents.rst Mon Jan 9 13:11:13 2012
@@ -29,6 +29,7 @@
config
notes
samples
+ tutorials
faq
changelog
=======================================
--- /trunk/tools/irrb/io_export_irrlicht.py Thu Jan 5 10:19:29 2012
+++ /trunk/tools/irrb/io_export_irrlicht.py Mon Jan 9 13:11:13 2012
@@ -267,14 +267,14 @@
'pack': False,
'makeexec': False,
'binary': False,
- 'use_blender_materials': False,
'debug': True,
'walktest': True,
'out_directory': '',
- 'mdl_directory': 'mdl',
- 'tex_directory': 'tex',
- 'scene_directory': '.',
- 'copy_images': True,
+ 'save_on_export': True,
+ },
+ 'directories': {
+ 'mdl' : 'mdl',
+ 'tex' : 'tex',
},
'scene': {
'OccludesLight': 0,
@@ -1308,10 +1308,10 @@
return tempDir
#=============================================================================
-# s e t D i r e c t o r y
+# g e t D i r e c t o r y
#=============================================================================
-def setDirectory(base, option):
- result = _G['export'][option]
+def getDirectory(base, option):
+ result = _G['directories'][option]
if (result[0] == '/') or (result.find(':') >= 0): # absolute?
result = filterDirPath(result)
else:
@@ -1326,7 +1326,9 @@
SelectedOnly, ExportLights, ExportCameras, ExportAnimations,
ExportAnimationTails, ExportPhysics, ExportPack, ExportExec,
ExportBinary,
runWalkTest, IrrlichtVersion):
- _saveConfig()
+
+ if ('save_on_export' in _G['export']) and
(_G['export']['save_on_export']):
+ _saveConfig()
if not filename.lower().endswith('.irr'):
filename += '.irr'
@@ -1334,10 +1336,10 @@
OutDirectory = filterDirPath(OutDirectory)
checkDirectory(OutDirectory)
- # setup and check scene directory
- SceneDirectory = setDirectory(OutDirectory, 'scene_directory')
- MeshDirectory = setDirectory(OutDirectory, 'mdl_directory')
- ImageDirectory = setDirectory(OutDirectory, 'tex_directory')
+ # retrieve the various directories
+ SceneDirectory = getDirectory(OutDirectory, '.')
+ MeshDirectory = getDirectory(OutDirectory, 'mdl')
+ ImageDirectory = getDirectory(OutDirectory, 'tex')
operator.report({'INFO'}, 'irrb Export')
@@ -4393,7 +4395,6 @@
if self.gExportExec:
self.gExportPack = True
- self.gCopyImages = _G['export']['copy_images']
self.gBinary = Binary
self.gDebug = Debug
self.gMeshFileName = ''
@@ -4419,8 +4420,8 @@
debug(' Scene Directory: ' + self.gSceneDir)
debug(' Mesh Directory: ' + self.gMeshDir)
debug(' Image Directory: ' + self.gTexDir)
- debug(' mdl Directory: ' + _G['export']['mdl_directory'])
- debug(' tex Directory: ' + _G['export']['tex_directory'])
+ debug(' mdl Directory: ' + _G['directories']['mdl'])
+ debug(' tex Directory: ' + _G['directories']['tex'])
debug(' Binary: ' + ('True' if self.gBinary
else 'False'))
debug(' Export Cameras: ' +
('True' if self.gExportCameras else 'False'))
@@ -4432,8 +4433,6 @@
('True' if self.gExportPack else 'False'))
debug('Export Executable: ' +
('True' if self.gExportExec else 'False'))
- debug(' Copy Images: ' +
- ('True' if self.gCopyImages else 'False'))
debug(' Run WalkTest: ' +
('True' if self.gRunWalkTest else 'False'))
debug(' Image Extension: ' + ('Original' if self.gTexExtension ==
@@ -5040,7 +5039,7 @@
return
if bImage.packed_file != None:
self._savePackedTexture(bImage, filename)
- elif self.gCopyImages:
+ else:
self._copyExternalImage(bImage, filename)
#=========================================================================
@@ -5220,7 +5219,7 @@
if self.gTexExtension != '.???':
ext = self.gTexExtension
- if (bImage.packed_file != None) or self.gCopyImages:
+ if bImage.packed_file != None:
result = os.path.relpath(self.gTexDir + fileName + ext,
self.gBaseDir)
else: