// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Compare specular-map and diffuseUV transforms // Not compiled or tested in-world // Setup: Put in a spare owned prim or linkset root. Touch the face or component to inspect. Child scripts may consume touches; face-based tools require a viewer that supplies touched-face data. // Stop / restore: Remove/disable. Inspectors read state and report only to the owner; they do not change the build. // Notes: Does not evaluate roughness or modern glTF/PBR material transforms. Matching is a design choice, not a universal requirement. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Owner-only live inspection. default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; integer link=llDetectedLinkNumber(0); if(link==0)link=LINK_THIS; integer face=llDetectedTouchFace(0); if(face<0) { llOwnerSay("Touch a face."); return; } list diffuse=llGetLinkPrimitiveParams(link,[PRIM_TEXTURE,face]); list specular=llGetLinkPrimitiveParams(link,[PRIM_SPECULAR,face]); if(llList2Key(specular,0)==NULL_KEY) { llOwnerSay("No legacy specular map."); return; } llOwnerSay("Repeat delta="+(string)(llList2Vector(specular,1)-llList2Vector(diffuse,1))+" offset delta="+(string)(llList2Vector(specular,2)-llList2Vector(diffuse,2))+" rotation delta degrees="+(string)((llList2Float(specular,3)-llList2Float(diffuse,3))*RAD_TO_DEG)); } }