summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-10-21 16:23:07 +0200
committerTreeki <treeki@gmail.com>2011-10-21 16:23:07 +0200
commit3887d40e03f13ffc7941ef22bda6de13395fd285 (patch)
tree6bc60a3bda0b0493353df4a785da8e3fe33a7bda
parentd590b9b25d60a641fdb3959764306a2bc7ef8ed2 (diff)
downloadnw4rtools-3887d40e03f13ffc7941ef22bda6de13395fd285.tar.gz
nw4rtools-3887d40e03f13ffc7941ef22bda6de13395fd285.zip
fixed obj exporter for matrix-less shapes
-rw-r--r--NW4RTools/ObjExporter.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/NW4RTools/ObjExporter.cs b/NW4RTools/ObjExporter.cs
index 214f84a..7b1afef 100644
--- a/NW4RTools/ObjExporter.cs
+++ b/NW4RTools/ObjExporter.cs
@@ -118,7 +118,9 @@ namespace NW4RTools {
// get the Matrix to use
// todo: how to apply this?!
- Matrix m = CurrentModel.Nodes[CurrentModel.MatrixIDtoNodeID[shape.MatrixID]].NodeMatrix;
+ if (shape.MatrixID != -1) {
+ Matrix m = CurrentModel.Nodes[CurrentModel.MatrixIDtoNodeID[shape.MatrixID]].NodeMatrix;
+ }
// now parse the second DisplayList