texture keys don't show up in llKey2Name
|
|
Jasmin Summers
Registered User
Join date: 16 Feb 2006
Posts: 23
|
06-04-2006 15:06
Why is it that when I use llSay(0,llKey2Name("d516d594-44d4-2683-a868-d2963629d8eb"  ; it doesn't display the key. This key is the key of a texture, it works with object keys, avatar keys, but not texture key's. Is there another way to convert a texture key to display the name of it?
|
|
Neb Soyer
Really good looking.
Join date: 9 Apr 2006
Posts: 45
|
06-04-2006 15:46
Well first, it's a typo ( syntax error ). And because I believe a key is only subject to agents, and objects. Textures are somehow different, they are 'Client Asset Keys'. If I'm correct here, I'll try and explain it; textures are downloaded to your computer so that you can view them, the keys are referring to the textures via your computer.
With objects, and agents, their information/data is stored on the server, the keys for them referring to their data stored on the server.
Someone tell me if I'm way off here if you know for certain.
-neb.
Oh, yeah: Scripts work off the server, they cant access your computer files. The only out-world communication they can do is with things like llEmail/dataserver and llHTTPRequest, etc.
_____________________
down in the ghetto.
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
06-04-2006 15:47
llKey2Name will only work on objects/agents (avatars) in the same simulator as it. If the texture is in your object's inventory then you can get it using llGetInventoryName() and the other inventory functions.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
|
06-04-2006 16:01
Neb, texture keys aren't local, they are server side, how else could I go to my inventory, copy the UUID of a texture, go make a script that says: default { state_entry() { llSetTexture(<copied UUID>, ALL_SIDES); } }
and have it work?
|
|
Neb Soyer
Really good looking.
Join date: 9 Apr 2006
Posts: 45
|
06-04-2006 16:14
From: Draco18s Majestic Neb, texture keys aren't local, they are server side, how else could I go to my inventory, copy the UUID of a texture, go make a script that says: default { state_entry() { llSetTexture(<copied UUID>, ALL_SIDES); } }
and have it work? I knew there'd be a fault somewhere in my method. But what I said kind of makes sence, sure you copy the UUID and you relate to it from a script - I'm still sure that textures aren't stored on the server, the UUID for each unique texture is so that the data can be passed around and related to. My opinion/method on this is I'll admit very 'sketchy', but I do think that it's around the right idea. I'd appreciate it for someone who positively knows all the facts on this to tell myself, and others interested what the whole method is exactly.
_____________________
down in the ghetto.
|
|
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
|
06-04-2006 16:46
If it's not on the server, then where is it? If it's on my machine, how does everyone else see it when my computer is turned off?
|
|
Ardith Mifflin
Mecha Fiend
Join date: 5 Jun 2004
Posts: 1,416
|
06-04-2006 18:30
The UIUD of a texture is not like an avatar's key, and llKey2Name cannot be used to retrieve the name of a texture based on the UIUD. Why? Because the UIUD refers to a single resource file (e.g. a texture, sound, etc) and not to any specific copy of that file.
For example, "coord2" from my Preview inventory 7cb224bc-d81a-2054-fc0a-7633d65a7654 "coord" also from my Preview inventory: 7cb224bc-d81a-2054-fc0a-7633d65a7654
Notice how both of these textures have the same UIUD, despite having different names? My guess is that the actual texture file is only stored once, no matter how many copies exist. Each copy of the texture has the same UIUD and points to the same file, even if the name of the texture in your inventory may be different. Since the UIUD is the only info used to access the texture, it's likely that the name of the texture is never actually associated with the UIUD. The name is only associated with the texture in your inventory. It's just a shortcut to the actual file which you have conveniently named.
That's my theory.
|
|
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
|
06-04-2006 22:40
From: Ardith Mifflin The UIUD of a texture It's UUID not UIUD. Universal Unique IDentifier.
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
06-05-2006 03:37
I think the thing is that textures are handled by the asset server, as are objects that are not in-world. However, once an object or avatar is in-world, it is passed over to the simulator that it is in. Since scripts are run by the simulator, they can only easily fetch information that the simulator has access to, as such the name of a texture is not available as the simulator doesn't care about that, unless the texture is inventory within an object.
That and LL have not added any functions to request texture names. What is your reason for requiring it? I suspect also, due to the re-usable nature of the texture keys (you'll notice sometimes if you have multiple copies of a texture, and apply one to an object, if you then open up the texture picker again it may be pointing to the wrong copy, ie not the one you picked), it wouldn't be possible for it to fetch the correct name anyway, unless that texture only ever had one copy.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Eddy Stryker
libsecondlife Developer
Join date: 6 Jun 2004
Posts: 353
|
06-05-2006 03:46
You should check the wiki when you are curious about how a function works. http://secondlife.com/badgeo/wakka.php?wakka=llKey2NameWorks on objects or agents that are currently in the same sim as the script making the call. Textures don't even have names, so I'm not sure what you were trying to achieve with llKey2Name("some_texture_key"  ; Instances of textures in your inventory have names, but those are inventory objects that link to textures, not textures themselves. If you post a little bit more depth about what you are trying to do maybe someone can figure out a solution.
|
|
Ardith Mifflin
Mecha Fiend
Join date: 5 Jun 2004
Posts: 1,416
|
06-05-2006 06:58
From: Draco18s Majestic It's UUID not UIUD. Universal Unique IDentifier. Thanks Cptn. Pedantic.
|