diff --git a/Moviesandbox.exe b/Moviesandbox.exe
index 5b024c5..36f8088 100644
Binary files a/Moviesandbox.exe and b/Moviesandbox.exe differ
diff --git a/classes/sceneData.cpp b/classes/sceneData.cpp
index 0a08248..b3479fb 100644
--- a/classes/sceneData.cpp
+++ b/classes/sceneData.cpp
@@ -1369,7 +1369,14 @@ void SceneData::loadMeshes(std::string path, std::string fileName){
for ( ; element!=NULL ;element=element->NextSiblingElement("ColladaMesh")){
string meshID=element->Attribute("meshID");
string meshFileName=element->Attribute("meshFilename");
- colladaLoader->loadColladaMesh(path+meshFileName, meshID);
+ //try relative path first
+ bool worked = colladaLoader->loadColladaMesh(path+meshFileName, meshID);
+ if (!worked){
+ worked = colladaLoader->loadColladaMesh(meshFileName, meshID);
+ //then try absolute path
+ if (!worked)
+ cout <<"ERROR loading colladaMesh:" << meshFileName << endl;
+ }
cout << "loaded mesh " << meshID << " from path " << path+meshFileName << endl;
}
@@ -1380,8 +1387,16 @@ void SceneData::loadMeshes(std::string path, std::string fileName){
for ( ; element!=NULL ;element=element->NextSiblingElement("SpriteMesh")){
string meshID=element->Attribute("meshID");
string meshFileName=element->Attribute("meshFilename");
- spriteMeshLoader->loadSpriteMesh(path+meshFileName, meshID);
- cout << "loaded sprite mesh " << meshID << " from path " << path+meshFileName << endl;
+ //try relative path first
+ bool worked = spriteMeshLoader->loadSpriteMesh(path+meshFileName, meshID);
+ //the try absolute path
+ if (!worked){
+ worked = spriteMeshLoader->loadSpriteMesh(meshFileName, meshID);
+ if (!worked)
+ cout <<"ERROR loading spriteMesh:" << meshFileName << endl;
+ }
+ if (worked)
+ cout << "loaded sprite mesh " << meshID << " from path " << path+meshFileName << endl;
}
element=hRoot.FirstChild( "SpriteMeshXML" ).Element();
diff --git a/projects/emptyProject/blank.scene b/projects/emptyProject/blank.scene
index 45e176c..a4b8ea1 100644
--- a/projects/emptyProject/blank.scene
+++ b/projects/emptyProject/blank.scene
@@ -122,7 +122,7 @@
vec3f 0.000000 0.000000 0.000000
string NULL
mat4f 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 4.368554 0.205743 3.747671 1.000000
- string untitled4
+ string chair
13SkeletalActor
actor* -1
diff --git a/projects/emptyProject/my.project b/projects/emptyProject/my.project
index cf70203..7e48ee4 100644
--- a/projects/emptyProject/my.project
+++ b/projects/emptyProject/my.project
@@ -1,7 +1,7 @@
-
+