This one is over my head. I've been trying things for hours and can't figure it out. All I want to do is programmatically move a curvature key from one frame to another. It seems like
Code: Select all
local vecChannel = curve:Curvature(pointNum)
as per http://www.lostmarble.com/forum/viewtop ... ys#p139010
would give me the channel I want, but I don't see the keys I expect. I'm thinking that would have worked fine prior to Moho 12.
I have seen
http://mohoscripting.com/snippets/5 - Moho curvature to bezier handles conversion
- I don't yet follow it well enough to get it working
- It seems to be focused on getting the control handles, which is not directly what I'm trying to do
http://mohoscripting.com/snippets/4 - Iterate through all the channels in the layer
and I can get it to work for simple cases (ie I tried a 2 point example with only 1 key, after frame 0, so I just moved subchannels 6, 7, 8 and 9), but
- It's a different interface than what I expected. I'm guessing there's a way to get the subchannels from a channel, rather than "moho.layer:Channel(i, j, moho.document)", but I haven't figured that out yet.
- The subchannel id for "moho.layer:Channel(i, j, moho.document)" seems to be a multiple of the number of points. (snippet 5 seems to imply that as well). This may be the only way to get to it, but it seems much more complex than I was expecting.
- It seems far more complex than what I'm trying to do
Thanks for any help!