Support relative filenames in serialization
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3709 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
649dfc93a1
commit
07de425732
|
@ -777,7 +777,15 @@ void CAnimatedMeshSceneNode::serializeAttributes(io::IAttributes* out, io::SAttr
|
|||
{
|
||||
IAnimatedMeshSceneNode::serializeAttributes(out, options);
|
||||
|
||||
out->addString("Mesh", SceneManager->getMeshCache()->getMeshName(Mesh).getPath().c_str());
|
||||
if (options && (options->Flags&io::EARWF_USE_RELATIVE_PATHS) && options->Filename)
|
||||
{
|
||||
const io::path path = SceneManager->getFileSystem()->getRelativeFilename(
|
||||
SceneManager->getFileSystem()->getAbsolutePath(SceneManager->getMeshCache()->getMeshName(Mesh).getPath()),
|
||||
options->Filename);
|
||||
out->addString("Mesh", path.c_str());
|
||||
}
|
||||
else
|
||||
out->addString("Mesh", SceneManager->getMeshCache()->getMeshName(Mesh).getPath().c_str());
|
||||
out->addBool("Looping", Looping);
|
||||
out->addBool("ReadOnlyMaterials", ReadOnlyMaterials);
|
||||
out->addFloat("FramesPerSecond", FramesPerSecond);
|
||||
|
|
Loading…
Reference in New Issue