From e49156a074f951cbca755f2a445b5e1510e0118c Mon Sep 17 00:00:00 2001 From: Drake Arconis Date: Fri, 22 Aug 2014 00:29:46 -0400 Subject: [PATCH] Fix mesh upload broken by # --- indra/newview/llfloatermodelpreview.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 26f4c136c..da11cbaf9 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1446,8 +1446,11 @@ bool LLModelLoader::doLoadModel() } //no suitable slm exists, load from the .dae file + //replace illegal # in path as collada's escapser is broken + std::string tmp_file = mFilename; + boost::replace_all(tmp_file, "#", "%23"); DAE dae; - domCOLLADA* dom = dae.open(mFilename); + domCOLLADA* dom = dae.open(tmp_file); if (!dom) { @@ -1474,7 +1477,7 @@ bool LLModelLoader::doLoadModel() daeInt count = db->getElementCount(NULL, COLLADA_TYPE_MESH); - daeDocument* doc = dae.getDoc(mFilename); + daeDocument* doc = dae.getDoc(tmp_file); if (!doc) { llwarns << "can't find internal doc" << llendl;