merge changes for ui fixes
commit
e44c097aee
|
|
@ -1368,10 +1368,10 @@ void LLPanelFace::updateMaterial()
|
|||
mMaterial.reset();
|
||||
mMaterialID = LLMaterialID::null;
|
||||
// Delete existing material entry...
|
||||
|
||||
LLSelectMgr::getInstance()->selectionRemoveMaterial();
|
||||
// Hold off any further updates till this one's
|
||||
// acknowledged.
|
||||
//mUpdateInFlight = true;
|
||||
mUpdateInFlight = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2017,7 +2017,7 @@ void LLSelectMgr::selectionSetMaterial(LLMaterialPtr material)
|
|||
{
|
||||
if (object->permModify())
|
||||
{
|
||||
llinfos << "Putting material on object " << object->getID() << " face " << face << ", material: " << mMaterial->asLLSD() << llendl;
|
||||
LL_INFOS("Materials") << "Putting material on object " << object->getID() << " face " << face << ", material: " << mMaterial->asLLSD() << LL_ENDL;
|
||||
LLMaterialMgr::getInstance()->put(object->getID(),face,*mMaterial);
|
||||
object->setTEMaterialParams(face,mMaterial);
|
||||
}
|
||||
|
|
@ -2040,6 +2040,37 @@ void LLSelectMgr::selectionSetMaterial(LLMaterialPtr material)
|
|||
mSelectedObjects->applyToObjects( &func2 );
|
||||
}
|
||||
|
||||
void LLSelectMgr::selectionRemoveMaterial()
|
||||
{
|
||||
struct f1 : public LLSelectedTEFunctor
|
||||
{
|
||||
bool apply(LLViewerObject* object, S32 face)
|
||||
{
|
||||
if (object->permModify())
|
||||
{
|
||||
LL_INFOS("Materials") << "Removing material from object " << object->getID() << " face " << face << LL_ENDL;
|
||||
LLMaterialMgr::getInstance()->remove(object->getID(),face);
|
||||
object->setTEMaterialID(face,LLMaterialID::null);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} func1;
|
||||
mSelectedObjects->applyToTEs( &func1 );
|
||||
|
||||
struct f2 : public LLSelectedObjectFunctor
|
||||
{
|
||||
virtual bool apply(LLViewerObject* object)
|
||||
{
|
||||
if (object->permModify())
|
||||
{
|
||||
object->sendTEUpdate();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} func2;
|
||||
mSelectedObjects->applyToObjects( &func2 );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// findObjectPermissions()
|
||||
|
|
|
|||
|
|
@ -543,6 +543,7 @@ public:
|
|||
void selectionSetIncludeInSearch(bool include_in_search);
|
||||
void selectionSetGlow(const F32 glow);
|
||||
void selectionSetMaterial(LLMaterialPtr material);
|
||||
void selectionRemoveMaterial();
|
||||
|
||||
void selectionSetObjectPermissions(U8 perm_field, BOOL set, U32 perm_mask, BOOL override = FALSE);
|
||||
void selectionSetObjectName(const std::string& name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue