summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-04-01 20:22:25 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-04-01 20:22:25 +0300
commit580b35c8ea59187d5197e712022b706df3655f86 (patch)
treed049b555e86e00742440f9005473c381a707cbea /indra/llprimitive
parentacdca357c2a7fec60d24e1adba0dd822d7d677b9 (diff)
SL-307 Display in-viewer all warning messages logged by the mesh uploader
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llmodelloader.cpp4
-rw-r--r--indra/llprimitive/llmodelloader.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp
index 4e468ff45f..c8da68afc8 100644
--- a/indra/llprimitive/llmodelloader.cpp
+++ b/indra/llprimitive/llmodelloader.cpp
@@ -146,6 +146,7 @@ LLModelLoader::~LLModelLoader()
void LLModelLoader::run()
{
+ mWarningStream.clear();
doLoadModel();
doOnIdleOneTime(boost::bind(&LLModelLoader::loadModelCallback,this));
}
@@ -426,6 +427,7 @@ bool LLModelLoader::isRigLegacy( const std::vector<std::string> &jointListFromAs
{
LL_WARNS() << "Rigged to " << jointListFromAsset.size() << " joints, max is " << mMaxJointsPerMesh << LL_ENDL;
LL_WARNS() << "Skinning disabled due to too many joints" << LL_ENDL;
+ mWarningStream << "Skinning disabled due to too many joints, maximum amount per mesh: " << mMaxJointsPerMesh << "\n";
return false;
}
@@ -437,12 +439,14 @@ bool LLModelLoader::isRigLegacy( const std::vector<std::string> &jointListFromAs
if (mJointMap.find(*it)==mJointMap.end())
{
LL_WARNS() << "Rigged to unrecognized joint name " << *it << LL_ENDL;
+ mWarningStream << "Rigged to unrecognized joint name " << *it << "\n";
unknown_joint_count++;
}
}
if (unknown_joint_count>0)
{
LL_WARNS() << "Skinning disabled due to unknown joints" << LL_ENDL;
+ mWarningStream << "Skinning disabled due to unknown joints\n";
return false;
}
diff --git a/indra/llprimitive/llmodelloader.h b/indra/llprimitive/llmodelloader.h
index 643c45a6d8..8dde176b54 100644
--- a/indra/llprimitive/llmodelloader.h
+++ b/indra/llprimitive/llmodelloader.h
@@ -185,6 +185,9 @@ public:
return name != NULL && mJointMap.find(name) != mJointMap.end();
}
+ std::string logOut() { return mWarningStream.str(); }
+ void clearLog() { mWarningStream.clear(); }
+
protected:
LLModelLoader::load_callback_t mLoadCallback;
@@ -201,6 +204,8 @@ protected:
JointTransformMap mJointTransformMap;
+ std::ostringstream mWarningStream; // preview floater will pull logs from here
+
static std::list<LLModelLoader*> sActiveLoaderList;
static bool isAlive(LLModelLoader* loader) ;
};