diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp
index e6cc06e8d01a1220581153c1216d8d740eb88b35..7bf3c6553e528fdcc8c35133d885534718c90a86 100644
--- a/indra/llcommon/llassettype.cpp
+++ b/indra/llcommon/llassettype.cpp
@@ -96,7 +96,8 @@ LLAssetDictionary::LLAssetDictionary()
 	addEntry(LLAssetType::AT_WIDGET,            new AssetEntry("WIDGET",            "widget",   "widget",           false,      false,      false));
 	addEntry(LLAssetType::AT_PERSON,            new AssetEntry("PERSON",            "person",   "person",           false,      false,      false));
 	addEntry(LLAssetType::AT_SETTINGS,          new AssetEntry("SETTINGS",          "settings", "settings blob",    true,       true,       true));
-	addEntry(LLAssetType::AT_UNKNOWN,           new AssetEntry("UNKNOWN",           "invalid",  NULL,               false,      false,      false));
+    addEntry(LLAssetType::AT_MATERIAL,          new AssetEntry("MATERIAL",          "material", "material",         true,       false,      true));
+    addEntry(LLAssetType::AT_UNKNOWN,           new AssetEntry("UNKNOWN",           "invalid",  NULL,               false,      false,      false));
     addEntry(LLAssetType::AT_NONE,              new AssetEntry("NONE",              "-1",		NULL,		  		FALSE,		FALSE,		FALSE));
 
 };
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index 652c548d59a54c91998540a10679534e35a22621..102795786306d60332701438ab5f66f206c98bb4 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -127,8 +127,10 @@ class LL_COMMON_API LLAssetType
         AT_RESERVED_6 = 55,
 
         AT_SETTINGS = 56,   // Collection of settings
+
+        AT_MATERIAL = 57,
             
-		AT_COUNT = 57,
+		AT_COUNT = 58,
 
 			// +*********************************************************+
 			// |  TO ADD AN ELEMENT TO THIS ENUM:                        |
diff --git a/indra/llinventory/llfoldertype.h b/indra/llinventory/llfoldertype.h
index 1f174520dae476a74eea7b5dc6a7e627f4841168..19f4d61b5b7e5672af334c6c01abcbacfa06d955 100644
--- a/indra/llinventory/llfoldertype.h
+++ b/indra/llinventory/llfoldertype.h
@@ -93,9 +93,13 @@ class LL_COMMON_API LLFolderType
 
         FT_SETTINGS = 56,
 
+        FT_MATERIAL = 57,
+
 		FT_COUNT,
 
 		FT_NONE = -1
+
+        // When adding, see note at bottom of LLAssetType::Etype
 	};
 
 	static EType 				lookup(const std::string& type_name);
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp
index 853ed655f5264d0beb10edefdd5bff656d71b81c..71223d65b98f952e4a5b1ee1f4024465a1284336 100644
--- a/indra/llinventory/llinventorytype.cpp
+++ b/indra/llinventory/llinventorytype.cpp
@@ -154,6 +154,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
     LLInventoryType::IT_NONE,			// 54   AT_RESERVED_5
 
     LLInventoryType::IT_SETTINGS,       // 55   AT_SETTINGS
+    LLInventoryType::IT_MATERIAL,       // 56   AT_MATERIAL
 };
 
 // static
diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h
index b6e7fb047f8f5ea12529aea0826f2f8163261b0e..e1aac054f6fb5d00893ee029d2824fc07da8009b 100644
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
@@ -65,7 +65,8 @@ class LLInventoryType
 		IT_WIDGET = 23,
 		IT_PERSON = 24,
         IT_SETTINGS = 25,
-		IT_COUNT = 26,
+        IT_MATERIAL = 26,
+		IT_COUNT = 27,
 
 		IT_UNKNOWN = 255,
 		IT_NONE = -1
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 30dbd7248f40b55114782916916026e8274cbc59..f46e993f8e0818bf4557a8521c02870e47d3bdf2 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -76,7 +76,8 @@ enum EDragAndDropType
 	DAD_WIDGET          = 16,
 	DAD_PERSON          = 17,
     DAD_SETTINGS        = 18,
-	DAD_COUNT           = 19,   // number of types in this enum
+    DAD_MATERIAL        = 19,
+	DAD_COUNT           = 20,   // number of types in this enum
 };
 
 // Reasons for drags to be denied.
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index c34010ce433d82d300bef6e2ca4a1cae8dad6d6b..34a546f458195f5d4f852412983329b3fbc15666 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -2542,14 +2542,58 @@ void LLPanelFace::onAlignTexture(void* userdata)
     self->alignTestureLayer();
 }
 
+#include "llagent.h"
+#include "llfilesystem.h"
+#include "llfloaterperms.h"
+#include "llviewerassetupload.h"
+#include "llviewermenufile.h"
+#include "llsd.h"
+#pragma warning (disable: 4189)
 void LLPanelFace::onSaveMaterial(void* userdata)
 {
+    // DRTVWR-559, Q&D material picker - save to inventory goes here
+    LL_DEBUGS("Material") << "saving material to inventory" << LL_ENDL;
+
     LLPanelFace* self = (LLPanelFace*)userdata;
+
+    std::string name = "New Material";
+
+    LLSD* mat_llsd = new LLSD("Surely you jest...");
+    // TBD populate mat_llsd with material data
+    self->onCloseTexturePicker(*mat_llsd);   // certainly wrong, but something like this?
+
+    // gen a new uuid for this asset
+    LLTransactionID tid;
+    tid.generate();
+    LLAssetID new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
+
+    LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_MATERIAL, LLFileSystem::WRITE);
+    fmt_file.write(mat_llsd->asBinary().data(), mat_llsd->size());
+
+    S32 expected_upload_cost = 0;// LLAgentBenefitsMgr::current().getTextureUploadCost();
     
-    // DRTVWR-559, Q&D material picker - save to inventory goes here
-    auto bound = self->getBoundingRect();
-    self->setUseBoundingRect(self->getUseBoundingRect());
-    //self->saveMaterialToInventory();
+    std::string res_name = name;
+    std::string res_desc = "Saved Material";
+    LLFolderType::EType folder_type = LLFolderType::FT_MATERIAL;
+    LLInventoryType::EType inv_type = LLInventoryType::IT_MATERIAL;
+
+    auto upload_info = new LLResourceUploadInfo( 
+        tid, 
+        LLAssetType::AT_MATERIAL,
+        res_name, 
+        res_desc, 
+        0,
+        folder_type,
+        inv_type,
+        PERM_ALL, 
+        LLFloaterPerms::getGroupPerms("Uploads"), 
+        LLFloaterPerms::getEveryonePerms("Uploads"),
+        expected_upload_cost, 
+        false);
+
+    LLResourceUploadInfo::ptr_t p_upload_info(upload_info);
+        
+    upload_new_resource(p_upload_info);
 }
 
 
diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp
index 4804ef6ddcb4f19583a0de80acd9a9e410d02f09..481086f7602ae61f51c014f7e1cdf4d37dd63d8d 100644
--- a/indra/newview/llviewerassettype.cpp
+++ b/indra/newview/llviewerassettype.cpp
@@ -88,6 +88,7 @@ LLViewerAssetDictionary::LLViewerAssetDictionary()
 
 	addEntry(LLViewerAssetType::AT_NONE, 				new ViewerAssetEntry(DAD_NONE));
     addEntry(LLViewerAssetType::AT_SETTINGS,            new ViewerAssetEntry(DAD_SETTINGS));
+    addEntry(LLViewerAssetType::AT_MATERIAL,            new ViewerAssetEntry(DAD_MATERIAL));
 };
 
 EDragAndDropType LLViewerAssetType::lookupDragAndDropType(EType asset_type)