summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorTonya Souther <tonya.souther@gmail.com>2013-01-29 21:19:58 -0600
committerTonya Souther <tonya.souther@gmail.com>2013-01-29 21:19:58 -0600
commit1751c965ba1ffd1a89a3b94542624e70cbde1060 (patch)
tree6bbcb7f9686865afc85590ae6996e78148189274 /indra/newview/llselectmgr.cpp
parentca1f57307a76af2f7c381269e05af74307f9468a (diff)
Editing interface for normal and specular maps and other parameters.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index c3c37141ed..9f9e39527f 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -63,6 +63,7 @@
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
#include "llinventorymodel.h"
+#include "llmaterialmgr.h"
#include "llmenugl.h"
#include "llmeshrepository.h"
#include "llmutelist.h"
@@ -2009,6 +2010,37 @@ void LLSelectMgr::selectionSetGlow(F32 glow)
mSelectedObjects->applyToObjects( &func2 );
}
+void LLSelectMgr::selectionSetMaterial(LLMaterial& material)
+{
+ struct f1 : public LLSelectedTEFunctor
+ {
+ LLMaterial mMaterial;
+ f1(LLMaterial material) : mMaterial(material) {};
+ bool apply(LLViewerObject* object, S32 face)
+ {
+ if (object->permModify())
+ {
+ LLMaterialMgr::getInstance()->put(object->getID(),face,mMaterial);
+ }
+ return true;
+ }
+ } func1(material);
+ mSelectedObjects->applyToTEs( &func1 );
+
+ struct f2 : public LLSelectedObjectFunctor
+ {
+ virtual bool apply(LLViewerObject* object)
+ {
+ if (object->permModify())
+ {
+ object->sendTEUpdate();
+ }
+ return true;
+ }
+ } func2;
+ mSelectedObjects->applyToObjects( &func2 );
+}
+
//-----------------------------------------------------------------------------
// findObjectPermissions()