diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llmodelpreview.cpp | 14 | ||||
| -rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 149 |
5 files changed, 165 insertions, 22 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c727d5ae57..0f7670a57a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1709,10 +1709,6 @@ if (WINDOWS) list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES}) endif (WINDOWS) -if (HAVOK OR HAVOK_TPV) - set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_HAVOK") -endif (HAVOK OR HAVOK_TPV) - if( DEFINED LLSTARTUP_COMPILE_FLAGS ) # progress view disables/enables icons based on available packages set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") @@ -2029,6 +2025,10 @@ if( TARGET ll::nvapi ) target_link_libraries(${VIEWER_BINARY_NAME} ll::nvapi ) endif() +if ( TARGET llconvexdecomposition ) + target_link_libraries(${VIEWER_BINARY_NAME} llconvexdecomposition ) +endif () + set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to artwork files.") diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index f76f39222b..ef29be8200 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1035,8 +1035,13 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data) gMeshRepo.mDecompThread->submitRequest(request); } } - - if (stage == "Decompose") + if (stage == "Analyze") + { + sInstance->setStatusMessage(sInstance->getString("decomposing")); + sInstance->childSetVisible("Analyze", false); + sInstance->childSetVisible("analyze_cancel", true); + } + else if (stage == "Decompose") { sInstance->setStatusMessage(sInstance->getString("decomposing")); sInstance->childSetVisible("Decompose", false); @@ -1137,6 +1142,7 @@ void LLFloaterModelPreview::initDecompControls() childSetCommitCallback("simplify_cancel", onPhysicsStageCancel, NULL); childSetCommitCallback("decompose_cancel", onPhysicsStageCancel, NULL); + childSetCommitCallback("analyze_cancel", onPhysicsStageCancel, NULL); childSetCommitCallback("physics_lod_combo", onPhysicsUseLOD, NULL); childSetCommitCallback("physics_browse", onPhysicsBrowse, NULL); @@ -2018,7 +2024,7 @@ void LLFloaterModelPreview::DecompRequest::completed() { //called from the main thread if (mContinue) { - mModel->setConvexHullDecomposition(mHull); + mModel->setConvexHullDecomposition(mHull, mHullMesh); if (sInstance) { diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index e0649e1d88..d71f368232 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -2626,7 +2626,16 @@ void LLModelPreview::updateStatusMessages() //enable = enable && !use_hull && fmp->childGetValue("physics_optimize").asBoolean(); //enable/disable "analysis" UI - LLPanel* panel = fmp->getChild<LLPanel>("physics analysis"); +#if LL_HAVOK + LLPanel* panel = fmp->getChild<LLPanel>("physics simplification"); + panel->setVisible(true); + + panel = fmp->getChild<LLPanel>("physics analysis havok"); + panel->setVisible(true); +#else + LLPanel* panel = fmp->getChild<LLPanel>("physics analysis vhacd"); + panel->setVisible(true); +#endif LLView* child = panel->getFirstChild(); while (child) { @@ -2650,6 +2659,8 @@ void LLModelPreview::updateStatusMessages() fmp->childSetVisible("simplify_cancel", false); fmp->childSetVisible("Decompose", true); fmp->childSetVisible("decompose_cancel", false); + fmp->childSetVisible("Analyze", true); + fmp->childSetVisible("analyze_cancel", false); if (phys_hulls > 0) { @@ -2659,6 +2670,7 @@ void LLModelPreview::updateStatusMessages() if (phys_tris || phys_hulls > 0) { fmp->childEnable("Decompose"); + fmp->childEnable("Analyze"); } } else diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index d72d428c08..fb9e5fd0a9 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1070,7 +1070,7 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url) if (diff.empty()) { - LL_INFOS() << "No outstanding object IDs to request. Pending count: " << mPendingObjectCost.size() << LL_ENDL; + LL_DEBUGS() << "No outstanding object IDs to request. Pending count: " << mPendingObjectCost.size() << LL_ENDL; return; } @@ -1205,7 +1205,7 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url) if (idList.size() < 1) { - LL_INFOS() << "No outstanding object physics flags to request." << LL_ENDL; + LL_DEBUGS() << "No outstanding object physics flags to request." << LL_ENDL; return; } 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 f11d687840..39e9de0980 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -40,7 +40,7 @@ <string name="simplifying">Simplifying...</string> <string name="tbd">TBD</string> <string name="ModelTextureScaling">One or more textures in this model were scaled to be within the allowed limits.</string> - + <!-- Warnings and info from model loader--> <string name="TooManyJoint">Skinning disabled due to too many joints: [JOINTS], maximum: [MAX]</string> <string name="UnrecognizedJoint">Rigged to unrecognized joint name [NAME]</string> @@ -807,7 +807,7 @@ help_topic="upload_model_physics" label="Physics" name="physics_panel"> - + <!-- ==== STEP 1: Level of Detail ==== --> <view_border bevel_style="none" @@ -873,7 +873,7 @@ <!-- <check_box name="physics_optimize" follows="left|top" width="130" left="10" top_pad="5" height="20" label="Optimize"/> <check_box name="physics_use_hull" follows="left|top" width="130" left_pad="5" height="20" label="Use Convex Hull"/> --> </panel> - + <!-- ==== STEP 2: Analyze ==== --> <view_border bevel_style="none" @@ -890,9 +890,9 @@ height="65" follows="top|left" left="18" - name="physics analysis" + name="physics analysis havok" top_pad="10" - visible="true" + visible="false" width="589"> <text follows="left|top" @@ -980,7 +980,131 @@ visible="false" width="90"/> </panel> - + <panel + bg_alpha_color="0 0 0 0" + bg_opaque_color="0 0 0 0.3" + height="65" + follows="top|left" + left="18" + name="physics analysis vhacd" + top_delta="0" + visible="false" + width="589"> + <text + follows="left|top" + font="SansSerif" + height="20" + layout="topleft" + left="0" + name="method_label" + text_color="White" + top_pad="0"> + Step 2: Convert to hulls (optional) + </text> + <text + follows="top|left" + height="15" + layout="topleft" + name="analysis_method_label" + top_pad="10" + width="100"> + Fill Mode: + </text> + <text + follows="top|left" + height="15" + name="quality_label" + layout="topleft" + left_pad="5" + width="85"> + Resolution: + </text> + <text + follows="top|left" + height="15" + name="quality_label" + layout="topleft" + left_pad="25" + width="95"> + Hulls per Mesh: + </text> + <text + follows="top|left" + height="15" + name="smooth_method_label" + layout="topleft" + left_pad="5" + width="95"> + Vertices per hull: + </text> + <text + follows="top|left" + height="15" + name="tolerance_label" + layout="topleft" + left_pad="5" + width="100"> + Error tolerance: + </text> + <combo_box + follows="top|left" + layout="topleft" + left="0" + name="Fill Mode" + top_pad="0" + height="20" + width="100"/> + <combo_box + follows="top|left" + layout="topleft" + left_pad="5" + name="Voxel Resolution" + height="20" + width="100"/> + <spinner + follows="top|left" + name="Num Hulls" + height="20" + left_pad="10" + width="60" + decimal_digits="0" + allow_digits_only="true"/> + <spinner + follows="top|left" + name="Num Vertices" + height="20" + left_pad="40" + width="60" + decimal_digits="0" + allow_digits_only="true"/> + <spinner + follows="top|left" + name="Error Tolerance" + height="20" + left_pad="40" + width="60" + decimal_digits="4" + allow_digits_only="true"/> + <button + bottom="1" + follows="top|right" + height="20" + label="Analyze" + layout="bottomleft" + name="Analyze" + right="-1" + width="90"/> + <button + follows="top|left" + height="20" + label="Cancel" + layout="topleft" + left_delta="0" + name="analyze_cancel" + visible="false" + width="90"/> + </panel> + <!-- ==== STEP 3: Simplify ==== --> <view_border bevel_style="none" @@ -999,7 +1123,8 @@ left="18" name="physics simplification" top_pad="10" - width="589"> + width="589" + visible="false"> <text text_color="White" follows="left|top" @@ -1088,7 +1213,7 @@ name="simplify_cancel" width="90"/> </panel> - + <!-- ==== Results ==== --> <view_border bevel_style="none" @@ -1186,7 +1311,7 @@ name="modifiers_panel" help_topic="upload_model_modifiers"> <view_border - bevel_style="none" + bevel_style="none" follows="top|left" height="306" layout="topleft" @@ -1593,7 +1718,7 @@ Model: [MODEL] </text> </panel> - <!-- + <!-- Streaming breakdown numbers are available but not fully understood uncommenting the following sections will display the numbers for debugging purposes <text @@ -1695,7 +1820,7 @@ Analysed: width="462" visible="true"> You don't have rights to upload mesh models. [[VURL] Find out how] to get certified. - </text> + </text> <text text_color="Yellow" layout="topleft" @@ -1706,7 +1831,7 @@ Analysed: </text> </panel> </panel> - + <text follows="left|top" layout="topleft" |
