Browse Source

loadSkeleton now returns the loaded Skeleton

Ivan Safrin 11 years ago
parent
commit
22d66b9420
2 changed files with 3 additions and 2 deletions
  1. 1 1
      Core/Contents/Include/PolySceneMesh.h
  2. 2 1
      Core/Contents/Source/PolySceneMesh.cpp

+ 1 - 1
Core/Contents/Include/PolySceneMesh.h

@@ -102,7 +102,7 @@ namespace Polycode {
 			* Loads a skeleton from a file and applies it to the scene mesh.
 			* @param fileName Filename to load the skeleton from.
 			*/
-			void loadSkeleton(const String& fileName);
+			Skeleton *loadSkeleton(const String& fileName);
 			
 			/**
 			* Sets the texture from an existing Texture instance.

+ 2 - 1
Core/Contents/Source/PolySceneMesh.cpp

@@ -222,10 +222,11 @@ ShaderBinding *SceneMesh::getLocalShaderOptions() {
 	return localShaderOptions;
 }
 
-void SceneMesh::loadSkeleton(const String& fileName) {
+Skeleton *SceneMesh::loadSkeleton(const String& fileName) {
 	skeleton = new Skeleton(fileName);
 	addChild(skeleton);
 	setSkeleton(skeleton);
+    return skeleton;
 }
 
 void SceneMesh::setSkeleton(Skeleton *skeleton) {