[Opensim-users] Can I rely on consistent UUIDs for things imported from different grids using IAR/OAR files?

Jeff Kelley opensim at pescadoo.net
Tue Mar 27 14:13:50 UTC 2012


At 2:49 AM +0100 3/27/12, Edmund Edgar wrote:

>> FontTexture = llGetInventoryKey(texture_name);
>>
> Thanks Jeff, that was my fallback plan.
>
> But I'd rather use the UUIDs if I can do it reliably because:
> 1) It makes the script simpler.
> 2) If more than one of the object is rezzed on the same grid, I'm
> hoping using the same UUIDs for all of them will allow the textures to
> be cached in the viewer, so they'll load faster the second time a user
> encounters the object.


With llGetInventoryKey, you are actually using UUID. Except you do not have
to know it in advance, instead you use an inventory entry to retrieve it.
It is "soft coded" rather than "hard coded".

If more than one of the object is rezed on the same grid, the asset is not
duplicated and the result of llGetInventoryKey will be the same for each
object. Remember, an inventory entry is just a *pointer* to an asset.

When you export an object, textures are exported as uuid.jp2 (not
name.jp2). When importing again, we expect the viewer NOT to upload the
texture if it already exists on the grid. Actually, the re-imported object
has the same texture(s) UUID(s).

In theory, if we take care to preserve UUIDs over all export formats, there
should never be asset duplication, even inter-grid (hope i am right here).
Asset duplication occurs only when the same file is uploaded multiple times.


-- 
Jean-Yves Bernier



More information about the Opensim-users mailing list