I got a script for changing the textures on a single side of a prim.
But would it be possible to resize the frame based on the texture selected (without scripting the menu for each and every texture I drop in it) ?
These forums are CLOSED. Please visit the new forums HERE
Detect size of textures and resize prims... |
|
|
MortVent Charron
Can haz cuddles now?
Join date: 21 Sep 2007
Posts: 1,942
|
04-30-2008 21:16
I got a script for changing the textures on a single side of a prim.
But would it be possible to resize the frame based on the texture selected (without scripting the menu for each and every texture I drop in it) ? |
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
04-30-2008 23:28
if you include the dimensions or aspect ratio or something) of the image in the filename, you could use that.
"Ballet Shoe:1:1.5" Break each filename into a list, with ":" as the separator [ Ballet Shoe, 1, 1.5 ] Then you can simply use llList2Float to read out the dimensions, and either do some math with it, or whatever. _____________________
![]() ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura |
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
05-01-2008 08:19
Aside from what Winter says, you're pretty much out of luck - there's no way to get the dimensions of a texture through LSL.
![]() edit: /me visits JIRA and adds.. llGetTextureResolution please! It would be nice to have a way for scripts to get the dimensions of a texture. This would enable things like picture frames that automatically resize to the correct aspect ratio without having to include the resolution in the texture file name. Something like "vector llGetTextureResolution (key textureId)" that returns the resolution in x and y. Maybe even stuff the aspect ratio in .z so scripts can save a few computrons by not having to calculate it themselves. Vote it up at http://jira.secondlife.com/browse/SVC-2266 !! _____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224 - If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left |