diff options
author | leyla_linden <none@none> | 2010-12-10 17:05:38 -0800 |
---|---|---|
committer | leyla_linden <none@none> | 2010-12-10 17:05:38 -0800 |
commit | 285ba513368c6b692ea2eb5d13b85300c76adbea (patch) | |
tree | 97edcc2260d97f7b80c9172338481eb8e2a05503 /indra | |
parent | 52686947e2643eaa0f1cda03f33bbf1089d3b46d (diff) |
fixed model uploader aspect not updating, text not following resize, and file name not filling in
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 3 | ||||
-rw-r--r-- | indra/newview/llfloatermodelwizard.cpp | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_preview.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_wizard.xml | 29 |
5 files changed, 17 insertions, 35 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 0cfebdb399..9aa8e62885 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -287,7 +287,6 @@ BOOL LLFloaterModelPreview::postBuild() mModelPreview = new LLModelPreview(512, 512, this); mModelPreview->setPreviewTarget(16.f); - mModelPreview->setAspect((F32) mPreviewRect.getWidth()/mPreviewRect.getHeight()); //set callbacks for left click on line editor rows for (U32 i = 0; i <= LLModel::LOD_HIGH; i++) @@ -3363,8 +3362,12 @@ BOOL LLModelPreview::render() F32 explode = mFMP->childGetValue("physics_explode").asReal(); glClear(GL_DEPTH_BUFFER_BIT); +
+ LLRect preview_rect = mFMP->getChildView("preview_panel")->getRect();
+ F32 aspect = (F32) preview_rect.getWidth()/preview_rect.getHeight();
+
+ LLViewerCamera::getInstance()->setAspect(aspect);
- LLViewerCamera::getInstance()->setAspect(mAspect); LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); LLVector3 offset = mCameraOffset; diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index b0317e3d2d..a7d43a3d53 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -256,8 +256,6 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex void clearIncompatible(S32 lod); void updateStatusMessages(); bool containsRiggedAsset( void ); - void setAspect(F32 aspect) { mAspect = aspect; }; - //void setLoading(bool loading) { mLoading = loading; }; static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); @@ -283,7 +281,6 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex U32 mResourceCost; S32 mLimit[LLModel::NUM_LODS]; std::string mLODFile[LLModel::NUM_LODS]; - F32 mAspect; bool mLoading; LLModelLoader* mModelLoader; diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index 416501cc8b..79c29ef017 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -61,7 +61,6 @@ BOOL LLFloaterModelWizard::postBuild() mModelPreview = new LLModelPreview(512, 512, this); mModelPreview->setPreviewTarget(16.f); - mModelPreview->setAspect((F32) mPreviewRect.getWidth()/mPreviewRect.getHeight()); center(); @@ -75,7 +74,7 @@ void LLFloaterModelWizard::draw() mModelPreview->update(); - if (mModelPreview) + if (mModelPreview && mModelPreview->mModelLoader) { gGL.color3f(1.f, 1.f, 1.f); @@ -97,13 +96,13 @@ void LLFloaterModelWizard::draw() gGL.begin( LLRender::QUADS ); { gGL.texCoord2f(0.f, 1.f); - gGL.vertex2i(mPreviewRect.mLeft, item_rect.mTop); + gGL.vertex2i(item_rect.mLeft, item_rect.mTop); gGL.texCoord2f(0.f, 0.f); - gGL.vertex2i(mPreviewRect.mLeft, item_rect.mBottom); + gGL.vertex2i(item_rect.mLeft, item_rect.mBottom); gGL.texCoord2f(1.f, 0.f); - gGL.vertex2i(mPreviewRect.mRight, item_rect.mBottom); + gGL.vertex2i(item_rect.mRight, item_rect.mBottom); gGL.texCoord2f(1.f, 1.f); - gGL.vertex2i(mPreviewRect.mRight, item_rect.mTop); + gGL.vertex2i(item_rect.mRight, item_rect.mTop); } gGL.end(); 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 c17c52bb09..779eeacb43 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -97,7 +97,7 @@ [X] x [Y] x [Z] m </text> - <text left="10" top_pad="20" follows="top_left" height="15"> + <text left="10" top_pad="20" follows="top|left" height="15"> Include: </text> diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index 3f11f7d4dd..4a4b8075c8 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -133,7 +133,6 @@ Filename: </text> <line_editor - control_name="CacheLocationTopFolder" border_style="line" border_thickness="1" follows="left|top" @@ -142,7 +141,7 @@ layout="topleft" left_delta="0" max_length="4096" - name="cache_location" + name="lod_file" top_pad="5" width="220" /> <button @@ -179,7 +178,6 @@ follows="all" width="150"> </panel> - <text top_pad="10" width="130" @@ -191,28 +189,13 @@ </text> <text top_pad="5" - width="10" - height="15" - left_delta="0" - > - X: - </text> - <text - top_delta="0" - width="10" + width="150" height="15" - left_pad="25" - > - Y: - </text> - <text - top_delta="0" - width="10" - height="15" - left_pad="25" - > - Z: + name="import_dimensions" + left_delta="0"> + X: [X] | Y: [Y] | Z: [Z] </text> + <text top="100" width="320" |