From 4a6dde3b36c7a9bd7ed6602e291b8436fdbd4378 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Sat, 30 Mar 2013 16:06:03 -0500
Subject: [PATCH] NORSPEC-69 Fix for bump and specular map rotation values
 showing up as radians instead of degrees.

---
 indra/newview/llpanelface.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 7b99d5897e5..754a13dd4c9 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1260,7 +1260,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate
 		rot = material->getSpecularRotation();
 		getChild<LLUICtrl>("shinyScaleU")->setValue(repeat_x);
 		getChild<LLUICtrl>("shinyScaleV")->setValue(repeat_y);
-		getChild<LLUICtrl>("shinyRot")->setValue(rot);
+		getChild<LLUICtrl>("shinyRot")->setValue(rot*RAD_TO_DEG);
 		getChild<LLUICtrl>("shinyOffsetU")->setValue(offset_x);
 		getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y);
 		getChild<LLColorSwatchCtrl>("shinycolorswatch")->setOriginal(material->getSpecularLightColor());
@@ -1281,7 +1281,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate
 		rot = material->getNormalRotation();
 		getChild<LLUICtrl>("bumpyScaleU")->setValue(repeat_x);
 		getChild<LLUICtrl>("bumpyScaleV")->setValue(repeat_y);
-		getChild<LLUICtrl>("bumpyRot")->setValue(rot);
+		getChild<LLUICtrl>("bumpyRot")->setValue(rot*RAD_TO_DEG);
 		getChild<LLUICtrl>("bumpyOffsetU")->setValue(offset_x);
 		getChild<LLUICtrl>("bumpyOffsetV")->setValue(offset_y);
 	}
@@ -1333,7 +1333,7 @@ void LLPanelFace::updateMaterial()
 							getChild<LLUICtrl>("bumpyOffsetV")->getValue().asReal());
 			mMaterial->setNormalRepeat(getChild<LLUICtrl>("bumpyScaleU")->getValue().asReal(),
 							getChild<LLUICtrl>("bumpyScaleV")->getValue().asReal());
-			mMaterial->setNormalRotation(getChild<LLUICtrl>("bumpyRot")->getValue().asReal());
+			mMaterial->setNormalRotation(getChild<LLUICtrl>("bumpyRot")->getValue().asReal()*DEG_TO_RAD);
 		}
 		else
 		{
@@ -1351,7 +1351,7 @@ void LLPanelFace::updateMaterial()
 							getChild<LLUICtrl>("shinyOffsetV")->getValue().asReal());
 			mMaterial->setSpecularRepeat(getChild<LLUICtrl>("shinyScaleU")->getValue().asReal(),
 							getChild<LLUICtrl>("shinyScaleV")->getValue().asReal());
-			mMaterial->setSpecularRotation(getChild<LLUICtrl>("shinyRot")->getValue().asReal());
+			mMaterial->setSpecularRotation(getChild<LLUICtrl>("shinyRot")->getValue().asReal()*DEG_TO_RAD);
 		}
 		else
 		{
-- 
GitLab