[tubras] r1907 committed - irrB - Added node visibility option. Doc updates.

6 views
Skip to first unread message

tub...@googlecode.com

unread,
Jan 14, 2012, 2:36:52 PM1/14/12
to tubras-s...@googlegroups.com
Revision: 1907
Author: pc0der
Date: Sat Jan 14 11:34:59 2012
Log: irrB - Added node visibility option. Doc updates.

http://code.google.com/p/tubras/source/detail?r=1907

Added:
/trunk/tools/irrb/doc/_static/img028.png
/trunk/tools/irrb/doc/_static/img029.png
Modified:
/trunk/tools/irrb/doc/_static/img001.png
/trunk/tools/irrb/doc/_static/img005.png
/trunk/tools/irrb/doc/_templates/index.html
/trunk/tools/irrb/doc/billboard.rst
/trunk/tools/irrb/doc/camlight.rst
/trunk/tools/irrb/doc/fog.rst
/trunk/tools/irrb/doc/install.rst
/trunk/tools/irrb/doc/object_panel.rst
/trunk/tools/irrb/doc/outgen.rst
/trunk/tools/irrb/doc/skyboxdome.rst
/trunk/tools/irrb/doc/start.rst
/trunk/tools/irrb/io_export_irrlicht.py

=======================================
--- /dev/null
+++ /trunk/tools/irrb/doc/_static/img028.png Sat Jan 14 11:34:59 2012
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/tools/irrb/doc/_static/img029.png Sat Jan 14 11:34:59 2012
Binary file, no diff available.
=======================================
--- /trunk/tools/irrb/doc/_static/img001.png Tue Feb 1 07:35:11 2011
+++ /trunk/tools/irrb/doc/_static/img001.png Sat Jan 14 11:34:59 2012
Binary file, no diff available.
=======================================
--- /trunk/tools/irrb/doc/_static/img005.png Sun Dec 11 16:19:48 2011
+++ /trunk/tools/irrb/doc/_static/img005.png Sat Jan 14 11:34:59 2012
Binary file, no diff available.
=======================================
--- /trunk/tools/irrb/doc/_templates/index.html Thu Nov 3 23:28:38 2011
+++ /trunk/tools/irrb/doc/_templates/index.html Sat Jan 14 11:34:59 2012
@@ -93,21 +93,11 @@
</table>
</div>

-<p>
- You may also download a
- <a href="http://tubras.googlecode.com/files/irrBdoc-0.6.pdf">PDF
version</a>
- of this documentation.
-</p>
-
<h2>Tutorials</h2>
-<p>Links to <b>irrB</b> tutorials can be found on the
+<p>Links to <b>irrB</b> tutorials are located in the
<a href="{{ pathto("tutorials") }}" target="_blank">irrB Tutorials</a>
overview page.
</p>

-<p>
- Individual Tutorial Links.
-</p>
-
<h2>Get irrB</h2>
<p>
<b>irrB</b> is available as a download from the Tubras Google Code
Project
@@ -115,6 +105,8 @@
page.
</p>
<p>You can view the <b>irrB</b> Python source code in the Subversion
repository located at
-
<tt>http://tubras.googlecode.com/svn/trunk/tools/irrb/io_export_irrlicht.py</tt>.
+ <a
href=http://tubras.googlecode.com/svn/trunk/tools/irrb/io_export_irrlicht.py>
+ http://tubras.googlecode.com/svn/trunk/tools/irrb/io_export_irrlicht.py
+ </a>.
</p>
{% endblock %}
=======================================
--- /trunk/tools/irrb/doc/billboard.rst Wed Jan 4 16:11:58 2012
+++ /trunk/tools/irrb/doc/billboard.rst Sat Jan 14 11:34:59 2012
@@ -15,11 +15,11 @@

**1.** Add a plane mesh to your scene at the position you would like the
billboard to appear. The scale and rotation are ignored by **irrB**.

- **2.** Create an UV map for the plane and assign it an image using
Blender's UV/Image Editor.
+ **2.** Create a UV map for the plane and assign it an image using
Blender's UV/Image Editor.
The actual UV coordinates are ignored by **irrB**, but you must assigned
an image to the UV map.

**3.** Set the irrB Object Type to "Billboard" in the **irrB** object
sub-panel. Once the object
- type is set to "Billboard", you then define the width, height, vertex
(shade) colors.
+ type is set to "Billboard", you may then define the width, height, and
vertex (shade) colors.

----

@@ -34,5 +34,5 @@
and you would like the billboard to be transparent as well, simply create a
new Blender material and assign it to the billboard plane mesh.

-In the **irrB** material properties sub-panel, assign the material type to
+In the **irrB** material properties sub-panel, set the material type to
either "trans_alphach" or "trans_alphach_ref" depending on your
requirements.
=======================================
--- /trunk/tools/irrb/doc/camlight.rst Wed Jan 4 16:11:58 2012
+++ /trunk/tools/irrb/doc/camlight.rst Sat Jan 14 11:34:59 2012
@@ -7,8 +7,8 @@
:maxdepth: 2

**irrB** allows camera and light node data to be exported to scene files.
Camera
-and light data is only exported when the corresponding is selected in
**irrB**'s
-export sub-panel.
+and light data is only exported when the corresponding option is selected
in
+**irrB**'s export sub-panel.

Irrlicht camera and light specific properties may be set in **irrB**'s
object
sub-panel.
=======================================
--- /trunk/tools/irrb/doc/fog.rst Thu Jan 5 11:09:48 2012
+++ /trunk/tools/irrb/doc/fog.rst Sat Jan 14 11:34:59 2012
@@ -33,4 +33,11 @@

In addition to the "global" fog settings, fog may also be enabled/disabled
at
the material level. If global fog (mist) is enabled and a material's fog
setting
-is disabled, that particular material will not be rendered with fog.
+is disabled, then that particular material will not be rendered with fog.
+
+.. container:: irrb-left
+
+ .. figure:: _static/img029.png
+
+ Sample Fog .blend file - `08-Fog.blend
<http://tubras.googlecode.com/svn/trunk/tools/blendfiles/26/08-Fog.blend>`_
+
=======================================
--- /trunk/tools/irrb/doc/install.rst Mon Dec 26 10:59:32 2011
+++ /trunk/tools/irrb/doc/install.rst Sat Jan 14 11:34:59 2012
@@ -18,18 +18,16 @@
The contents of the zip package are:

* io_export_irrlicht.py
-* docs/changes.txt
-* docs/license.html
-* docs/UserGuide.pdf
+* docs/{html documentation files}

To install **irrB**, unzip the contents of the zip file into a temporary
directory
and install it as a Blender **addon**.

1. Start Blender and call up the **User Preferences** dialog (File | User
Preferences..).
-2. Click on the **Add-Ons** tab and then the **Install Add-On...** button
located at
+2. Click on the **Addons** tab and then the **Install Addon...** button
located at
the bottom of the dialog.
3. Navigate to the directory where you previously unzipped the **irrB**
zip file into, select
- the file **io_export_irrlicht.py**, and then click the **Install
Add-On...** button.
+ the file **io_export_irrlicht.py**, and then click the **Install
Addon...** button.
4. Locate the **irrB** exporter in the **Import-Export** section and
enable it by selecting
the corresponding check box.

=======================================
--- /trunk/tools/irrb/doc/object_panel.rst Wed Dec 28 11:31:36 2011
+++ /trunk/tools/irrb/doc/object_panel.rst Sat Jan 14 11:34:59 2012
@@ -50,24 +50,32 @@
Blender allows you to attach "custom" integer, string, bool, and/or float
properties to any Blender object. When **irrB** detects that an object
contains
custom Blender properties, those properties are then exported into the
-corresponding scene nodes "user attributes".
+corresponding scene nodes "user data" section.

This is useful for adding custom data that has meaning specific to your
application. For example, "spawn points":

-* Add a Blender "empty" object to a scene.
-* Add a custom boolean object property to the empty object named "spawn"
- and set it to "True".
-* Your application code could then include code that looks for scene nodes
- with an attribute named "spawn" that was set to "True" and act
- accordingly.
+ * Add a Blender "empty" object to a scene.
+
+ * Add a custom boolean object property to the empty object named "spawn"
+ and set it to "True".
+
+ * Your application code could then include code that looks for scene nodes
+ with an attribute named "spawn" that was set to "True" and act
accordingly.
+
+Additional information on adding custom properties may be found in the
section
+named :doc:`Custom Properties </custom>`

Common Options
==============

-**Export Object** - Indicator used to control whether or not a object is
+**Export Object** - Indicator used to control whether or not an object is
exported.

+**Visible** - Indicator used to control whether or not an object is
initially
+visible. If un-checked, the object is still exported but won't be visible
in
+the scene until it is programatically set to be visible.
+
**ID** - An arbitrary integer that may be used by your application to
locate a specific scene node or group of scene nodes.

=======================================
--- /trunk/tools/irrb/doc/outgen.rst Sat Jan 14 09:15:14 2012
+++ /trunk/tools/irrb/doc/outgen.rst Sat Jan 14 11:34:59 2012
@@ -15,16 +15,16 @@
**irrB** allows you to choose a single Output Directory. Depending on
whether
or not you choose to export a scene file, **irrB** behaves as follows:

- **Create Scene File** - Not Selected. All mesh files (.irrmesh) and
packed
- images are saved to the Output Directory location.
-
- **Create Scene File** - Selected. All mesh files (.irrmesh) are saved to
+ Create Scene File **Enabled** - All mesh files (.irrmesh) are saved to
a sub-directory named **mdl** (model) underneath the Output Directory
location.
All packed textures are saved to a sub-directory named **tex** underneath
the
Output Directory location.
+
+ Create Scene File **Disabled** All mesh files (.irrmesh) and packed
+ images are saved to the Output Directory location.

Given:
- 1. You are exporting a singe scene named "test".
+ 1. You are exporting a single scene named "test".

2. The scene contains a single cube named "Cube", and a packed texture
named "checkers.png".

@@ -32,9 +32,9 @@

The following will be generated:

- * c:/scenes/test.irr // scene file
- * c:/scenes/mdl/Cube.irrmesh // Cube mesh
- * c:/scenes/tex/checkers.png // checkers texture
+ * c:\\scenes\\test.irr // scene file
+ * c:\\scenes\\mdl\\Cube.irrmesh // Cube mesh
+ * c:\\scenes\\tex\\checkers.png // checkers texture

All mesh and texture references will be relative to the "Out Directory".
In the example above, the test.irr scene file will reference the Cube mesh
as "mdl/Cube.irrmesh"::
@@ -72,15 +72,20 @@
The original image ("c:\\myimages\\patterns\\bricks.png") is copied to the
texture directory underneath the output directory: "{out
directory}/tex/bricks.png".

-Images that have the same name but are stored in different directories, are
-written to the texture directory using Blender's internally assigned file
name.
+Images that have the same name but are stored in different directories are
+written to the texture directory using Blender's internally assigned file
name. This
+will prevent images with the same name from being overwritten.

----

Packed Output
=============
-**irrB** contains an option named "Pack Files" located in the export
panel. When
+**irrB** contains an export option named "Pack Files" located in the
export panel. When
selected, **irrB** exports/writes all of the scene, model, and texture
files
following the rules outlined above. After all of the files have been
written
and image files copied, **irrB** then packs (zip) all of the files into a
-single file and names the file "{scene name}.zip".
+single file and names the file "{scene name}.zip".
+
+After the files have been packed, **irrB** then deletes the original files
that
+were written to the output directory.
+
=======================================
--- /trunk/tools/irrb/doc/skyboxdome.rst Wed Jan 4 16:11:58 2012
+++ /trunk/tools/irrb/doc/skyboxdome.rst Sat Jan 14 11:34:59 2012
@@ -62,3 +62,10 @@
The sky dome material should have "Fog" disabled in the **irrB** sub-panel
to prevent the image from being affected by fog. If sky dome image
appears
as a solid color, the materials "Fog" setting is likely enabled.
+
+.. container:: irrb-left
+
+ .. figure:: _static/img028.png
+
+ Sample Skybox/dome .blend file - `03-SkyBoxDome.blend
<http://tubras.googlecode.com/svn/trunk/tools/blendfiles/26/03-SkyBoxDome.blend>`_
+
=======================================
--- /trunk/tools/irrb/doc/start.rst Fri Dec 30 12:56:27 2011
+++ /trunk/tools/irrb/doc/start.rst Sat Jan 14 11:34:59 2012
@@ -14,7 +14,12 @@
written to the Irrlicht scene file.

Before you start using **irrB** you should at the very least have a
-fundamental understanding of how to use Blender.
+fundamental understanding of how to use Blender. Some good resources and
tutorials
+for learning Blender include:
+
+ * `Blender Art Magazine <http://blenderart.org>`_
+ * `Blender Cookie <http://cgcookie.com/blender>`_
+ * `Blender Tutorials <http://www.blender.org/education-help/tutorials>`_

In order to better understand how **irrB** works with Blender, it will help
you to know the relationship between Blenders "Objects" and "Object Data".
=======================================
--- /trunk/tools/irrb/io_export_irrlicht.py Sat Jan 14 09:15:14 2012
+++ /trunk/tools/irrb/io_export_irrlicht.py Sat Jan 14 11:34:59 2012
@@ -7,7 +7,7 @@
# Additional Unlicense information may be found at http://unlicense.org.

#=============================================================================
bl_info = {
- 'name': 'Irrlicht format',
+ 'name': 'Export: Irrlicht Format',
'description': 'Export Irrlicht Scene/Mesh Data (.irr/.irrmesh)',
'author': 'Keith Murray (pc0de)',
'version': (0, 6),
@@ -1579,6 +1579,10 @@
description='Export object to scene', default=True,
options=emptySet)

+ bpy.types.Object.irrb_node_visible = BoolProperty(name='Visible',
+ description='Initial visibility of the object', default=True,
+ options=emptySet)
+
bpy.types.Object.irrb_node_id = IntProperty(name='Node ID',
description='Object scene node id', default=-1,
options=emptySet)
@@ -2741,7 +2745,7 @@

self._iwrite(file, 'int', 'Id', bObject.irrb_node_id, i2)

- self._iwrite(file, 'bool', 'Visible', 1, i2)
+ self._iwrite(file, 'bool', 'Visible', bObject.irrb_node_visible,
i2)

file.write(i2 + '<vector3d name="Position" ' \
'value="{}"/>\n'.format(spos))
@@ -4490,9 +4494,10 @@
if bObject.layers[i]]
ccount = _getConstraintCount(bObject)
debug('Object ({}): ' \
- 'Name={}, Type={}, Export={}, Layers={}, NodeAnim={}, ' \
+ 'Name={}, Type={}, Export={}, Visible={}, Layers={},
NodeAnim={}, ' \
'Constraints={}'.format(idx,
bObject.name, bObject.type, bObject.irrb_node_export,
+ bObject.irrb_node_visible,
str(olayers), _hasNodeAnimations(bObject), ccount))
if ccount > 0:
ccount = 1
@@ -5952,6 +5957,14 @@
if not obj.irrb_node_export:
return

+ split = layout.split()
+ lcol = split.column()
+ sub = lcol.column()
+ sub.label(text='Visible')
+ rcol = split.column()
+ sub = rcol.column()
+ sub.prop(obj, 'irrb_node_visible', text='')
+
row = layout.row()
row.label(text='ID')
row.prop(obj, 'irrb_node_id')

Reply all
Reply to author
Forward
0 new messages