I have the feeling that I know who you are,- sounds familiar
(and in case, sorry for the delay, been busy here),
and welcome to polycount
maybe there is a way of reversing the translation or scale so that if you use the packing (no rotation, just moving) and scale it back after it it fills out the rectangle size instead of the max square size.
The downside would be that the padding size would be squeezed at one axis (in your case y-axis because its the shorter of the 2) - but that might be worth a shot before trying to write a packer algorithm yourself.
local p_s = (8/2048)--padding scale
local u_s = 1/(2048/2048);--u/x scale
local v_s = 1/(1024/2048);--v/y scale
uv = selection.modifiers[#unwrap_uvw];
--scale it up to square size
uv.scaleSelectedVerticesCenter u_s 1;--scale on the u axis
uv.scaleSelectedVerticesCenter v_s 2;--on the v axis
uv.unwrap2.pack 1 p_s false false true;
--scale it back to rectangle proportion
uv.scaleSelectedVerticesCenter (1/u_s) 1;--scale on the u axis
uv.scaleSelectedVerticesCenter (1/v_s) 2;--on the v axis
within the maxscript documentation there is the needed pack
method explained (no rotation/ normalize,...)
<void>pack <integer>method <float>spacing <boolean>normalize <boolean>rotate <boolean>fillholes
Lets you pack the texture vertex elements so that they fit within a square space.
method - 0 is a linear packing algorithm fast but not that efficient, 1 is a recursive algorithm slower but more efficient.
spacing - the gap between cluster in percentage of the edge distance of the square
normalize - determines whether the clusters will be fit to 0 to 1 space.
rotate - determines whether a cluster will be rotated so it takes up less space.
fillholes - determines whether smaller clusters will be put in the holes of the larger cluster.
hope that works out
and no I still have not checked the total code out, still kind of busy here