// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Face appearance snapshot console // Not compiled or tested in-world // Setup: Set FACE. Saving captures diffuse, color, glow, fullbright, mapping and legacy bump. Touch, then enter RESTORE in the owner text box after manual experiments. // Stop / restore: Enter RESTORE before removing if you want the startup appearance. Removing alone does not undo manual edits. // Notes: Does not capture PBR, normal/specular maps or texture animation. Original texture access must permit restoration. Snapshot disappears at reset. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer FACE=0; list saved; integer channel; integer handle; close() { if(handle)llListenRemove(handle); handle=0; llSetTimerEvent(0.0); } default { state_entry() { saved=[PRIM_TEXTURE,FACE]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_TEXTURE,FACE]); saved+=[PRIM_COLOR,FACE]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_COLOR,FACE]); saved+=[PRIM_GLOW,FACE]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_GLOW,FACE]); saved+=[PRIM_FULLBRIGHT,FACE]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_FULLBRIGHT,FACE]); saved+=[PRIM_TEXGEN,FACE]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_TEXGEN,FACE]); saved+=[PRIM_BUMP_SHINY,FACE]+llGetLinkPrimitiveParams(LINK_THIS,[PRIM_BUMP_SHINY,FACE]); } touch_start(integer count) { if(llDetectedKey(0)!=llGetOwner())return; close(); channel=-1000-(integer)llFrand(1000000.0); handle=llListen(channel,"",llGetOwner(),""); llTextBox(llGetOwner(),"Enter RESTORE to apply the startup snapshot to face "+(string)FACE,channel); llSetTimerEvent(30.0); } listen(integer ch,string name,key id,string message) { if(ch!=channel||id!=llGetOwner())return; close(); if(llToUpper(llStringTrim(message,STRING_TRIM))=="RESTORE")llSetLinkPrimitiveParamsFast(LINK_THIS,saved); } timer() { close(); } changed(integer change) { if(change&CHANGED_OWNER)llResetScript(); } }