Replace image - size issue

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Post Reply
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Replace image - size issue

Post by rylleman » Tue Jun 21, 2005 2:57 pm

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.
User avatar
jorgy
Posts: 779
Joined: Sun Sep 05, 2004 8:01 pm
Location: Colorado, USA

Post by jorgy » Tue Jun 21, 2005 4:04 pm

Sometimes I use this as a fact. Maybe a checkbox like "Keep current animation in place during import?" is called for?
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman » Tue Jun 21, 2005 5:23 pm

I agree, a tick box to choose if I want this or not would be a good solution.
nobudget
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm
Contact:

Post by nobudget » Tue Jun 21, 2005 6:44 pm

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
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman » Tue Jun 21, 2005 7:11 pm

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.
nobudget
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm
Contact:

Post by nobudget » Tue Jun 21, 2005 7:18 pm

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
User avatar
jorgy
Posts: 779
Joined: Sun Sep 05, 2004 8:01 pm
Location: Colorado, USA

Post by jorgy » Tue Jun 21, 2005 8:03 pm

I'm thaaaaaaaaaaaat close to having my first animation done. And I swear, as God as my witness, that I will not do another animation without storyboards or an animatic.
Ponio
Posts: 3
Joined: Thu Jan 10, 2019 10:46 pm

Re: Replace image - size issue

Post by Ponio » Thu Jan 10, 2019 11:31 pm

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
Last edited by Ponio on Fri Jan 11, 2019 1:58 am, edited 1 time in total.
User avatar
synthsin75
Posts: 7091
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Replace image - size issue

Post by synthsin75 » Fri Jan 11, 2019 1:17 am

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.
- Wes
ImageImageImage
Ponio
Posts: 3
Joined: Thu Jan 10, 2019 10:46 pm

Re: Replace image - size issue

Post by Ponio » Fri Jan 11, 2019 2:03 am

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.
Oh thanks. I forgot that it won't work without authorization. Added link to file hosting.
User avatar
Greenlaw
Posts: 4360
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Replace image - size issue

Post by Greenlaw » Fri Jan 11, 2019 7:23 pm

@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?
Last edited by Greenlaw on Fri Jan 11, 2019 8:36 pm, edited 1 time in total.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2017
Lead Digital Animator, Dreamworks Animation

Image
User avatar
synthsin75
Posts: 7091
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Replace image - size issue

Post by synthsin75 » Fri Jan 11, 2019 7:54 pm

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 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.

It's basically only doing:
local image = moho:LayerAsImage(moho.layer)
image:SetSourceImage(image:SourceImage())
- Wes
ImageImageImage
User avatar
Greenlaw
Posts: 4360
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Replace image - size issue

Post by Greenlaw » Fri Jan 11, 2019 8:36 pm

Thanks for the explanation Wes! Much simpler than what I imagined. :)
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2017
Lead Digital Animator, Dreamworks Animation

Image
Ponio
Posts: 3
Joined: Thu Jan 10, 2019 10:46 pm

Re: Replace image - size issue

Post by Ponio » Sat Jan 12, 2019 1:15 pm

Greenlaw wrote:Thanks for the explanation Wes! Much simpler than what I imagined. :)
Yup, it was really that easy! I wonder why the same function works differently in UI and in script API.
Post Reply