Make all the translations to a layer become 0, without changing the art
Moderators: Víctor Paredes, Belgarath, slowtiger
Make all the translations to a layer become 0, without changing the art
I sometimes run into problems when animating a layer that has been translated, scaled and rotated previously. The layer remembers the old scale, angle, and XYZ (the numbers are visible in the boxes above the workspace). This is fine, and I like it. But sometimes it makes animation more difficult for me.
Is there a way to make all the layer numbers become 0, while at the same time maintaining the translation, scale and rotation so that the image doesn't change?
Is there a way to make all the layer numbers become 0, while at the same time maintaining the translation, scale and rotation so that the image doesn't change?
Re: Make all the translations to a layer become 0, without changing the art
No.
Workaround: render this layer only and re-import the image.
Workaround: render this layer only and re-import the image.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
Re: Make all the translations to a layer become 0, without changing the art
Hayasidist's Bake To PNG does that. It has many uses, and is super useful for situations like that. You just select the layer or group you want to bake, click the muffin button, and the script renders the current frame of the selection and places it in a new layer above. You can get it here:
http://www.lostmarble.com/forum/viewtop ... ng#p182406
I mostly use it to convert a vector layer to a PNG because the vector version isn't deforming satisfactorily in a mesh warp. Unlike rendering and importing, the script maintains the scale, position and any other transforms that have been applied.
I seem to recall a script that flattens a transform, which is different from baking (rendering) the transforms to an image. Unfortunately, I don't remember what it was called and I'd have to look for it. A search in these forums should turn it up.
http://www.lostmarble.com/forum/viewtop ... ng#p182406
I mostly use it to convert a vector layer to a PNG because the vector version isn't deforming satisfactorily in a mesh warp. Unlike rendering and importing, the script maintains the scale, position and any other transforms that have been applied.
I seem to recall a script that flattens a transform, which is different from baking (rendering) the transforms to an image. Unfortunately, I don't remember what it was called and I'd have to look for it. A search in these forums should turn it up.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
- synthsin75
- Posts: 10269
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Make all the translations to a layer become 0, without changing the art
If you're talking about vector art, it's usually better to do vector animation instead of layer animation.
- 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: Make all the translations to a layer become 0, without changing the art
This would be a good feature request. There’s many situations in which I’d need this too (especially scale). I like how you can apply a change in Blender and it becomes the new ‘0’ state or ‘100%’ scale. Moho could use that too for sure!
Re: Make all the translations to a layer become 0, without changing the art
Yeah, Maya has that, it's called Freeze Transformations. It's a handy feature when you need it, but if you're not careful, it can really mess you up too. 
I can recall one or two times where I've wanted to do that in Moho. Knowing me, I probably just used brute force to get what I needed back then.

I can recall one or two times where I've wanted to do that in Moho. Knowing me, I probably just used brute force to get what I needed back then.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
- hayasidist
- Posts: 3846
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Make all the translations to a layer become 0, without changing the art
there's my "bake vector" script too ... http://www.lostmarble.com/forum/viewtop ... 13#p194770
Re: Make all the translations to a layer become 0, without changing the art
Thanks for all the replies.
I just learned that baking is another word for rendering. Haha, that's awesome.
I think this is what I'll do: modify my animation process to prefer moving points rather than layers. Animation sometimes gets confusing when I employ both layer animation and vector animation to the same shapes. If that doesn't reduce my confusion, I'll try the script.
Thanks for the help everybody.
I just learned that baking is another word for rendering. Haha, that's awesome.
Ah. That's probably why I run into this situation so often: too much layer animation.synthsin75 wrote: ↑Sat Jun 05, 2021 7:16 pm If you're talking about vector art, it's usually better to do vector animation instead of layer animation.
I think this is what I'll do: modify my animation process to prefer moving points rather than layers. Animation sometimes gets confusing when I employ both layer animation and vector animation to the same shapes. If that doesn't reduce my confusion, I'll try the script.
Thanks for the help everybody.
Re: Make all the translations to a layer become 0, without changing the art
'Baking' usually means one of two things....
1. generating a keyframe for every frame in an animation. This is usually done to remove calculations from IK, dynamics or some procedural displacement, to optimize animation performance. It's also done for animation compatibility with another program.
or...
2. flattening a procedural, vector, or displaced image(s) to one bitmap layer...so, yeah, in this case it's basically rendering. This is typically done for the same reasons as above.
Oops...I forgot about Paul's Bake Vector script. This one flattens the deformations and transforms so you wind up with a new vector graphic. This can be super useful too since the result is an editiable vector graphic, unlike the PNG generated by the Bake To PNG script. (Thanks for the reminder Paul...I need to add this one to my Moho 13.5 custom content folder.)
1. generating a keyframe for every frame in an animation. This is usually done to remove calculations from IK, dynamics or some procedural displacement, to optimize animation performance. It's also done for animation compatibility with another program.
or...
2. flattening a procedural, vector, or displaced image(s) to one bitmap layer...so, yeah, in this case it's basically rendering. This is typically done for the same reasons as above.
Oops...I forgot about Paul's Bake Vector script. This one flattens the deformations and transforms so you wind up with a new vector graphic. This can be super useful too since the result is an editiable vector graphic, unlike the PNG generated by the Bake To PNG script. (Thanks for the reminder Paul...I need to add this one to my Moho 13.5 custom content folder.)

Last edited by Greenlaw on Mon Jun 07, 2021 3:16 am, edited 2 times in total.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
Re: Make all the translations to a layer become 0, without changing the art
Gadzooks, I think I misunderstood what constitutes "baking." Thanks for a more specific definition.
Re: Make all the translations to a layer become 0, without changing the art
Hoptoad wrote: ↑Sat Jun 05, 2021 2:16 pm I sometimes run into problems when animating a layer that has been translated, scaled and rotated previously. The layer remembers the old scale, angle, and XYZ (the numbers are visible in the boxes above the workspace). This is fine, and I like it. But sometimes it makes animation more difficult for me.
Is there a way to make all the layer numbers become 0, while at the same time maintaining the translation, scale and rotation so that the image doesn't change?
Yes. If you are talking about a vector layer you can use Hayasidist's Bake Frame script (now I see that he mentioned it too here) It takes all the "external elements" that move points, like bones, layers, etc, and bakes them into the actual vector art, creating a new simple vector layer that looks exactly the same as the frame where you activated this script but all its layer numbers will be at 0 like you want. Of course if what you have is an image layer, the Bake into PNG script is what you need, not this. But if you are working with a vector layer you probably don't want to bake it into an image.
You have it here (working fine on 12.5, probably on 13.5 too): http://www.mediafire.com/file/374qob23a ... s_bake.lua
If you don't know how to install scripts, watch this: https://www.youtube.com/watch?v=TUw1dhpBNEs&t=3s
Once installed, you need to be at a different frame than 0 and also on the main timeline (not on an action's timeline) to be able to activate this script. So if you want to bake the frame 0, just make a frame look as the frame 0, and bake that frame pressing the "Bake Frame" button. It will leave that layer exactly as it was, but will create a new vector layer outside of any layer group. That new layer will have its vector art on frame 0 modified to look exactly as the frame you baked but without any layer or bone influence on its points. If you don't want to use this new layer but the original for whatever reason, just create a point keyframe of the new vector layer on frame 1 for example, copy that point keyframe (that contains the position of all those points) and paste it on the frame 0 of the original vector layer, and then put its layer's numbers at 0.
A little bit complex to explain but test it and you will understand. Very useful script that can be used in a lot of ways for a lot of reasons.
I'm going to take this moment to make this a feature request because It would be very cool to have this functionality officially supported and expanded.
There is another useful script made by Dkwroot called Bake Bones that have some similarities and differences. I will leave this link here in case someone wants to look into it: https://www.lostmarble.com/forum/viewtopic.php?p=173732
Re: Make all the translations to a layer become 0, without changing the art
I watched the video and installed the script. It works, thank you. The script's author mentioned the script earlier in the thread, but I was hesitant to try it, since I wasn't sure if it would work on 12.5 and evidently he wasn't sure either (this was discussed in the thread he'd linked). But you said it works, and it does.
By the way, the script doesn't have a button; there is only the default question mark with a green X through it.
This is what I used Hayasidist's Bake Frame script on already...
I used Import>Moho Object to add a switch layer (filled with numerous hands) to a new character. The switch layer arrived in the wrong location and angle, of course, so I translated it and rotated it on frame 0, which altered all the numbers. I then "baked" the switch layer, resetting the numbers to zero. This should eliminate a problem I often encounter: an imported switch layer starts moving and spinning during my animation and I'm like, "Oh no! What's going on with my-? Oh, right...the switch layer was imported."
Re: Make all the translations to a layer become 0, without changing the art
Haha the more time you use the sofware the more you'll love that script.Hoptoad wrote: ↑Mon Jun 07, 2021 3:43 pm
I watched the video and installed the script. It works, thank you. The script's author mentioned the script earlier in the thread, but I was hesitant to try it, since I wasn't sure if it would work on 12.5 and evidently he wasn't sure either (this was discussed in the thread he'd linked). But you said it works, and it does.
By the way, the script doesn't have a button; there is only the default question mark with a green X through it.
This is what I used Hayasidist's Bake Frame script on already...
I used Import>Moho Object to add a switch layer (filled with numerous hands) to a new character. The switch layer arrived in the wrong location and angle, of course, so I translated it and rotated it on frame 0, which altered all the numbers. I then "baked" the switch layer, resetting the numbers to zero. This should eliminate a problem I often encounter: an imported switch layer starts moving and spinning during my animation and I'm like, "Oh no! What's going on with my-? Oh, right...the switch layer was imported."
About the button: I think it doesn't have any icon because its meant to be installed as a menu script. I meant going to the menu script and pressing where it says "Bake Frame". You can see these kind of scripts explained on the video at 4:05 (by the way, I forgot to mention it has english subtittles). Menu scripts are usually preferred when you are not going to use the script very frecuently, so it doesn't need to take space on your tool panel (trust me, you will value that space because there are a lot of awesome scripts). And if you hadn't seen the script menu before, take a look at the scripts that you already have there by default, some are cool!
Re: Make all the translations to a layer become 0, without changing the art
Oops, I put it in the wrong place. I watched a video the other day that said almost all Moho scripts are tools, so I mistakenly guessed that Bake Frame was a tool.Daxel wrote: ↑Mon Jun 07, 2021 7:31 pm About the button: I think it doesn't have any icon because its meant to be installed as a menu script. I meant going to the menu script and pressing where it says "Bake Frame". You can see these kind of scripts explained on the video at 4:05 (by the way, I forgot to mention it has english subtittles). Menu scripts are usually preferred when you are not going to use the script very frecuently, so it doesn't need to take space on your tool panel (trust me, you will value that space because there are a lot of awesome scripts). And if you hadn't seen the script menu before, take a look at the scripts that you already have there by default, some are cool!
I moved it into the menu. I wasn't sure what sub-folder to put it in, so I made a new sub-folder with a 1 as the first character of its name, so it'll be at the top of the list. The script appeared as expected. Maybe I'll put all the nifty menu scripts I add in there.
I had used the Split Curve, but that's it. I'll be sure to check-out the others. I'm finally in the stage of my Moho education where I'm learning the cool stuff. I used Follow Path the other day. Holy cow, that tool is amazing.
Re: Make all the translations to a layer become 0, without changing the art
The Muffin Button!!
...Sorry couldn't resist (thought of the ginger bread man in 'Shrek' )
now back to your regularly scheduled post
"Animation is not the art of drawings that move but the art of movements that are drawn."
Norman McLaren
My Animations
Norman McLaren
My Animations