// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Copy one face style to another // Not compiled or tested in-world // Setup: Set SOURCE and TARGET to different existing faces in one prim. Owner-touch copies the limited style; touch again restores target. // Stop / restore: Owner-touch again to restore the startup snapshot before removal or reset, unless setup describes a different cycle. Do not relink during a preview. // Notes: Use a spare modifiable build. Saved state lives only in script memory. Does not copy PBR, normal/specular maps, alpha mode, texgen or texture animation. Source texture must be readable and reusable. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer SOURCE=0; integer TARGET=1; integer preview; list saved; list capture(integer face) { return [PRIM_TEXTURE,TARGET]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_TEXTURE,face]) +[PRIM_COLOR,TARGET]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_COLOR,face]) +[PRIM_GLOW,TARGET]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_GLOW,face]) +[PRIM_FULLBRIGHT,TARGET]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_FULLBRIGHT,face]); } default { state_entry() { if(TARGET>=0&&TARGET=llGetNumberOfSides()||!llGetListLength(saved))return; preview=!preview; if(preview)llSetLinkPrimitiveParamsFast(LINK_THIS,capture(SOURCE)); else llSetLinkPrimitiveParamsFast(LINK_THIS,saved); } }