Jump to content

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


You are about to reply to a thread that has been inactive for 3082 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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.

Link to comment
Share on other sites

^^ 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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites


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.

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 8 months later...
  • 2 years later...

Really old post but another solution is to just loop through all inventory items getting the itemName of i, get the inventory type of itemName and if (type == INVENTORY_TEXTURE) then llOwnerSay((string)llGetIventoryKey(itemName));

 

Textures should be full perm of course.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3082 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...