Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
commit
0af4adbb86
|
|
@ -1090,10 +1090,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
texture_ctrl->setTentative(FALSE);
|
||||
texture_ctrl->setEnabled(editable);
|
||||
texture_ctrl->setImageAssetID(id);
|
||||
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f);
|
||||
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
|
||||
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
|
||||
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
|
||||
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material);
|
||||
getChildView("label alphamode")->setEnabled(editable && mIsAlpha && !has_pbr_material);
|
||||
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material);
|
||||
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material);
|
||||
|
||||
texture_ctrl->setBakeTextureEnabled(TRUE);
|
||||
}
|
||||
|
|
@ -1116,10 +1116,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
texture_ctrl->setTentative(TRUE);
|
||||
texture_ctrl->setEnabled(editable);
|
||||
texture_ctrl->setImageAssetID(id);
|
||||
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f);
|
||||
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
|
||||
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
|
||||
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
|
||||
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material);
|
||||
getChildView("label alphamode")->setEnabled(editable && mIsAlpha && !has_pbr_material);
|
||||
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material);
|
||||
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material);
|
||||
|
||||
texture_ctrl->setBakeTextureEnabled(TRUE);
|
||||
}
|
||||
|
|
@ -1823,8 +1823,8 @@ void LLPanelFace::updateVisibility()
|
|||
|
||||
// Diffuse texture controls
|
||||
getChildView("texture control")->setVisible(show_texture && show_material);
|
||||
getChildView("label alphamode")->setVisible((show_texture && show_material) || show_pbr);
|
||||
getChildView("combobox alphamode")->setVisible((show_texture && show_material) || show_pbr);
|
||||
getChildView("label alphamode")->setVisible(show_texture && show_material);
|
||||
getChildView("combobox alphamode")->setVisible(show_texture && show_material);
|
||||
getChildView("label maskcutoff")->setVisible(false);
|
||||
getChildView("maskcutoff")->setVisible(false);
|
||||
if ((show_texture && show_material) || show_pbr)
|
||||
|
|
|
|||
|
|
@ -416,15 +416,6 @@ BOOL LLFloaterTexturePicker::postBuild()
|
|||
|
||||
mInventoryPanel = getChild<LLInventoryPanel>("inventory panel");
|
||||
|
||||
// if can select both materials and textures, set textures_material_combo's layout as visible
|
||||
childSetVisible("combo_layout", mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL);
|
||||
|
||||
mTextureMaterialsCombo = getChild<LLComboBox>("textures_material_combo");
|
||||
mTextureMaterialsCombo->setCommitCallback(onSelectTextureMaterials, this);
|
||||
|
||||
// set the combo box to the first entry in the list (currently textures and materials)
|
||||
mTextureMaterialsCombo->selectByValue(0);
|
||||
|
||||
mModeSelector = getChild<LLComboBox>("mode_selection");
|
||||
mModeSelector->setCommitCallback(onModeSelect, this);
|
||||
mModeSelector->selectByValue(0);
|
||||
|
|
@ -435,7 +426,7 @@ BOOL LLFloaterTexturePicker::postBuild()
|
|||
// selected at startup, we call the same function that is triggered
|
||||
// when a texture/materials/both choice is made and let it take care
|
||||
// of setting the filters
|
||||
onSelectTextureMaterials(0, this);
|
||||
refreshInventoryFilter();
|
||||
|
||||
mInventoryPanel->setFilterPermMask(mImmediateFilterPermMask);
|
||||
mInventoryPanel->setSelectCallback(boost::bind(&LLFloaterTexturePicker::onSelectionChange, this, _1, _2));
|
||||
|
|
@ -469,21 +460,7 @@ BOOL LLFloaterTexturePicker::postBuild()
|
|||
|
||||
mLocalScrollCtrl = getChild<LLScrollListCtrl>("l_name_list");
|
||||
mLocalScrollCtrl->setCommitCallback(onLocalScrollCommit, this);
|
||||
mLocalScrollCtrl->clearRows();
|
||||
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
{
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
refreshLocalList();
|
||||
|
||||
mNoCopyTextureSelected = FALSE;
|
||||
|
||||
|
|
@ -843,7 +820,6 @@ void LLFloaterTexturePicker::onModeSelect(LLUICtrl* ctrl, void *userdata)
|
|||
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<LLComboBox>("textures_material_combo")->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);
|
||||
|
||||
|
|
@ -963,21 +939,7 @@ void LLFloaterTexturePicker::onBtnRemove(void* userdata)
|
|||
|
||||
self->getChild<LLButton>("l_rem_btn")->setEnabled(false);
|
||||
self->getChild<LLButton>("l_upl_btn")->setEnabled(false);
|
||||
self->mLocalScrollCtrl->clearRows();
|
||||
|
||||
if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||
}
|
||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||
}
|
||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
{
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||
}
|
||||
self->refreshLocalList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1205,36 +1167,46 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string )
|
|||
mInventoryPanel->setFilterSubString(search_string);
|
||||
}
|
||||
|
||||
void LLFloaterTexturePicker::onSelectTextureMaterials(LLUICtrl* ctrl, void *userdata)
|
||||
void LLFloaterTexturePicker::refreshLocalList()
|
||||
{
|
||||
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)userdata;
|
||||
int index = self->mTextureMaterialsCombo->getValue().asInteger();
|
||||
mLocalScrollCtrl->clearRows();
|
||||
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
{
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterTexturePicker::refreshInventoryFilter()
|
||||
{
|
||||
U32 filter_types = 0x0;
|
||||
|
||||
if (self->mInventoryPickType != LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
// mInventoryPickType overrides combo
|
||||
index = self->mInventoryPickType;
|
||||
}
|
||||
|
||||
if (index == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
|
||||
}
|
||||
else if (index == LLTextureCtrl::PICK_TEXTURE)
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
{
|
||||
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
|
||||
}
|
||||
else if (index == LLTextureCtrl::PICK_MATERIAL)
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
{
|
||||
filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
|
||||
}
|
||||
|
||||
self->mInventoryPanel->setFilterTypes(filter_types);
|
||||
mInventoryPanel->setFilterTypes(filter_types);
|
||||
}
|
||||
|
||||
void LLFloaterTexturePicker::setLocalTextureEnabled(BOOL enabled)
|
||||
|
|
@ -1267,27 +1239,8 @@ void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled)
|
|||
void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryType type)
|
||||
{
|
||||
mInventoryPickType = type;
|
||||
|
||||
// if can select both materials and textures, set textures_material_combo's layout as visible
|
||||
childSetVisible("combo_layout", mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL);
|
||||
|
||||
mLocalScrollCtrl->clearRows();
|
||||
if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
||||
{
|
||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
||||
{
|
||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||
}
|
||||
|
||||
// refresh filters
|
||||
onSelectTextureMaterials(0, this);
|
||||
refreshLocalList();
|
||||
refreshInventoryFilter();
|
||||
}
|
||||
|
||||
void LLFloaterTexturePicker::onPickerCallback(const std::vector<std::string>& filenames, LLHandle<LLFloater> handle)
|
||||
|
|
|
|||
|
|
@ -78,8 +78,6 @@ public:
|
|||
TEXTURE_CANCEL
|
||||
} ETexturePickOp;
|
||||
|
||||
// Should match the entries in floater_texture_ctrl.xml
|
||||
// for the textures_material_combo combo box
|
||||
typedef enum e_pick_inventory_type
|
||||
{
|
||||
PICK_TEXTURE_MATERIAL = 0,
|
||||
|
|
@ -356,8 +354,6 @@ public:
|
|||
static void onBakeTextureSelect(LLUICtrl* ctrl, void *userdata);
|
||||
static void onHideBaseMeshRegionCheck(LLUICtrl* ctrl, void *userdata);
|
||||
|
||||
static void onSelectTextureMaterials(LLUICtrl* ctrl, void *userdata);
|
||||
|
||||
void setLocalTextureEnabled(BOOL enabled);
|
||||
void setBakeTextureEnabled(BOOL enabled);
|
||||
|
||||
|
|
@ -366,6 +362,9 @@ public:
|
|||
static void onPickerCallback(const std::vector<std::string>& filenames, LLHandle<LLFloater> handle);
|
||||
|
||||
protected:
|
||||
void refreshLocalList();
|
||||
void refreshInventoryFilter();
|
||||
|
||||
LLPointer<LLViewerTexture> mTexturep;
|
||||
LLView* mOwner;
|
||||
|
||||
|
|
@ -387,7 +386,6 @@ protected:
|
|||
BOOL mActive;
|
||||
|
||||
LLFilterEditor* mFilterEdit;
|
||||
LLComboBox* mTextureMaterialsCombo;
|
||||
LLInventoryPanel* mInventoryPanel;
|
||||
PermissionMask mImmediateFilterPermMask;
|
||||
PermissionMask mDnDFilterPermMask;
|
||||
|
|
|
|||
|
|
@ -139,77 +139,28 @@
|
|||
visible="false"
|
||||
width="87" />
|
||||
|
||||
<layout_stack name="inventory_stack"
|
||||
width="231"
|
||||
height="276"
|
||||
top="20"
|
||||
left="175"
|
||||
follows="all"
|
||||
animate="false"
|
||||
orientation="vertical">
|
||||
<layout_panel name="combo_layout"
|
||||
border="false"
|
||||
bevel_style="in"
|
||||
auto_resize="false"
|
||||
user_resize="false"
|
||||
visible="false"
|
||||
width="231"
|
||||
height="24">
|
||||
<combo_box
|
||||
follows="left|top|right"
|
||||
height="23"
|
||||
label="Choose Textures, Materials or LIFE!"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="textures_material_combo"
|
||||
top="0"
|
||||
width="231">
|
||||
<combo_box.item
|
||||
label="Materials & Textures"
|
||||
name="Materials_Textures"
|
||||
value="0" />
|
||||
<combo_box.item
|
||||
label="Textures"
|
||||
name="Textures"
|
||||
value="1" />
|
||||
<combo_box.item
|
||||
label="Materials"
|
||||
name="Materials"
|
||||
value="2" />
|
||||
</combo_box>
|
||||
</layout_panel>
|
||||
<layout_panel name="inventory_layout"
|
||||
border="false"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="false"
|
||||
visible="true"
|
||||
width="231"
|
||||
height="252">
|
||||
<filter_editor
|
||||
follows="left|top|right"
|
||||
height="23"
|
||||
label="Filter Textures"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="inventory search editor"
|
||||
top="4"
|
||||
width="231" />
|
||||
<asset_filtered_inv_panel
|
||||
allow_multi_select="false"
|
||||
bg_visible="true"
|
||||
bg_alpha_color="DkGray2"
|
||||
border="false"
|
||||
follows="all"
|
||||
height="221"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="inventory panel"
|
||||
top_pad="4"
|
||||
width="231"
|
||||
filter_asset_types="texture|material"/>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
<filter_editor
|
||||
follows="left|top|right"
|
||||
height="23"
|
||||
label="Filter Textures"
|
||||
layout="topleft"
|
||||
left="175"
|
||||
name="inventory search editor"
|
||||
top="20"
|
||||
width="231" />
|
||||
<asset_filtered_inv_panel
|
||||
allow_multi_select="false"
|
||||
bg_visible="true"
|
||||
bg_alpha_color="DkGray2"
|
||||
border="false"
|
||||
follows="all"
|
||||
height="242"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="inventory panel"
|
||||
top_pad="4"
|
||||
width="231"
|
||||
filter_asset_types="texture|material"/>
|
||||
|
||||
<!-- middle: local mode -->
|
||||
<button
|
||||
|
|
|
|||
Loading…
Reference in New Issue