summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-05-24 16:20:06 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-05-24 18:28:52 +0300
commited1680811317eef115a99b13ca875f8d2c196059 (patch)
tree1c724b3f3035c8ee2317c241c4d2199036131bc6 /indra
parent0cc832c38a34013a9eebf8d3caad2921bead265d (diff)
viewer#1552 Bake textures could be applied to terrain textures
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp4
-rw-r--r--indra/newview/lltexturectrl.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index ec5dd2c09a..1f84da4b07 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -1522,6 +1522,10 @@ bool LLPanelRegionTerrainInfo::postBuild()
buffer = llformat("texture_detail_%d", i);
initCtrl(buffer);
mTextureDetailCtrl[i] = findChild<LLTextureCtrl>(buffer);
+ if (mTextureDetailCtrl)
+ {
+ mTextureDetailCtrl[i]->setBakeTextureEnabled(false);
+ }
}
for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
{
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index f9f1dd4c4a..284fff4d8c 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -638,7 +638,7 @@ bool LLFloaterTexturePicker::postBuild()
getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this);
- setBakeTextureEnabled(true);
+ setBakeTextureEnabled(mInventoryPickType != PICK_MATERIAL);
return true;
}
@@ -1882,7 +1882,7 @@ void LLTextureCtrl::showPicker(bool take_focus)
{
texture_floaterp->setSetImageAssetIDCallback(boost::bind(&LLTextureCtrl::setImageAssetID, this, _1));
- texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled);
+ texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled && mInventoryPickType != PICK_MATERIAL);
}
LLFloater* root_floater = gFloaterView->getParentFloater(this);
@@ -2112,7 +2112,7 @@ void LLTextureCtrl::setBakeTextureEnabled(bool enabled)
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if (floaterp)
{
- floaterp->setBakeTextureEnabled(enabled);
+ floaterp->setBakeTextureEnabled(enabled && mInventoryPickType != PICK_MATERIAL);
}
}