Friday, May 30, 2008

Prim Texture Tips 1

I highly recomend another blog (Second View) for scripting help and other info... and the tips included below are snipits from some of his blog posts. But I wanted to post some of the data here for easy viewing, although I highly recomend you check out his blog for more information and tutorails for builders and scripters.



How to find the side number of a prim:

Assume that you have just rezzed a cube, and haven’t rotated it in any way. The sides will be numbered as follows:

top: 0
side with lowest y: 1
side with highest x: 2
side with highest y: 3
side with lowest x: 4
bottom: 5

If you hollow the cube, side 5 is the inside (all four interior sides count as a single side), and the bottom becomes side 6.

----alternatively, or for non-cubed prims----

Activate the Advanced Menu by holding down CTRL+ALT+d on your keyboard. The Advanced menu should appear on the main Second Life menu. Once this menu is showing, edit the prim you want to investigate. Click the ‘Select Texture’ option, and select the face you want to check. Then hold down CTRL+SHIFT+ALT+t on your keyboard. Details of the texture will appear in the bottom-left of your screen, including the face number.


How to Specify Textures in Scripting

There are two different ways of specifying the texture. You can either use the name of the texture, or you can use the asset UUID of the texture.

To use the name, the texture must be included in the prim’s contents (just drag the texture from your inventory into the contents list of the prim).

To find the UUID, right-click on the texture in your inventory, and select the Copy Asset UUID option. You can then paste the result into the script. The advantage with using the UUID is that the texture does not need to be in the prim’s inventory. (Note: Once a texture is uploaded in SL, it is permanently added to the asset server, and deleting it from your inventory has no effect on it — you simply won’t be able to refer to it by name any longer. It will still exist on the server, and you can still use the UUID to refer to it in an object's script for use.)

No comments: