diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llmeshrepository.cpp | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 18 |
3 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e045cf6729..6c01f0c09a 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3098,6 +3098,7 @@ void LLModelPreview::rebuildUploadData() std::string requested_name = mFMP->getChild<LLUICtrl>("description_form")->getValue().asString(); + std::string metric = mFMP->getChild<LLUICtrl>("model_category_combo")->getValue().asString(); LLSpinCtrl* scale_spinner = mFMP->getChild<LLSpinCtrl>("import_scale"); @@ -3159,6 +3160,7 @@ void LLModelPreview::rebuildUploadData() if (base_model) { base_model->mRequestedLabel = requested_name; + base_model->mMetric = metric; } S32 idx = 0; @@ -5593,6 +5595,10 @@ void LLFloaterModelPreview::onPermissionsReceived(const LLSD& result) mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty()); getChild<LLTextBox>("warning_title")->setVisible(!mHasUploadPerm); getChild<LLTextBox>("warning_message")->setVisible(!mHasUploadPerm); + + // Hide the accounting info if upload is not permitted. + getChild<LLTextBox>("weights_text")->setVisible(mHasUploadPerm); + getChild<LLTextBox>("weights")->setVisible(mHasUploadPerm); } void LLFloaterModelPreview::setPermissonsErrorStatus(U32 status, const std::string& reason) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 7ddc0db20d..b887842652 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1321,6 +1321,7 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) std::map<LLModel*,S32> mesh_index; std::string model_name; + std::string model_metric; S32 instance_num = 0; @@ -1342,6 +1343,11 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) model_name = data.mBaseModel->getName(); } + if (model_metric.empty()) + { + model_metric = data.mBaseModel->getMetric(); + } + std::stringstream ostr; LLModel::Decomposition& decomp = @@ -1455,6 +1461,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) if (model_name.empty()) model_name = "mesh model"; result["name"] = model_name; + if (model_metric.empty()) model_metric = "MUT_Other"; + result["metric"] = model_metric; result["asset_resources"] = res; dump_llsd_to_file(result,make_dump_name("whole_model_",dump_num)); diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index 0b7b4c684c..bfa245cbc1 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -32,6 +32,22 @@ </text> <line_editor bottom_delta="20" follows="top|left|right" height="19" max_length_bytes="64" name="description_form" prevalidate_callback="ascii" width="290" /> + + <text bottom_delta="20" left="15" follows="left|top" height="15" name="model_category_label" text_color="White"> + What does this model represent? + </text> + <combo_box top_pad="1" follows="left|top" height="23" + name="model_category_combo" width="200"> + <combo_box.drop_down_button + label_color="White"/> + <combo_item name="Avatar shape" label="Avatar shape" value="MUT_AvatarShape"/> + <combo_item name="Avatar attachment" label="Avatar attachment" value="MUT_AvatarAttachment"/> + <combo_item name="Building Component" label="Building Component" value="MUT_BuildingComponent"/> + <combo_item name="Moving object (vehicle, animal)" label="Moving object (vehicle, animal)" value="MUT_MovingObject"/> + <combo_item name="Large, non moving etc" label="Large, non moving etc" value="MUT_LargeStationary"/> + <combo_item name="Smaller, non-moving etc" label="Smaller, non-moving etc" value="MUT_SmallStationary"/> + <combo_item name="Not really any of these" label="Not really any of these" value="MUT_Other"/> + </combo_box> <text bottom_delta="20" left="15" follows="left|top" height="15" name="lod_label"> Preview: @@ -96,7 +112,7 @@ <text height="65" - top_delta="45" + top_delta="0" left_delta="0" name="weights_text" width="80" |