Replace image - size issue
Moderators: Víctor Paredes, Belgarath, slowtiger
Replace image - size issue
When replacing bitmap artwork through "source image..." the new bitmap is stretched/squashed to fit the same space the old one occupied which means that if you make any changes to a piece which involves making it a different size you have to import it as a completely new image and go through the setup process for that part all over again, position/rotation/scale, bone rigging etc.
Right now I just make sure the dimensions are the same when I replace it. If I use a transparent .png for example I create it on a canvas with identical size.
Reindert.
www.nobudgetvideo.com
Reindert.
www.nobudgetvideo.com
I try to do that as much as possible as well but sometimes that is impossible.
It only works if you change the part to a smaller size. I guess that you could always work with an empty safe area around your images but that would add unessesary weight to them as well as some extra steps when creating your artwork.
It only works if you change the part to a smaller size. I guess that you could always work with an empty safe area around your images but that would add unessesary weight to them as well as some extra steps when creating your artwork.
You're right, but planning will always be an important part of animation. I should know, I never plan ahead and have to work myself out of problems constantly! Storyboards? We don't need no stinkin' storyboards!
Reindert.
www.nobudgetvideo.com
Reindert.
www.nobudgetvideo.com
Re: Replace image - size issue
This bug is still alive in 2019 (Moho 12.5) huh...
"Set Source Image" doesn't help at all, but I found out that if you do this "Set Source Image" routine via script, it fixes broken proportions.
I wrote a VERY simple script. There are two versions: first one fixes only selectad image layer and the second versoion fixes all the image layers.
To install it, just unpack all the files from ZIP archive to "...\Moho content\Moho Pro\scripts\tool\" folder and restart Moho. You will notice shrtcuts in the tools panel.
Hope it will help someone, cause I couldn't find any solutions for this annoying bug for a long time.
Script files: https://yadi.sk/d/UakPmCqbJUdO6w
or topic on the other forum if filehosting link is dead: http://2danimator.ru/showthread.php?t=10178
"Set Source Image" doesn't help at all, but I found out that if you do this "Set Source Image" routine via script, it fixes broken proportions.
I wrote a VERY simple script. There are two versions: first one fixes only selectad image layer and the second versoion fixes all the image layers.
To install it, just unpack all the files from ZIP archive to "...\Moho content\Moho Pro\scripts\tool\" folder and restart Moho. You will notice shrtcuts in the tools panel.
Hope it will help someone, cause I couldn't find any solutions for this annoying bug for a long time.
Script files: https://yadi.sk/d/UakPmCqbJUdO6w
or topic on the other forum if filehosting link is dead: http://2danimator.ru/showthread.php?t=10178
Last edited by Ponio on Fri Jan 11, 2019 1:58 am, edited 1 time in total.
- synthsin75
- Posts: 10160
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Replace image - size issue
I, and probably many others here, don't remember my login for the Russian forum, so we can't download your script.
If you want to share it here, please upload it to somewhere like Dropbox, Mediafire, filedropper, etc. and post the link here.
If you want to share it here, please upload it to somewhere like Dropbox, Mediafire, filedropper, etc. and post the link here.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Replace image - size issue
Oh thanks. I forgot that it won't work without authorization. Added link to file hosting.synthsin75 wrote:I, and probably many others here, don't remember my login for the Russian forum, so we can't download your script.
If you want to share it here, please upload it to somewhere like Dropbox, Mediafire, filedropper, etc. and post the link here.
Re: Replace image - size issue
@Ponio, the script sounds very useful, thanks for posting it! Like everybody else here, I wish there was native solution for replacing differently proportioned artwork with its correct proportions, so I'm looking forward to trying it out.
I won't be able to download the script until this weekend but I was wondering, what does the script do to adjust the replacement image to correct proportions? I'm assuming it locks either the x- or y-size to the previous image's size, and then adjusts the other size-axis to fit the new image's proportions. If so, which size-axis gets locked?
I won't be able to download the script until this weekend but I was wondering, what does the script do to adjust the replacement image to correct proportions? I'm assuming it locks either the x- or y-size to the previous image's size, and then adjusts the other size-axis to fit the new image's proportions. If so, which size-axis gets locked?
Last edited by Greenlaw on Fri Jan 11, 2019 8:36 pm, edited 1 time in total.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog on Vimeo | Greenlaw's Demo Reel 2020 Edtion
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog on Vimeo | Greenlaw's Demo Reel 2020 Edtion
- synthsin75
- Posts: 10160
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Replace image - size issue
It just resets the source image, but doing it by script seems to have some advantage over doing it manually. I think this just centers the image, instead of stretching it to the former dimensions.Greenlaw wrote:I won't be able to download the script until this weekend but I was wondering, what does the script do to adjust the replacement image to correct proportions? I'm assuming it locks either the x- or y-size to the previous image's size, and then adjusts the other size-axis to fit the new image's proportions. If so, which size-axis gets locked?
It's basically only doing:
local image = moho:LayerAsImage(moho.layer)
image:SetSourceImage(image:SourceImage())
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Replace image - size issue
Thanks for the explanation Wes! Much simpler than what I imagined.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog on Vimeo | Greenlaw's Demo Reel 2020 Edtion
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog on Vimeo | Greenlaw's Demo Reel 2020 Edtion
Re: Replace image - size issue
Yup, it was really that easy! I wonder why the same function works differently in UI and in script API.Greenlaw wrote:Thanks for the explanation Wes! Much simpler than what I imagined.