summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d1a7ba861b..660157df1e 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1607,12 +1607,17 @@ void LLModelLoader::run()
bool LLModelLoader::isNodeAJoint( domNode* pNode )
{
+ if ( pNode->getName() == NULL)
+ {
+ return false;
+ }
+
if ( mJointMap.find( pNode->getName() ) != mJointMap.end() )
{
return true;
}
- return false;
+ return false;
}
void LLModelLoader::extractTranslation( domTranslate* pTranslate, LLMatrix4& transform )
@@ -1632,6 +1637,12 @@ void LLModelLoader::extractTranslationViaElement( daeElement* pTranslateElement,
void LLModelLoader::processJointNode( domNode* pNode, std::map<std::string,LLMatrix4>& jointTransforms )
{
+ if (pNode->getName() == NULL)
+ {
+ llwarns << "nameless node, can't process" << llendl;
+ return;
+ }
+
//llwarns<<"ProcessJointNode# Node:" <<pNode->getName()<<llendl;
//1. handle the incoming node - extract out translation via SID or element
@@ -2127,7 +2138,10 @@ void LLModelPreview::rebuildUploadData()
mTextureSet.clear();
//fill uploaddata instance vectors from scene data
+
+ std::string requested_name = mFMP->getChild<LLUICtrl>("description_form")->getValue().asString();
+
LLSpinCtrl* scale_spinner = mFMP->getChild<LLSpinCtrl>("import_scale");
if (!scale_spinner)
@@ -2171,6 +2185,10 @@ void LLModelPreview::rebuildUploadData()
LLModelInstance instance = *model_iter;
LLModel* base_model = instance.mModel;
+ if (base_model)
+ {
+ base_model->mRequestedLabel = requested_name;
+ }
S32 idx = 0;
for (idx = 0; idx < mBaseModel.size(); ++idx)
@@ -4131,7 +4149,7 @@ void LLFloaterModelPreview::onBrowseLOD(void* data)
void LLFloaterModelPreview::onUpload(void* user_data)
{
LLFloaterModelPreview* mp = (LLFloaterModelPreview*) user_data;
-
+
mp->mModelPreview->rebuildUploadData();
gMeshRepo.uploadModel(mp->mModelPreview->mUploadData, mp->mModelPreview->mPreviewScale,