diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 82081ca853510a35a02ca3ca8be838ddc2721f28..41ee3941ac77a6e4ab75de7e1ca3f600289dbdc7 100755
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -3178,16 +3178,6 @@ BOOL LLVolume::isFlat(S32 face)
 }
 
 
-LLVolumeParams::LLVolumeParams( LLProfileParams &profile,
-								LLPathParams &path,
-								LLUUID sculpt_id,
-								U8 sculpt_type) :
-mProfileParams(profile),
-mPathParams(path)
-{
-	setSculptID(sculpt_id, sculpt_type);
-}
-
 bool LLVolumeParams::isSculpt() const
 {
 	return mSculptID.notNull();
@@ -3504,24 +3494,7 @@ bool LLVolumeParams::setSkew(const F32 skew_value)
 bool LLVolumeParams::setSculptID(const LLUUID sculpt_id, U8 sculpt_type)
 {
 	mSculptID = sculpt_id;
-	// Check sculpt type value, it consist of type and flags
-	U8 type = sculpt_type & LL_SCULPT_TYPE_MASK;
-	U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK;
-	if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX)
-	{
-		if (sculpt_id != LLUUID::null)
-		{
-			mSculptType = LL_SCULPT_TYPE_MESH;
-		}
-		else
-		{
-			mSculptType = LL_SCULPT_TYPE_SPHERE;
-		}
-	}
-	else
-	{
-		mSculptType = sculpt_type;
-	}
+	mSculptType = sculpt_type;
 	return true;
 }
 
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 06688cacc9a2428c472c9fa89729dbaf23c1f6bd..e1161682b51c77ee4eb497f4a73346a68623e775 100755
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -560,10 +560,11 @@ class LLVolumeParams
 	{
 	}
 
-	LLVolumeParams( LLProfileParams &profile,
-					LLPathParams &path,
-					LLUUID sculpt_id = LLUUID::null,
-					U8 sculpt_type = LL_SCULPT_TYPE_NONE);
+	LLVolumeParams(LLProfileParams &profile, LLPathParams &path,
+				   LLUUID sculpt_id = LLUUID::null, U8 sculpt_type = LL_SCULPT_TYPE_NONE)
+		: mProfileParams(profile), mPathParams(path), mSculptID(sculpt_id), mSculptType(sculpt_type)
+	{
+	}
 
 	bool operator==(const LLVolumeParams &params) const;
 	bool operator!=(const LLVolumeParams &params) const;
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 8e009972d07d03fde20cf9226d3a1ba101ccd89f..9eff74f1e834ac1c7d3700a61d37d6f593e5bd60 100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -1869,9 +1869,12 @@ BOOL LLSculptParams::pack(LLDataPacker &dp) const
 
 BOOL LLSculptParams::unpack(LLDataPacker &dp)
 {
-	dp.unpackUUID(mSculptTexture, "texture");
-	dp.unpackU8(mSculptType, "type");
-	
+	U8 type;
+	LLUUID id;
+	dp.unpackUUID(id, "texture");
+	dp.unpackU8(type, "type");
+
+	setSculptTexture(id, type);
 	return TRUE;
 }
 
@@ -1896,8 +1899,7 @@ bool LLSculptParams::operator==(const LLNetworkData& data) const
 void LLSculptParams::copy(const LLNetworkData& data)
 {
 	const LLSculptParams *param = (LLSculptParams*)&data;
-	mSculptTexture = param->mSculptTexture;
-	mSculptType = param->mSculptType;
+	setSculptTexture(param->mSculptTexture, param->mSculptType);
 }
 
 
@@ -1915,20 +1917,38 @@ LLSD LLSculptParams::asLLSD() const
 bool LLSculptParams::fromLLSD(LLSD& sd)
 {
 	const char *w;
-	w = "texture";
+	U8 type;
+	w = "type";
 	if (sd.has(w))
 	{
-		setSculptTexture( sd[w] );
-	} else goto fail;
-	w = "type";
+		type = sd[w].asInteger();
+	}
+	else return false;
+
+	w = "texture";
 	if (sd.has(w))
 	{
-		setSculptType( (U8)sd[w].asInteger() );
-	} else goto fail;
-	
+		setSculptTexture(sd[w], type);
+	}
+	else return false;
+
 	return true;
- fail:
-	return false;
+}
+
+void LLSculptParams::setSculptTexture(const LLUUID& texture_id, U8 sculpt_type)
+{
+	U8 type = sculpt_type & LL_SCULPT_TYPE_MASK;
+	U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK;
+	if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX)
+	{
+		mSculptTexture.set(SCULPT_DEFAULT_TEXTURE);
+		mSculptType = LL_SCULPT_TYPE_SPHERE;
+	}
+	else
+	{
+		mSculptTexture = texture_id;
+		mSculptType = sculpt_type;
+	}
 }
 
 //============================================================================
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index db7327e900ac85b6e581c107ad0b768e447a869c..54870fbb104c3cd49f5ed69125520db9be49a45f 100755
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -259,9 +259,8 @@ class LLSculptParams : public LLNetworkData
 	operator LLSD() const { return asLLSD(); }
 	bool fromLLSD(LLSD& sd);
 
-	void setSculptTexture(const LLUUID& id) { mSculptTexture = id; }
+	void setSculptTexture(const LLUUID& texture_id, U8 sculpt_type);
 	LLUUID getSculptTexture() const         { return mSculptTexture; }
-	void setSculptType(U8 type)             { mSculptType = type; }
 	U8 getSculptType() const                { return mSculptType; }
 };
 
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 4e9947fca0ff6fab2d78b98af714a3215b26aded..46c1ffa789073da26e4f1296a6f5ed7b78ff7932 100755
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -515,7 +515,7 @@ void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id)
 			{
 				LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
 				LLSculptParams new_params(*old_params);
-				new_params.setSculptTexture(new_id);
+				new_params.setSculptTexture(new_id, (*old_params).getSculptType());
 				object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE);
 			}
 		}
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 420f8fde2ecb825922f4c30a08545be61800bbdf..5dd44b4444f5cda6a84b02b83b93cb53ed76b044 100755
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -1739,9 +1739,10 @@ void LLPanelObject::sendSculpt()
 		return;
 	
 	LLSculptParams sculpt_params;
+	LLUUID sculpt_id = LLUUID::null;
 
 	if (mCtrlSculptTexture)
-		sculpt_params.setSculptTexture(mCtrlSculptTexture->getImageAssetID());
+		sculpt_id = mCtrlSculptTexture->getImageAssetID();
 
 	U8 sculpt_type = 0;
 	
@@ -1765,7 +1766,7 @@ void LLPanelObject::sendSculpt()
 	if ((mCtrlSculptInvert) && (mCtrlSculptInvert->get()))
 		sculpt_type |= LL_SCULPT_FLAG_INVERT;
 	
-	sculpt_params.setSculptType(sculpt_type);
+	sculpt_params.setSculptTexture(sculpt_id, sculpt_type);
 	mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
 }
 
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index b8df063c5351f20134716c74ccddc935bec491d7..b9177f2d12ee4878f53b7b92e93f957d52de2b59 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1140,8 +1140,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,
 	}
 
 	LLSculptParams sculpt_params;
-	sculpt_params.setSculptTexture(asset_id);
-	sculpt_params.setSculptType(LL_SCULPT_TYPE_MESH);
+	sculpt_params.setSculptTexture(asset_id, LL_SCULPT_TYPE_MESH);
 	hit_obj->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
 	
 	dialog_refresh_all();