diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 44 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 222 |
3 files changed, 136 insertions, 131 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index d53b0c1155..f99b42ab2c 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -346,6 +346,10 @@ BOOL LLFloaterModelPreview::postBuild() childSetVisible("skin_too_many_joints", false); childSetVisible("skin_unknown_joint", false); + childSetVisible("warning_title", false); + childSetVisible("warning_message", false); + childSetVisible("status", false); + initDecompControls(); LLView* preview_panel = getChild<LLView>("preview_panel"); @@ -656,6 +660,7 @@ void LLFloaterModelPreview::onJointListSelection() joint_pos_descr->setTextArg("[JOINT]", label); } + // Note: We can make a version of renderBones() to highlight selected joint } void LLFloaterModelPreview::onDescriptionKeystroke(LLUICtrl* ctrl) @@ -1440,21 +1445,22 @@ void LLFloaterModelPreview::clearOverridesTab() LLPanel *panel = mTabContainer->getPanelByName("overrides_panel"); LLScrollListCtrl *joints_list = panel->getChild<LLScrollListCtrl>("joints_list"); joints_list->deleteAllItems(); + LLScrollListCtrl *joints_pos = panel->getChild<LLScrollListCtrl>("pos_overrides_list"); + joints_pos->deleteAllItems(); + for (U32 i = 0; i < LLModel::NUM_LODS; ++i) { mJointOverrides[i].clear(); } -} -void LLFloaterModelPreview::resetOverridesTab() -{ - clearOverridesTab(); + LLTextBox *joint_total_descr = panel->getChild<LLTextBox>("conflicts_description"); + joint_total_descr->setTextArg("[CONFLICTS]", llformat("%d", 0)); + joint_total_descr->setTextArg("[JOINTS_COUNT]", llformat("%d", 0)); - for (U32 i = 0; i < LLModel::NUM_LODS; ++i) - { - mJointOverrides[i].clear(); - } + + LLTextBox *joint_pos_descr = panel->getChild<LLTextBox>("pos_overrides_descr"); + joint_pos_descr->setTextArg("[JOINT]", std::string("mPelvis")); // Might be better to hide it } void LLFloaterModelPreview::updateOverridesTab() @@ -1507,6 +1513,10 @@ void LLFloaterModelPreview::updateOverridesTab() if (joints_list->isEmpty()) { // Populate table + + std::map<std::string, std::string> joint_alias_map; + mModelPreview->getJointAliases(joint_alias_map); + S32 conflicts = 0; joint_override_data_map_t::iterator joint_iter = mJointOverrides[display_lod].begin(); joint_override_data_map_t::iterator joint_end = mJointOverrides[display_lod].end(); @@ -1520,8 +1530,14 @@ void LLFloaterModelPreview::updateOverridesTab() LLScrollListCell::Params cell_params; cell_params.font = LLFontGL::getFontSansSerif(); cell_params.value = listName; + if (joint_alias_map.find(listName) == joint_alias_map.end()) + { + // Missing names + cell_params.color = LLColor4::red; + } if (joint_iter->second.mHasConflicts) { + // Conflicts cell_params.color = LLColor4::orange; conflicts++; } @@ -1533,9 +1549,9 @@ void LLFloaterModelPreview::updateOverridesTab() } joints_list->selectFirstItem(); - LLTextBox *joint_pos_descr = panel->getChild<LLTextBox>("conflicts_description"); - joint_pos_descr->setTextArg("[CONFLICTS]", llformat("%d", conflicts)); - joint_pos_descr->setTextArg("[JOINTS_COUNT]", llformat("%d", mJointOverrides[display_lod].size())); + LLTextBox *joint_conf_descr = panel->getChild<LLTextBox>("conflicts_description"); + joint_conf_descr->setTextArg("[CONFLICTS]", llformat("%d", conflicts)); + joint_conf_descr->setTextArg("[JOINTS_COUNT]", llformat("%d", mJointOverrides[display_lod].size())); } } @@ -2466,7 +2482,7 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) } else { - fmp->resetOverridesTab(); + fmp->clearOverridesTab(); } if (lock_scale_if_joint_position) @@ -4226,7 +4242,7 @@ BOOL LLModelPreview::render() mFMP->childSetValue("lock_scale_if_joint_position", false); if (fmp) { - fmp->resetOverridesTab(); + fmp->clearOverridesTab(); } } @@ -4868,7 +4884,7 @@ void LLFloaterModelPreview::onReset(void* user_data) LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) user_data; fmp->childDisable("reset_btn"); fmp->clearLogTab(); - fmp->resetOverridesTab(); + fmp->clearOverridesTab(); LLModelPreview* mp = fmp->mModelPreview; std::string filename = mp->mLODFile[LLModel::LOD_HIGH]; diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index f64a7b6feb..d079a3d782 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -109,7 +109,6 @@ public: static void addStringToLog(const std::string& str, bool flash); static void addStringToLog(const std::ostringstream& strm, bool flash); void clearOverridesTab(); // clears table - void resetOverridesTab(); // clears table and cleans all data void updateOverridesTab(); // populates table and data as nessesary void setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost); 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 9ebcb0c09d..053c482831 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -47,12 +47,12 @@ <panel follows="top|left" - height="580" + height="595" layout="topleft" left="3" name="left_panel" top_pad="0" - width="630"> + width="635"> <panel follows="all" height="50" @@ -83,9 +83,9 @@ </panel> <tab_container follows="top|left" - top_pad="15" + top_pad="10" left="0" - height="300" + height="330" width="635" name="import_tab" tab_position="top" @@ -100,12 +100,12 @@ <view_border bevel_style="none" follows="top|left" - height="275" + height="306" layout="topleft" left="3" name="lod_tab_border" top_pad="0" - width="619" /> + width="628" /> <text follows="left|top" height="18" @@ -696,7 +696,7 @@ left="10" name="lod_tab_border" top_pad="20" - width="605" /> + width="614" /> <check_box follows="top|left" height="15" @@ -738,12 +738,12 @@ <view_border bevel_style="none" follows="top|left" - height="275" + height="306" layout="topleft" left="3" name="physics_tab_border" top_pad="0" - width="619"/> + width="628"/> <panel bg_alpha_color="0 0 0 0" bg_opaque_color="0 0 0 0.3" @@ -1113,12 +1113,12 @@ <view_border bevel_style="none" follows="top|left" - height="275" + height="306" layout="topleft" left="3" name="border" top_pad="0" - width="619"/> + width="628"/> <text follows="top|left" height="16" @@ -1165,109 +1165,94 @@ label_text.text_color="White" left="20" top_pad="20"/> - <view_border - bevel_style="none" - follows="top|left" - height="0" - layout="topleft" - name="border" - top_pad="20" - width="579"/> - <text - follows="top|left" - height="15" - left="20" - name="include_label" - text_color="White" - top_pad="20" - width="150"> - For avatar models only: - </text> - <check_box - follows="top|left" - height="15" - label="Include skin weight" - label_text.text_color="White" - name="upload_skin" - top_pad="15"/> - <text - follows="top|left" - height="17" - left="40" - name="skin_too_many_joints" - text_color="Orange" - top_pad="-2" - width="150"> - Too many skinned joints - </text> - <text - follows="top|left" - height="17" - left="40" - name="skin_unknown_joint" - text_color="Orange" - top_pad="-17" - width="150"> - Model has an unknown joint(s) - </text> - <check_box - follows="top|left" - height="15" - label="Include joint positions" - label_text.text_color="White" - name="upload_joints" - left_delta="-20" - top_pad="1"/> - <check_box - follows="top|left" - height="15" - label="Lock scale if joint position defined" - label_text.text_color="White" - name="lock_scale_if_joint_position" - top_pad="16"/> - <text - follows="top|left" - height="15" - layout="topleft" - left="220" - name="pelvis_offset_label" - text_color="White" - top="134" - width="200"> - Z offset (raise or lower avatar): - </text> - <spinner - follows="top|left" - height="20" - min_val="-3.00" - max_val="3.0" - name="pelvis_offset" - top_pad="10" - value="0.0" - width="80"/> </panel> <panel label="Overrides" layout="topleft" name="overrides_panel" - title="Overrides"> + title="Avatar"> <view_border bevel_style="none" follows="top|left" - height="275" + height="306" layout="topleft" left="3" - name="log_tab_border" + name="avatar_tab_border" top_pad="0" - width="619" /> + width="628" /> + <check_box + follows="top|left" + height="15" + label="Include skin weight" + label_text.text_color="White" + name="upload_skin" + top="8" + left="20"/> + <check_box + follows="top|left" + height="15" + label="Include joint positions" + label_text.text_color="White" + name="upload_joints" + left_delta="0" + top_pad="7"/> + <check_box + follows="top|left" + height="15" + label="Lock scale if joint position defined" + label_text.text_color="White" + name="lock_scale_if_joint_position" + top_pad="7"/> + <text + follows="top|left" + height="15" + layout="topleft" + left="220" + name="pelvis_offset_label" + text_color="White" + top="8" + width="200"> + Z offset (raise or lower avatar): + </text> + <spinner + follows="top|left" + height="20" + min_val="-3.00" + max_val="3.0" + name="pelvis_offset" + top_pad="10" + value="0.0" + width="80"/> + <text + follows="top|left" + height="17" + left="425" + name="skin_too_many_joints" + text_color="Orange" + top="7" + width="195" + word_wrap="true"> + Too many skinned joints + </text> + <text + follows="top|left" + height="32" + left="425" + name="skin_unknown_joint" + text_color="Orange" + top="8" + width="195" + word_wrap="true"> + Model has an unknown joint(s) + </text> <text layout="topleft" follows="top|left" height="15" - left="6" + left="20" name="joints_descr" - top="4" - width="300"> + top="73" + width="150"> Joints: </text> <scroll_list @@ -1279,15 +1264,15 @@ draw_stripes="false" commit_on_selection_change="true" heading_height="23" - height="238" - left="6" + height="199" + left_delta="0" top_pad="0" width="200"/> <text layout="topleft" follows="top|left" height="15" - left="6" + left_delta="0" name="conflicts_description" top_pad="2" width="200"> @@ -1299,7 +1284,7 @@ height="15" left_pad="5" name="pos_overrides_descr" - top="4" + top="73" width="300"> Position overrides for joint '[JOINT]': </text> @@ -1314,23 +1299,23 @@ height="100" left_delta="0" top_pad="0" - width="330"> + width="385"> <scroll_list.columns label="Model" name="model_name" - relative_width="0.40" /> + relative_width="0.49" /> <scroll_list.columns label="X" name="axis_x" - relative_width="0.20" /> + relative_width="0.17" /> <scroll_list.columns label="Y" name="axis_y" - relative_width="0.20" /> + relative_width="0.17" /> <scroll_list.columns label="Z" name="axis_z" - relative_width="0.20" /> + relative_width="0.17" /> </scroll_list> </panel> <panel @@ -1341,12 +1326,12 @@ <view_border bevel_style="none" follows="top|left" - height="275" + height="306" layout="topleft" left="3" name="log_tab_border" top_pad="0" - width="619" /> + width="628" /> <text_editor type="string" length="1" @@ -1355,10 +1340,10 @@ font="SansSerif" ignore_tab="false" layout="topleft" - height="275" + height="306" left="4" top="0" - right="-11" + right="-1" max_length="65536" name="log_text" parse_urls="true" @@ -1371,7 +1356,7 @@ <panel follows="top|left|bottom" layout="topleft" - height="197" + height="195" left="4" border="true" name="weights_and_warning_panel" @@ -1611,7 +1596,7 @@ Analysed: name="warning_title" top_pad="5" text_color="DrYellow" - visible="false" + visible="true" width="40"> NOTE: </text> @@ -1622,13 +1607,18 @@ Analysed: left_pad="1" name="warning_message" parse_urls="true" - top_delta="2" + top_delta="1" wrap="true" width="462" - visible="false"> + visible="true"> You dont have rights to upload mesh models. [[VURL] Find out how] to get certified. </text> - <text text_color="Yellow" layout="topleft" top_pad="-1" left="6" name="status"> + <text + text_color="Yellow" + layout="topleft" + top_pad="-2" + left="6" + name="status"> [STATUS] </text> </panel> |