Skip to content

Instantly share code, notes, and snippets.

@masterpoppy
Last active October 26, 2019 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masterpoppy/fe709193d88913665482c890181afcc5 to your computer and use it in GitHub Desktop.
Save masterpoppy/fe709193d88913665482c890181afcc5 to your computer and use it in GitHub Desktop.
http-inとブラウザを利用してtimestampの混入を廃して一括で膨大なTexture UUID Listを作成するやつ。
//********************************
// UUID List Maker(http-in).lsl
// 2017-08-23 MasterPoppy
//********************************
// http-inとブラウザを利用してtimestampの混入を廃して一括で膨大なTexture UUID Listを作成するやつ。
// プリムにスクリプトを入れたあと、テクスチャを投入してタッチするだけで動作します。
//********************************
key request;
string URI;
string name;
string str;
title()
{
llSetText("*UUID List Maker*\nDrop textures and Touch.", <1,1,1>, 1.0);
}
default
{
state_entry()
{
title();
}
touch_start(integer index)
{
if(llDetectedKey(0) == llGetOwner()){
integer i;
integer count = llGetInventoryNumber(INVENTORY_TEXTURE);
str = "// \"TextureName\", \"TextureUUID\"\n";
for(i = 0; i < count; i++){
name = llGetInventoryName(INVENTORY_TEXTURE, i);
str += "\"" + name + "\", \"" + (string)llGetInventoryKey(name) + "\",\n";
llSetText("Proccesing " + (string)i + "/" + (string)count + " " + name, <1,1,1>, 1.0);
}
}
llReleaseURL(URI);
request = llRequestURL();
title();
}
http_request(key id, string method, string body)
{
if(request == id){
request = "";
if (method == URL_REQUEST_GRANTED){
URI = body;
llLoadURL(llGetOwner(), "Open URL and copy the UUID list.", URI);
}
}
else{
if(method == "GET"){
llSetContentType(id, CONTENT_TYPE_TEXT);
llHTTPResponse(id, 200, "list listUUID = [\n" + str + "0];");
//llHTTPResponse(id, 200, response);
llSetObjectDesc("");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment