From 65fe41eb6e0df6029e9187a26e1aee5f27fa70d6 Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Wed, 8 Mar 2023 10:02:53 -0800
Subject: [PATCH] SL-19330: Fix texture animation in wrong direction when
 setting material on another side

---
 indra/newview/llvovolume.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 853c5809640..e69dea34449 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -670,6 +670,21 @@ void LLVOVolume::animateTextures()
                 }
                 else
                 {
+                    if (!(result & LLViewerTextureAnim::ROTATE))
+                    {
+                        rot = 0.0f;
+                    }
+                    if (!(result & LLViewerTextureAnim::TRANSLATE))
+                    {
+                        off_s = 0.0f;
+                        off_t = 0.0f;
+                    }
+                    if (!(result & LLViewerTextureAnim::SCALE))
+                    {
+                        scale_s = 1.0f;
+                        scale_t = 1.0f;
+                    }
+
                     // For PBR materials, use Blinn-Phong rotation as hint for
                     // translation direction. In a Blinn-Phong material, the
                     // translation direction would be a byproduct the texture
-- 
GitLab