-
script to modify a solid’s dimensions
Hi,
I need a way to modify a layer solid’s width and height with a script (similar to included example). I have looked far and wide, and I can’t seem to find a way of accessing these properties.
Basically, I have a ton of solids that have been scaled to various dimensions. I’d like to reset the scale to 100% and have the layer maintain its shape by resizing its width and height parameters to offset the scale correction.
So if you had a solid that was 200×200, but had been scaled to 50% x 75%, you could run a script that resized the layer to 100×150, and reset the scale to 100%.
Any help would be appreciated!
var layer = app.project.activeItem.selectedLayers[0];
var wid = layer.source.width;
var ht = layer.source.height;
function resizeSolid()
{
wid.setValue(100)
ht.setValue(150)
}resizeSolid();