http://code.google.com/p/tubras/source/detail?r=1906
Deleted:
/trunk/tools/irrb/doc/config.rst
Modified:
/trunk/tools/irrb/doc/contents.rst
/trunk/tools/irrb/doc/outgen.rst
/trunk/tools/irrb/io_export_irrlicht.py
=======================================
--- /trunk/tools/irrb/doc/config.rst Mon Jan 9 13:11:13 2012
+++ /dev/null
@@ -1,14 +0,0 @@
-============
-irrB Config
-============
-
-.. toctree::
- :maxdepth: 2
-
-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 Mon Jan 9 13:11:13 2012
+++ /trunk/tools/irrb/doc/contents.rst Sat Jan 14 09:15:14 2012
@@ -26,7 +26,6 @@
fog
physics
utilities
- config
notes
samples
tutorials
=======================================
--- /trunk/tools/irrb/doc/outgen.rst Sat Dec 31 11:37:27 2011
+++ /trunk/tools/irrb/doc/outgen.rst Sat Jan 14 09:15:14 2012
@@ -48,7 +48,12 @@
<buffer>
<material bmat="uvmat:grid.png:00100">
<texture name="Texture1" value="tex/grid.png"/>
-
+
+.. note::
+
+ The "**mdl**" and "**tex**" directory names may be overridden by creating
custom
+ scene string attributes named "**irrb_mdl**" and "**irrb_tex**"
respectively.
+
----
Image Copying
=======================================
--- /trunk/tools/irrb/io_export_irrlicht.py Wed Jan 11 09:06:40 2012
+++ /trunk/tools/irrb/io_export_irrlicht.py Sat Jan 14 09:15:14 2012
@@ -272,27 +272,12 @@
'out_directory': '',
'save_on_export': True,
},
- 'directories': {
- 'mdl' : 'mdl',
- 'tex' : 'tex',
- },
- 'scene': {
- 'OccludesLight': 0,
- },
'walktest': {
'show_help' : True,
'show_debug' : True,
'vsync' : True,
'antialias' : True,
},
- 'standard': {
- 'Id': -1,
- 'AutomaticCulling': 1,
- 'Visible': 1,
- 'DebugDataVisible': 0,
- 'IsDebugObject': 0,
- 'ReadOnlyMaterials': 0,
- },
}
defSceneAttributes = {
@@ -1316,8 +1301,12 @@
#=============================================================================
# g e t D i r e c t o r y
#=============================================================================
-def getDirectory(base, option):
- result = _G['directories'][option]
+def getDirectory(scene, base, dname):
+ result = dname
+ attr = 'irrb_{}'.format(dname)
+ if (attr in scene.keys()) and isinstance(scene[attr], str):
+ result = scene[attr]
+
if (result[0] == '/') or (result.find(':') >= 0): # absolute?
result = filterDirPath(result)
else:
@@ -1344,8 +1333,8 @@
# retrieve the various directories
SceneDirectory = OutDirectory
- MeshDirectory = getDirectory(OutDirectory, 'mdl')
- ImageDirectory = getDirectory(OutDirectory, 'tex')
+ MeshDirectory = getDirectory(context.scene, OutDirectory, 'mdl')
+ ImageDirectory = getDirectory(context.scene, OutDirectory, 'tex')
operator.report({'INFO'}, 'irrb Export')
@@ -4430,8 +4419,6 @@
debug(' Scene Directory: ' + self.gSceneDir)
debug(' Mesh Directory: ' + self.gMeshDir)
debug(' Image Directory: ' + self.gTexDir)
- 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'))