SL-18448 Material Editor and Tools floater adjustments
1. Enable glow 2. Added buttons to texture->pbrmaster
parent
105f50478c
commit
b6a35e36d7
|
|
@ -201,6 +201,8 @@ BOOL LLPanelFace::postBuild()
|
|||
|
||||
childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
|
||||
childSetAction("button align textures", &LLPanelFace::onAlignTexture, this);
|
||||
childSetAction("pbr_from_inventory", &LLPanelFace::onClickBtnLoadInvPBR, this);
|
||||
childSetAction("edit_selected_pbr", &LLPanelFace::onClickBtnEditPBR, this);
|
||||
|
||||
LLTextureCtrl* mTextureCtrl;
|
||||
LLTextureCtrl* mShinyTextureCtrl;
|
||||
|
|
@ -237,9 +239,6 @@ BOOL LLPanelFace::postBuild()
|
|||
pbr_ctrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
|
||||
pbr_ctrl->setBakeTextureEnabled(false);
|
||||
pbr_ctrl->setInventoryPickType(LLTextureCtrl::PICK_MATERIAL);
|
||||
|
||||
// TODO - design real UI for activating live editing
|
||||
pbr_ctrl->setRightMouseUpCallback(boost::bind(&LLPanelFace::onPbrStartEditing, this));
|
||||
}
|
||||
|
||||
mTextureCtrl = getChild<LLTextureCtrl>("texture control");
|
||||
|
|
@ -968,6 +967,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
pbr_ctrl->setImageAssetID(pbr_id);
|
||||
has_pbr_material = pbr_id.notNull();
|
||||
}
|
||||
getChildView("pbr_from_inventory")->setEnabled(editable);
|
||||
getChildView("edit_selected_pbr")->setEnabled(editable && has_pbr_material);
|
||||
|
||||
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
|
||||
LLTextureCtrl* shinytexture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
|
||||
|
|
@ -1469,8 +1470,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
LLSelectedTE::getGlow(glow,identical_glow);
|
||||
getChild<LLUICtrl>("glow")->setValue(glow);
|
||||
getChild<LLUICtrl>("glow")->setTentative(!identical_glow);
|
||||
getChildView("glow")->setEnabled(editable && !has_pbr_material);
|
||||
getChildView("glow label")->setEnabled(editable && !has_pbr_material);
|
||||
getChildView("glow")->setEnabled(editable);
|
||||
getChildView("glow label")->setEnabled(editable);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -1746,6 +1747,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
getChildView("label shininess")->setEnabled(FALSE);
|
||||
getChildView("label bumpiness")->setEnabled(FALSE);
|
||||
getChildView("button align")->setEnabled(FALSE);
|
||||
getChildView("pbr_from_inventory")->setEnabled(FALSE);
|
||||
getChildView("edit_selected_pbr")->setEnabled(FALSE);
|
||||
//getChildView("has media")->setEnabled(FALSE);
|
||||
//getChildView("media info set")->setEnabled(FALSE);
|
||||
|
||||
|
|
@ -2677,6 +2680,8 @@ void LLPanelFace::updateVisibility()
|
|||
|
||||
// PBR controls
|
||||
getChildView("pbr_control")->setVisible(show_pbr);
|
||||
getChildView("pbr_from_inventory")->setVisible(show_pbr);
|
||||
getChildView("edit_selected_pbr")->setVisible(show_pbr);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -3651,6 +3656,19 @@ void LLPanelFace::onAlignTexture(void* userdata)
|
|||
self->alignTestureLayer();
|
||||
}
|
||||
|
||||
void LLPanelFace::onClickBtnLoadInvPBR(void* userdata)
|
||||
{
|
||||
// Shouldn't this be "save to inventory?"
|
||||
LLPanelFace* self = (LLPanelFace*)userdata;
|
||||
LLTextureCtrl* pbr_ctrl = self->findChild<LLTextureCtrl>("pbr_control");
|
||||
pbr_ctrl->showPicker(true);
|
||||
}
|
||||
|
||||
void LLPanelFace::onClickBtnEditPBR(void* userdata)
|
||||
{
|
||||
LLMaterialEditor::loadLive();
|
||||
}
|
||||
|
||||
enum EPasteMode
|
||||
{
|
||||
PASTE_COLOR,
|
||||
|
|
@ -4580,17 +4598,6 @@ void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp)
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanelFace::onPbrStartEditing()
|
||||
{
|
||||
bool identical;
|
||||
LLUUID material_id;
|
||||
LLSelectedTE::getPbrMaterialId(material_id, identical);
|
||||
|
||||
LL_DEBUGS() << "loading material live editor with asset " << material_id << LL_ENDL;
|
||||
|
||||
LLMaterialEditor::loadLive();
|
||||
}
|
||||
|
||||
bool LLPanelFace::isIdenticalPlanarTexgen()
|
||||
{
|
||||
LLTextureEntry::e_texgen selected_texgen = LLTextureEntry::TEX_GEN_DEFAULT;
|
||||
|
|
|
|||
|
|
@ -228,6 +228,8 @@ protected:
|
|||
static void onCommitRepeatsPerMeter( LLUICtrl* ctrl, void* userinfo);
|
||||
static void onClickAutoFix(void*);
|
||||
static void onAlignTexture(void*);
|
||||
static void onClickBtnLoadInvPBR(void* userdata);
|
||||
static void onClickBtnEditPBR(void* userdata);
|
||||
|
||||
public: // needs to be accessible to selection manager
|
||||
void onCopyColor(); // records all selected faces
|
||||
|
|
@ -438,7 +440,6 @@ private:
|
|||
*/
|
||||
void onTextureSelectionChanged(LLInventoryItem* itemp);
|
||||
void onPbrSelectionChanged(LLInventoryItem* itemp);
|
||||
void onPbrStartEditing();
|
||||
|
||||
LLMenuButton* mMenuClipboardColor;
|
||||
LLMenuButton* mMenuClipboardTexture;
|
||||
|
|
|
|||
|
|
@ -237,6 +237,36 @@
|
|||
tool_tip="Adjust all maps repeats simultaneously"
|
||||
top_pad="19"
|
||||
width="160" />
|
||||
<texture_picker
|
||||
can_apply_immediately="true"
|
||||
allow_no_texture="true"
|
||||
follows="left|top"
|
||||
height="80"
|
||||
label="PBR "
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="pbr_control"
|
||||
tool_tip="Click to choose a pbr material"
|
||||
top_pad="5"
|
||||
width="64" />
|
||||
<button
|
||||
follows="left|top"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
top_delta="0"
|
||||
name="pbr_from_inventory"
|
||||
label="Choose from inventory"
|
||||
width="140"/>
|
||||
<button
|
||||
follows="left|top"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="4"
|
||||
name="edit_selected_pbr"
|
||||
label="Edit Selected"
|
||||
width="140"/>
|
||||
<texture_picker
|
||||
can_apply_immediately="true"
|
||||
default_image_name="Default"
|
||||
|
|
@ -248,19 +278,7 @@
|
|||
left="10"
|
||||
name="texture control"
|
||||
tool_tip="Click to choose a picture"
|
||||
top_pad="5"
|
||||
width="64" />
|
||||
<texture_picker
|
||||
can_apply_immediately="true"
|
||||
allow_no_texture="true"
|
||||
follows="left|top"
|
||||
height="80"
|
||||
label="PBR "
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="pbr_control"
|
||||
tool_tip="Click to choose a pbr material"
|
||||
top_delta="0"
|
||||
top_delta="-27"
|
||||
width="64" />
|
||||
<text
|
||||
type="string"
|
||||
|
|
|
|||
Loading…
Reference in New Issue