• Announcements

    • Xiola Linden

      The New Community Platform   03/21/2017

      We are still working on making adjustments and changes to the new platform. Thanks  to everyone who has been sending in feedback and filing any bugs you've encountered! 
Sign in to follow this  
Followers 0
Malestorm1488303118

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

9 posts in this topic

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.

Share this post


Link to post
Share on other sites

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

 

 

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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.

1 person likes this

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0