Skip to content
Snippets Groups Projects
Commit 6620c1f8 authored by tonyasouther's avatar tonyasouther
Browse files

Don't set shiny/bumpy texture pickers to NULL unless not editable.

parent 8b24857f
No related branches found
No related tags found
No related merge requests found
...@@ -732,10 +732,13 @@ void LLPanelFace::getState() ...@@ -732,10 +732,13 @@ void LLPanelFace::getState()
texture_ctrl->setImageAssetID( id ); texture_ctrl->setImageAssetID( id );
shinytexture_ctrl->setTentative( FALSE ); shinytexture_ctrl->setTentative( FALSE );
shinytexture_ctrl->setEnabled( editable ); shinytexture_ctrl->setEnabled( editable );
shinytexture_ctrl->setImageAssetID( LLUUID::null ); if (!editable)
{
shinytexture_ctrl->setImageAssetID( LLUUID::null );
bumpytexture_ctrl->setImageAssetID( LLUUID::null );
}
bumpytexture_ctrl->setTentative( FALSE ); bumpytexture_ctrl->setTentative( FALSE );
bumpytexture_ctrl->setEnabled( editable ); bumpytexture_ctrl->setEnabled( editable );
bumpytexture_ctrl->setImageAssetID( LLUUID::null );
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha); getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha); getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha); getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
...@@ -771,10 +774,13 @@ void LLPanelFace::getState() ...@@ -771,10 +774,13 @@ void LLPanelFace::getState()
texture_ctrl->setImageAssetID( id ); texture_ctrl->setImageAssetID( id );
shinytexture_ctrl->setTentative( TRUE ); shinytexture_ctrl->setTentative( TRUE );
shinytexture_ctrl->setEnabled( editable ); shinytexture_ctrl->setEnabled( editable );
shinytexture_ctrl->setImageAssetID( LLUUID::null ); if (!editable)
{
shinytexture_ctrl->setImageAssetID( LLUUID::null );
bumpytexture_ctrl->setImageAssetID( LLUUID::null );
}
bumpytexture_ctrl->setTentative( TRUE ); bumpytexture_ctrl->setTentative( TRUE );
bumpytexture_ctrl->setEnabled( editable ); bumpytexture_ctrl->setEnabled( editable );
bumpytexture_ctrl->setImageAssetID( LLUUID::null );
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha); getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha); getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha); getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
...@@ -1225,6 +1231,7 @@ void LLPanelFace::refresh() ...@@ -1225,6 +1231,7 @@ void LLPanelFace::refresh()
void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMaterialPtr material) void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMaterialPtr material)
{ {
LL_DEBUGS("Materials") << "Loaded material " << material_id.asString() << material->asLLSD() << LL_ENDL;
mMaterial = material; mMaterial = material;
// Alpha // Alpha
...@@ -1283,7 +1290,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate ...@@ -1283,7 +1290,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate
void LLPanelFace::updateMaterial() void LLPanelFace::updateMaterial()
{ {
LL_WARNS("Materials") << "Entered." << LL_ENDL; LL_DEBUGS("Materials") << "Entered." << LL_ENDL;
LLComboBox* comboAlphaMode = getChild<LLComboBox>("combobox alphamode"); LLComboBox* comboAlphaMode = getChild<LLComboBox>("combobox alphamode");
LLComboBox* comboBumpiness = getChild<LLComboBox>("combobox bumpiness"); LLComboBox* comboBumpiness = getChild<LLComboBox>("combobox bumpiness");
LLComboBox* comboShininess = getChild<LLComboBox>("combobox shininess"); LLComboBox* comboShininess = getChild<LLComboBox>("combobox shininess");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment