summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-10-28 17:07:57 -0500
committerDave Parks <davep@lindenlab.com>2022-10-28 17:07:57 -0500
commitee227feed38d157cf42df1987555f0188888fc62 (patch)
tree12242822a149c8d878d2a86f6c018365599a6ebe
parent3b08abf70b69f4905dae550d766eaf7de4983be7 (diff)
parentc61224bef22686c4e6f5b4a6af9acbeb27d561ab (diff)
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
-rw-r--r--indra/newview/llgltfmateriallist.cpp2
-rw-r--r--indra/newview/llgltfmateriallist.h2
-rw-r--r--indra/newview/llmaterialeditor.cpp6
-rw-r--r--indra/newview/llpanelface.cpp2
-rw-r--r--indra/newview/lltexturectrl.cpp39
-rw-r--r--indra/newview/lltexturectrl.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_ctrl.xml13
7 files changed, 33 insertions, 32 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 48f4305ee7..ab7a6495c4 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -47,6 +47,8 @@
LLGLTFMaterialList gGLTFMaterialList;
+const LLUUID LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID("968cbad0-4dad-d64e-71b5-72bf13ad051a");
+
namespace
{
class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
diff --git a/indra/newview/llgltfmateriallist.h b/indra/newview/llgltfmateriallist.h
index f770f6ecc8..b74e0b3ec2 100644
--- a/indra/newview/llgltfmateriallist.h
+++ b/indra/newview/llgltfmateriallist.h
@@ -37,6 +37,8 @@ class LLFetchedGLTFMaterial;
class LLGLTFMaterialList
{
public:
+ static const LLUUID BLANK_MATERIAL_ASSET_ID;
+
LLGLTFMaterialList() {}
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 1213deec64..533f882d39 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -2333,11 +2333,6 @@ bool LLMaterialEditor::setFromSelection()
void LLMaterialEditor::loadAsset()
{
- // derived from LLPreviewNotecard::loadAsset
-
- // TODO: see commented out "editor" references and make them do something appropriate to the UI
-
- // request the asset.
const LLInventoryItem* item;
if (mNotecardInventoryID.notNull())
{
@@ -2405,6 +2400,7 @@ void LLMaterialEditor::loadAsset()
setEnableEditing(false); // wait for it to load
+ // request the asset.
gAssetStorage->getInvItemAsset(source_sim,
gAgent.getID(),
gAgent.getSessionID(),
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index c6e0bc5153..6d8d19c57c 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -223,7 +223,7 @@ BOOL LLPanelFace::postBuild()
if (pbr_ctrl)
{
pbr_ctrl->setDefaultImageAssetID(LLUUID::null);
- pbr_ctrl->setBlankImageAssetID(LLUUID::null); // should there be some empty default material?
+ pbr_ctrl->setBlankImageAssetID(LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID);
pbr_ctrl->setCommitCallback(boost::bind(&LLPanelFace::onCommitPbr, this, _2));
pbr_ctrl->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelPbr, this, _2));
pbr_ctrl->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectPbr, this, _2));
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index ebb7ee609c..7aa3639df7 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -479,7 +479,6 @@ BOOL LLFloaterTexturePicker::postBuild()
LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1));
getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this);
- getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setCommitCallback(onHideBaseMeshRegionCheck, this);
setBakeTextureEnabled(TRUE);
return TRUE;
@@ -700,8 +699,9 @@ void LLFloaterTexturePicker::onBtnBlank(void* userdata)
void LLFloaterTexturePicker::onBtnNone(void* userdata)
{
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata;
+ self->setCanApply(true, true);
self->setImageID( LLUUID::null );
- self->commitCancel();
+ self->commitIfImmediateSet();
}
/*
@@ -821,7 +821,6 @@ void LLFloaterTexturePicker::onModeSelect(LLUICtrl* ctrl, void *userdata)
self->getChild<LLButton>("Default")->setVisible(index == 0 ? TRUE : FALSE);
self->getChild<LLButton>("Blank")->setVisible(index == 0 ? TRUE : FALSE);
self->getChild<LLButton>("None")->setVisible(index == 0 ? TRUE : FALSE);
- self->getChild<LLButton>("Pipette")->setVisible(index == 0 ? TRUE : FALSE);
self->getChild<LLFilterEditor>("inventory search editor")->setVisible(index == 0 ? TRUE : FALSE);
self->getChild<LLInventoryPanel>("inventory panel")->setVisible(index == 0 ? TRUE : FALSE);
@@ -831,7 +830,10 @@ void LLFloaterTexturePicker::onModeSelect(LLUICtrl* ctrl, void *userdata)
self->getChild<LLScrollListCtrl>("l_name_list")->setVisible(index == 1 ? TRUE : FALSE);
self->getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == 2 ? TRUE : FALSE);
- self->getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE);
+
+ bool pipette_visible = (index == 0)
+ && (self->mInventoryPickType != LLTextureCtrl::PICK_MATERIAL);
+ self->getChild<LLButton>("Pipette")->setVisible(pipette_visible);
if (index == 2)
{
@@ -1110,13 +1112,6 @@ void LLFloaterTexturePicker::onBakeTextureSelect(LLUICtrl* ctrl, void *user_data
}
}
-//static
-void LLFloaterTexturePicker::onHideBaseMeshRegionCheck(LLUICtrl* ctrl, void *user_data)
-{
- //LLFloaterTexturePicker* picker = (LLFloaterTexturePicker*)user_data;
- //LLCheckBoxCtrl* check_box = (LLCheckBoxCtrl*)ctrl;
-}
-
void LLFloaterTexturePicker::updateFilterPermMask()
{
//mInventoryPanel->setFilterPermMask( getFilterPermMask() ); Commented out due to no-copy texture loss.
@@ -1241,6 +1236,16 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT
mInventoryPickType = type;
refreshLocalList();
refreshInventoryFilter();
+
+ if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+ {
+ getChild<LLButton>("Pipette")->setVisible(false);
+ }
+ else
+ {
+ S32 index = mModeSelector->getValue().asInteger();
+ getChild<LLButton>("Pipette")->setVisible(index == 0);
+ }
}
void LLFloaterTexturePicker::onPickerCallback(const std::vector<std::string>& filenames, LLHandle<LLFloater> handle)
@@ -1291,7 +1296,17 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
if (inventory_item_id.notNull())
{
LLToolPipette::getInstance()->setResult(TRUE, "");
- setImageID(te.getID());
+ if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+ {
+ // tes have no data about material ids
+ // Plus gltf materials are layered with overrides,
+ // which mean that end result might have no id.
+ LL_WARNS() << "tes have no data about material ids" << LL_ENDL;
+ }
+ else
+ {
+ setImageID(te.getID());
+ }
mNoCopyTextureSelected = FALSE;
LLInventoryItem* itemp = gInventory.getItem(inventory_item_id);
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 0a5a281e76..d06a82bbd5 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -352,7 +352,6 @@ public:
static void onLocalScrollCommit(LLUICtrl* ctrl, void* userdata);
static void onBakeTextureSelect(LLUICtrl* ctrl, void *userdata);
- static void onHideBaseMeshRegionCheck(LLUICtrl* ctrl, void *userdata);
void setLocalTextureEnabled(BOOL enabled);
void setBakeTextureEnabled(BOOL enabled);
diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
index 0cb69137e3..18631c3ae7 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
@@ -275,19 +275,6 @@
name="BAKED_AUX3"
value="10" />
</combo_box>
- <check_box
- follows="left|top"
- height="20"
- initial_value="false"
- label="Hide Base Mesh Region"
-
-layout="topleft"
- name="hide_base_mesh_region"
- left_delta="0"
- top_pad="10"
- top_delta="0"
- width="120"
- visible="false"/>
<!-- bottom static -->
<button
follows="bottom"