Page 1 of 1
Creating a Custom Animation Format
Posted: Sat Apr 07, 2018 2:18 am
by Noodle
I am a game programmer who programs in LUA with LOVE2D. I love using moho studio and I need to convert my animation into a custom animation file format I have created, Because I'm not really a fan of using frame-by-frame raster image animations. Is there a scripting function in Moho Studio where it returns all the animation and vector data?
Just wanna show you images my current work because why not:
animation format WIP (currently a table)
Running in-game
Reference Animation
Re: Creating a Custom Animation Format
Posted: Sat Apr 07, 2018 3:05 am
by synthsin75
You would have to use multiple functions to get the layer transforms and point motion of that example individually.
Or read from the Moho file format. Either way, creating your own format sounds very daunting.
Re: Creating a Custom Animation Format
Posted: Sat Apr 07, 2018 6:03 am
by Noodle
synthsin75 wrote:You would have to use multiple functions to get the layer transforms and point motion of that example individually.
Or read from the Moho file format. Either way, creating your own format sounds very daunting.
I understand.
For starters, could you give me a sample code that could only give a single layer transform X & Y data if possible?
Thank you in advance for replying
Re: Creating a Custom Animation Format
Posted: Sat Apr 07, 2018 6:41 am
by synthsin75
Code: Select all
local frame = moho.frame
local xRotation = moho.layer.fRotationX:Getvalue(frame)
local yRotation = moho.layer.fRotationY:Getvalue(frame)
Referenced here:
http://mohoscripting.com/index.php?show ... =MohoLayer