diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 1 | ||||
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llmeshrepository.h | 1 | ||||
-rwxr-xr-x | indra/newview/llstartup.cpp | 1 | ||||
-rw-r--r-- | indra/newview/lltexturecache.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 7 | ||||
-rw-r--r-- | indra/newview/viewer_manifest.py | 2 |
9 files changed, 44 insertions, 14 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index f65fab41e7..d4ba039eeb 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -310,6 +310,7 @@ BOOL LLFloaterModelPreview::postBuild() childSetCommitCallback("upload_joints", onUploadJointsCommit, this); childSetCommitCallback("import_scale", onImportScaleCommit, this); + childSetCommitCallback("pelvis_offset", onPelvisOffsetCommit, this); childSetCommitCallback("lod_file_or_limit", refresh, this); childSetCommitCallback("physics_load_radio", refresh, this); @@ -318,6 +319,9 @@ BOOL LLFloaterModelPreview::postBuild() childDisable("upload_skin"); childDisable("upload_joints"); + + childDisable("pelvis_offset"); + childDisable("ok_btn"); mViewOptionMenuButton = getChild<LLMenuButton>("options_gear_btn"); @@ -456,6 +460,18 @@ void LLFloaterModelPreview::onImportScaleCommit(LLUICtrl*,void* userdata) fp->mModelPreview->calcResourceCost(); fp->mModelPreview->refresh(); } +//static +void LLFloaterModelPreview::onPelvisOffsetCommit( LLUICtrl*, void* userdata ) +{ + LLFloaterModelPreview *fp =(LLFloaterModelPreview*)userdata; + + if (!fp->mModelPreview) + { + return; + } + + fp->mModelPreview->refresh(); +} //static void LLFloaterModelPreview::onUploadJointsCommit(LLUICtrl*,void* userdata) @@ -3742,7 +3758,7 @@ BOOL LLModelPreview::render() if (fmp) { fmp->enableViewOption("show_skin_weight"); - fmp->setViewOptionEnabled("show_joint_positions", skin_weight); + fmp->setViewOptionEnabled("show_joint_positions", skin_weight); } mFMP->childEnable("upload_skin"); } diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index ffda565fef..aac20244cc 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -183,6 +183,7 @@ protected: friend class LLPhysicsDecomp; static void onImportScaleCommit(LLUICtrl*, void*); + static void onPelvisOffsetCommit(LLUICtrl*, void*); static void onUploadJointsCommit(LLUICtrl*,void*); static void onUploadSkinCommit(LLUICtrl*,void*); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index a9a8e28b00..fb686fccd7 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1162,7 +1162,12 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat info.mAlternateBindMatrix.push_back(mat); } } - + + if (skin.has("pelvis_offset")) + { + info.mPelvisOffset = skin["pelvis_offset"].asReal(); + } + mSkinInfoQ.push(info); } diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 0fcb2213de..ccdcc03310 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -131,6 +131,7 @@ public: std::vector<LLMatrix4> mAlternateBindMatrix; LLMatrix4 mBindShapeMatrix; + float mPelvisOffset; }; class LLMeshDecomposition diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index b98cbd5b78..aee3e6cfe9 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -775,6 +775,7 @@ bool idle_startup() gViewerWindow->setNormalControlsVisible( FALSE ); gLoginMenuBarView->setVisible( TRUE ); gLoginMenuBarView->setEnabled( TRUE ); + show_debug_menus(); // Hide the splash screen LLSplashScreen::hide(); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index f54214b95c..7fb52c1939 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1419,22 +1419,21 @@ void LLTextureCache::readHeaderCache() } } } - if (num_entries > sCacheMaxEntries) + if (num_entries - empty_entries > sCacheMaxEntries) { // Special case: cache size was reduced, need to remove entries // Note: After we prune entries, we will call this again and create the LRU - U32 entries_to_purge = (num_entries-empty_entries) - sCacheMaxEntries; + U32 entries_to_purge = (num_entries - empty_entries) - sCacheMaxEntries; llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl; - if (entries_to_purge > 0) + // We can exit the following loop with the given condition, since if we'd reach the end of the lru set we'd have: + // purge_list.size() = lru.size() = num_entries - empty_entries = entries_to_purge + sCacheMaxEntries >= entries_to_purge + // So, it's certain that iter will never reach lru.end() first. + std::set<lru_data_t>::iterator iter = lru.begin(); + while (purge_list.size() < entries_to_purge) { - for (std::set<lru_data_t>::iterator iter = lru.begin(); iter != lru.end(); ++iter) - { - purge_list.insert(iter->second); - if (purge_list.size() >= entries_to_purge) - break; - } + purge_list.insert(iter->second); + ++iter; } - llassert_always(purge_list.size() >= entries_to_purge); } else { diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 1aa9987fd9..0071753831 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1546,6 +1546,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) } } + void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" ); @@ -1565,7 +1566,6 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLViewerObject* objectp = *iter; - //llassert_always(!objectp->isDead()); if(objectp->isDead())//some dead objects somehow not cleaned. { continue ; 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 ca4e4a3a2a..e79dfcbc7d 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -388,6 +388,13 @@ <check_box top_pad="5" name="upload_textures" height="15" follows="top|left" label="Textures"/> <check_box top_pad="5" name="upload_skin" height="15" follows="top|left" label="Skin weight"/> <check_box top_pad="5" left="20" name="upload_joints" height="15" follows="top|left" label="Joint positions"/> + + <text left="10" top_pad="4" width="90" bottom="30" follows="top|left" height="15"> + Pelvis Offset: + </text> + + <spinner left="10" top_pad="4" height="20" follows="top|left" width="80" value="0.0" min_val="0.00" max_val="32.0" name="pelvis_offset"/> + </panel> </tab_container> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1653a01b4a..1a4551d069 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -821,7 +821,7 @@ class DarwinManifest(ViewerManifest): self.run_command('SetFile -a V %r' % pathname) # Create the alias file (which is a resource file) from the .r - self.run_command('rez %r -o %r' % + self.run_command('Rez %r -o %r' % (self.src_path_of("installers/darwin/release-dmg/Applications-alias.r"), os.path.join(volpath, "Applications"))) |