SL-10327 FIXED Scalable preview of mesh model is shown with black bar on top in the Upload Model menu
parent
c42202804c
commit
9c8584a3a7
|
|
@ -8053,7 +8053,7 @@
|
|||
<key>PreviewRenderSize</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Resolution of the image rendered for the mesh upload preview</string>
|
||||
<string>Resolution of the image rendered for the mesh upload preview (must be a power of 2)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -427,8 +427,23 @@ void LLFloaterModelPreview::initModelPreview()
|
|||
{
|
||||
delete mModelPreview;
|
||||
}
|
||||
auto size = gSavedSettings.getS32("PreviewRenderSize");
|
||||
mModelPreview = new LLModelPreview(size, size, this );
|
||||
|
||||
S32 tex_width = 512;
|
||||
S32 tex_height = 512;
|
||||
|
||||
S32 max_width = llmin(gSavedSettings.getS32("PreviewRenderSize"), (S32)gPipeline.mScreenWidth);
|
||||
S32 max_height = llmin(gSavedSettings.getS32("PreviewRenderSize"), (S32)gPipeline.mScreenHeight);
|
||||
|
||||
while ((tex_width << 1) <= max_width)
|
||||
{
|
||||
tex_width <<= 1;
|
||||
}
|
||||
while ((tex_height << 1) <= max_height)
|
||||
{
|
||||
tex_height <<= 1;
|
||||
}
|
||||
|
||||
mModelPreview = new LLModelPreview(tex_width, tex_height, this);
|
||||
mModelPreview->setPreviewTarget(16.f);
|
||||
mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5));
|
||||
mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, _1));
|
||||
|
|
|
|||
|
|
@ -1490,7 +1490,6 @@ Analysed:
|
|||
name="right_panel"
|
||||
top="0"
|
||||
left="640"
|
||||
background_visible="true"
|
||||
width="375">
|
||||
<text
|
||||
follows="left|top"
|
||||
|
|
@ -1510,7 +1509,6 @@ Analysed:
|
|||
name="right_upper_panel"
|
||||
top="8"
|
||||
left="60"
|
||||
background_visible="true"
|
||||
width="315">
|
||||
<combo_box
|
||||
top_pad="3"
|
||||
|
|
@ -1586,7 +1584,7 @@ Analysed:
|
|||
layout="topleft"
|
||||
left="2"
|
||||
name="physics_explode_label"
|
||||
top="85"
|
||||
bottom_pad="2"
|
||||
width="150">
|
||||
Preview Spread:
|
||||
</text>
|
||||
|
|
@ -1594,8 +1592,8 @@ Analysed:
|
|||
name="physics_explode"
|
||||
follows="right|bottom"
|
||||
valign="center"
|
||||
top="15"
|
||||
left="80"
|
||||
left="105"
|
||||
top_delta="-3"
|
||||
min_val="0.0"
|
||||
max_val="3.0"
|
||||
height="20"
|
||||
|
|
|
|||
Loading…
Reference in New Issue