|
Jake Neutron
Registered User
Join date: 3 May 2009
Posts: 6
|
08-02-2009 04:03
I'm building something that I want to be able to change textures with via a dialog selection. I have this working ok so far, and I am doing this by using the UUID of each texture I want to display. It occurs to me that if I leave all of the textures in my inventory (not the object) it will still work if I hard code the required UUID's into the script, and indeed it does work. My understanding about how this works is that although I have the texture in my inventory, all I *actually* have is a reference to the texture that exists on the asset server, and any script I supply that reference to can use it. So, instead of distributing textures with the object I am making, I could hard-code the UUID's, or perhaps even use a Notecard that lists the UUID's. Is this something that is commonly done, or even good practice? Just trying to understand some things.  Thanks.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
08-02-2009 04:16
From: Jake Neutron Is this something that is commonly done, or even good practice? yes, and maybe... its a good practice if those textures won't be changed out for other ones, it's highly questionable if they will.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Jake Neutron
Registered User
Join date: 3 May 2009
Posts: 6
|
08-02-2009 04:23
From: Void Singer it's highly questionable if they will. Indeed, that had crossed my mind too! I think I will put the textures in the objects' inventory, however this was an interesting exercise. Thanks for the quick reply.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
08-02-2009 04:40
My skybox has some hardcoded sky textures in the script, but it also looks for textures in the contents, and I provide a "bonus" sky texture to demonstrate how that works.
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
08-02-2009 06:24
i have a vendor i'm working on, i have some default textures hard-coded for when the end user doesn't provide a texture. it's notecard configured, and to save time in content loading, the uuid can be put into the notecards instead of referencing a texture by name from the objects contents.
the only problem i have, is there's no way to test the uuid to see if it's a valid texture uuid before using it. if it tries to apply a texture from a uuid that's not really a texture, but it's still a valid uuid, it applies the gray goo texture, but llGetTexture still returns the uuid that was used to apply it. and of course if it's a string that's not a valid uuid, and it's not the name of a texture in the contents you get a shouting error
|