Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Library: Number All Faces of a Prim

Wildefire Walcott
Heartbreaking
Join date: 8 Nov 2005
Posts: 2,156
09-14-2007 13:32
Sometimes you need to know what side of a prim you're looking at when scripting textures. What follows is a self-deleting script that applies clearly-numbered textures to the corresponding sides of a given prim. You do not need the textures themselves as their UUIDs are hard-coded in the script. The script supports up to 9 texturable faces, which is (as far as I know) the maximum number of faces for a prim in SL- a cube that is both cut and hollowed. The side numbers of the textures are zero-based, just as in LSL. To use the script, just drag it onto the prim. The script will apply the textures, notify you when it's finished, and then delete itself. The textures are all 256x256 and look better in person than they do in the highly-compressed JPEG that appears after the script code:

CODE

// Apply Numbered Faces and Delete Script
// by Illana Ireton (alt of Wildefire Walcott)
// V.1.0 September 13, 2007
// -----
// This script applies numbered textures to every face of a prim and then
// deletes itself when finished. The maximum number of faces any prim
// can have is 9, and that's a hollowed cube, cut in both directions.
// You do not need any textures of your own to use this script; the textures
// are safely stored in a special folder in my inventory and this script
// contains their asset IDs. To apply the textures to your prim simply drag
// and drop the script onto the prim and it will do the rest. The script
// is self-deleting, so you won't have to do any clean-up when it's done.

default
{
state_entry()
{
llSetTexture("511d4910-a2ff-6c3c-9f1d-b0ef6765a34f", 0);
llSetTexture("e03d297f-b6c8-bb42-2270-2398de3ffb21", 1);
llSetTexture("2365780d-bbe9-c8f5-eaeb-7bf44a1b0edc", 2);
llSetTexture("8715d1fa-b7ed-fe33-578d-28dbe283d034", 3);
llSetTexture("a4a8591f-3903-2352-ee69-f7f6bafaf31a", 4);
llSetTexture("c4b2168c-fa14-da55-9cb7-40b89cf93ba2", 5);
llSetTexture("ec019c94-cce0-5961-88c8-bc60b9ff9617", 6);
llSetTexture("b0825c98-cdda-2e4a-a5a9-9adf88dacbf1", 7);
llSetTexture("5e0659fd-89c1-af49-ec33-53e9da0653aa", 8);
llOwnerSay("Textures have been applied. Deleting script...");
llRemoveInventory(llGetScriptName());
}

}


_____________________
Desperation Isle Estates: Great prices, great neighbors, great service!
http://desperationisle.blogspot.com/

New Desperation Isle: The prettiest BDSM Playground and Fetish Mall in SL!
http://desperationisle.com/

Desperation Isle Productions: Skyboxes for lots (and budgets) of all sizes!
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
09-17-2007 00:23
Alternate non script option:

highlight the prim you want or just the face of the prim you want.

press CTRL-ALT-SHIFT-T

You will get all the information you need to know.
Number of the face (if only one face selected)
UUID of the applied texture (If you have the proper permissions)

or a bunch of numbers and UUIDs if you have a prim / object selected.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
09-17-2007 20:13
also this has been around :)

/15/a7/3309/1.html
Ace Albion
Registered User
Join date: 21 Oct 2005
Posts: 866
09-18-2007 03:16
From: Squirrel Wood
Alternate non script option:

highlight the prim you want or just the face of the prim you want.

press CTRL-ALT-SHIFT-T

You will get all the information you need to know.
Number of the face (if only one face selected)
UUID of the applied texture (If you have the proper permissions)

or a bunch of numbers and UUIDs if you have a prim / object selected.


I was so happy when I found this method. The script way was a royal pain, having to copy all my window prims to make template ones.
_____________________
Ace's Spaces! at Deco (147, 148, 24)
ace.5pointstudio.com