Reply
Honored Resident
Malestorm
Posts: 58
0 Kudos

llGetTexture - How do I get the UUID of a Texture when it is in inventory

[ Edited ]

I need to pass the UUID of a texture from one object to another one that is not linked.    The first object has the texture in its inventory, the second does not.

There seems to have been a change to IIGetTexture a while back so that if a texture is in an object's inventory, then llGetTexture returns the texture name and not the UUID.   

So my question is, how can I get the UUID of a Texture so that I can pass it via a llSay to another object?

Many thanks for the assistance.

Innula Zenovka
Posts: 6,619
Registered: ‎06-02-2009
0 Kudos

Re: llGetTexture - How do I get the UUID of a Texture when it is in inventory

Reply to Malestorm - view message

You can't unless it's full perms to the owner of the object in whose inventory it is.

So if you want to pass uuids, you're going to need to hard code them in your script (or read them from a notecard, but that's not a terribly safe way of doing it).

 

 

Posts: 4,655
Registered: ‎05-21-2009
0 Kudos

Re: llGetTexture - How do I get the UUID of a Texture when it is in inventory

[ Edited ]

Reply to Malestorm - view message

^^ This

In case you didn't know, if you own the texture full perm, right click the texture in your inventory and choose Copy UUID from the menu and paste it in your script.  Its always better to put the texture UUID in a script than one in the inventory of the prims so that if you sell or give away the item they don't get the textures too. 

If necessary you can make a list of them the script can choose from in the script itself.  You don't need a notecard unless the customer will need to put in their own UUID's.

Photobucket
Honored Resident
Malestorm
Posts: 58
0 Kudos

Re: llGetTexture - How do I get the UUID of a Texture when it is in inventory

Reply to Amethyst Jetaime - view message

Thanks for the suggests.... BUT...

 I never know what textures are going to be in the Master object, so I cannot code UUIDs in the script.   All of these textures will be full perm so they can be passed to another object.

To rephrase my question, how can i force llGetTexture into giving me a UUID instead of an object name (when the object is in its inventory).     Or is there another workaround to get the UUID?

Honored Resident
Malestorm
Posts: 58
0 Kudos

Re: llGetTexture - How do I get the UUID of a Texture when it is in inventory

Reply to Malestorm - view message

Hi... I just wanted to bump this one to see if anyone had any suggestions.   Thanks.

Advisor
Kwakkelde Kwak
Posts: 2,372

Re: llGetTexture - How do I get the UUID of a Texture when it is in inventory

Reply to Malestorm - view message


Malestorm wrote:

There seems to have been a change to IIGetTexture a while back so that if a texture is in an object's inventory, then llGetTexture returns the texture name and not the UUID.


I can think of one way, but it means you will have to move around and adjust some scripts.

I didn't try it, but I think all you need to do is making sure you don't have the script and texture in the same prim. So let's say you have the script that applies the texture to the object in one prim, that's where you want the texture in the contents aswell. Let that script texture another prim, within the linkset and put the script that reads the currently applied texture in that prim. As I understand it the script will then return the UUID.

"The superior man understands what is right; the inferior man understands what will sell."
Confucius

Honored Resident
Malestorm
Posts: 58
0 Kudos

Re: llGetTexture - How do I get the UUID of a Texture when it is in inventory

Reply to Malestorm - view message

Thank you so much Kwakkelde Kwak.  

This was quite a tough problem (and a real deficiency in the llGetTexture).

To get the Texture Key string and not the texture name from within a prim that contains that texture, you can link a prim to it then insert these lines of code.       texturename is string containing the name of the texture you want to get the ID of.

llSetLinkPrimitiveParams(2,[PRIM_TEXTURE, 2,  texturename, <1,1,1>, <0,0,0>, 0]); 
list params = llGetLinkPrimitiveParams(2,[PRIM_TEXTURE, 2]);
string textureID = llList2String(params, 0); 

 Once you have the textureID it is simple to set that texture on non-linked prims.

Honored Resident
Salahzar Stenvaag
Posts: 11
0 Kudos

Re: llGetTexture - How do I get the UUID of a Texture when it is in inventory

Reply to Malestorm - view message

Absolutely brilliant (!) Thanks for this post and answer to the difficult question. It is coming handy to me now :smileyhappy: