Help! Reduce imported PSD size and keep proportions

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Víctor Paredes
Site Admin
Posts: 5843
Joined: Tue Jan 25, 2005 3:18 pm
Location: Barcelona/Chile
Contact:

Help! Reduce imported PSD size and keep proportions

Post by Víctor Paredes »

Hi, I need to reduce the size and weight of a PSD file already imported in an AS scene. If I reduce the PSD size to the half, for example, the AS project gets broken, with all the PSD layers at different size and place.
Is there a way to solve this with a script?

I would really appreciate if you could help me today, I'm against the time.
Thank you very much.
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 6:13 am
Location: UK

Re: Help! Reduce imported PSD size and keep proportions

Post by jahnocli »

I seem to remember reading somewhere that if, in the PSD file, you turn all layers' visibility off but one, then export using the "Export to AS" script, the PSD file will import into AS as a switch layer. You could then alter the proportions of this in AS. Or am I missing the point? (Wouldn't be the first time...)
You can't have everything. Where would you put it?
User avatar
heyvern
Posts: 7045
Joined: Thu Sep 01, 2005 8:49 pm

Re: Help! Reduce imported PSD size and keep proportions

Post by heyvern »

The problem is the link to the PSD and it's size. You change the PSD size and the whole thing goes to heck. A script could fix this by scaling up the smaller layer size and shifting the center of each of the PSD layers inside the ASP file. You would need to calculate the size change to make the file smaller, and proportially scale up each layer and proportially shift the center origin. Although... maybe you wouldn't need to shift the origin if the layer is scaled up?

The whole thing has my head spinning a bit... but... that might be the horrific flu I have right now and all the medicines... makes me a bit floaty.
User avatar
hayasidist
Posts: 3907
Joined: Wed Feb 16, 2011 11:12 am
Location: Kent, England

Re: Help! Reduce imported PSD size and keep proportions

Post by hayasidist »

IMO photoshop import needs improving ...there is a script that might help but it's not public domain ... viewtopic.php?f=3&t=24909 ..
User avatar
Víctor Paredes
Site Admin
Posts: 5843
Joined: Tue Jan 25, 2005 3:18 pm
Location: Barcelona/Chile
Contact:

Re: Help! Reduce imported PSD size and keep proportions

Post by Víctor Paredes »

Thank you Jahnocli, but my problem has to be with an already done project.
Vern, I suppose a script could calculate each layer position relatively in relation to the entire PSD size, maybe using percentages instead of pixel position. That could work (according tomy no scripter mind).
I wish you a fast recovery!
hayasidist wrote:IMO photoshop import needs improving ...there is a script that might help but it's not public domain ... viewtopic.php?f=3&t=24909 ..
Too sad it's not public. Could you (or somebody) check if it solves the problem I'm having?
Thanks.
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
synthsin75
Posts: 10363
Joined: Mon Jan 14, 2008 2:20 pm
Location: Oklahoma
Contact:

Re: Help! Reduce imported PSD size and keep proportions

Post by synthsin75 »

No, Victor, that script isn't likely to help your problem any.
User avatar
Víctor Paredes
Site Admin
Posts: 5843
Joined: Tue Jan 25, 2005 3:18 pm
Location: Barcelona/Chile
Contact:

Re: Help! Reduce imported PSD size and keep proportions

Post by Víctor Paredes »

synthsin75 wrote:No, Victor, that script isn't likely to help your problem any.
Thank you very much, Wes.
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
Lukas
Posts: 1337
Joined: Fri Apr 09, 2010 1:00 am
Location: Netherlands
Contact:

Re: Help! Reduce imported PSD size and keep proportions

Post by Lukas »

Not sure if this works, but:

You could make the psd smaller and export it the old way, using export to anme file.

After that you could manually set the new source of each image layer.

Might be a lot of work, but it's worth a shot.
Post Reply