string llGetTexture(integer side)
. If this texture is in the inventory
, it returns the name of this texture in the inventory. If it is not in the inventory, it returns the key
of this texture.
Note: If side == ALL_SIDES
0 is used instead.
Compare to llSetTexture
As of 1.6.5, llGetTexture
now return NULL_KEY
when attempting to get the texture on an object without full asset permissions
Q: How do I determine which side of an object this applies to?
A: See side.
Q: How do I get the key of a texture that is no-modify?
A: You don't. LSL doesn't allow you to bypass Second Life's DRM model. Asset permissions still apply.
Q: If I can't get the key of a texture because my object is set to no-modify, is there any way to compare the texture against a given key?
A: No, not yet. There doesn't appear to be a reason stopping the Lindens from adding something like integer llCompareTexture(integer side, key src) which would compare the key of side to that supplied as src, returning either TRUE or FALSE, but this isn't something that exists. Unfortunately, there's currently no way around it. Design your scripts accordingly.
This article wasn't helpful for you? Maybe the related article at the LSL Portal
is able to bring enlightenment.