Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Texture Dimensions

Ned Calhoun
Registered User
Join date: 17 Jun 2006
Posts: 1
06-29-2006 10:20
Is there a function to determine a texture's x,y dimensions given its UUID? I want resize a prim using llSetPrimitiveParams() to fit a given texture. The end result should be no distortion of the texture.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
06-29-2006 12:03
No, there's not. The closest thing you can get is to manually select the prim face that the texture is on and hit control-alt-shift-T (debug->rendering->show selected texture info). You also get the resolution in the texture picker as you're picking the texture. I don't think there's an automated way to do this.

Now that I think about it, there really can't ever be an automated way of doing this added, because of how textures are handled. The server scales your texture to the nearest power of two in each dimension, it seems... so it doesn't store the fact that your texture was actually at a 3:5 aspect ratio or whatever. You'll need to store this yourself.