DV Tween Machine v1.0
Moderators: Víctor Paredes, Belgarath, slowtiger
Re: Tween machine (DONE)
Davoodice2 this is BRILLIANT!
I don't know what most of the options do, but the slider alone is magic!
Thanks so much for sharing such a great time saving tool.
I don't know what most of the options do, but the slider alone is magic!
Thanks so much for sharing such a great time saving tool.
- Víctor Paredes
- Site Admin
- Posts: 5718
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Re: Tween machine (DONE)
Hey, davoodice2
I want to try the tool, but the Mediafire link is not working here.
Is anyone else having that issue?
I want to try the tool, but the Mediafire link is not working here.
Is anyone else having that issue?
Moho Product Manager
Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
Re: Tween machine
Oh I see them now. Thanks.davoodice2 wrote: ↑Thu Sep 23, 2021 7:55 am
those parameters are for actual ae_key_tools.I used them in my function. you can find them on middle combo box. slider and percentage text box and ok are for tween machine
Can't find any information about "moho string channel". What is it?
Link seems to be down.
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: Tween machine
I dont know too. . but i Think its a kind of keyframe type.Daxel wrote: ↑Thu Sep 23, 2021 10:37 amOh I see them now. Thanks.davoodice2 wrote: ↑Thu Sep 23, 2021 7:55 am
those parameters are for actual ae_key_tools.I used them in my function. you can find them on middle combo box. slider and percentage text box and ok are for tween machine
Can't find any information about "moho string channel". What is it?
Link seems to be down.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Re: Tween machine (DONE)
--
Last edited by SimplSam on Thu Sep 23, 2021 5:46 pm, edited 1 time in total.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: Tween machine (DONE)
I'm sorry. I fixed thatVíctor Paredes wrote: ↑Thu Sep 23, 2021 9:58 am Hey, davoodice2
I want to try the tool, but the Mediafire link is not working here.
Is anyone else having that issue?
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: Tween machine (DONE)
I hope you find it useful
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- Víctor Paredes
- Site Admin
- Posts: 5718
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Re: Tween machine (DONE)
Thanks! I'm just playing with it. It's a lot of fun and very useful!
I don't know if that makes sense for the way you are using it, but I think it would be great if the keyframes created by this tool had a different color, so you can visually know where the extremes are.
I don't know if that makes sense for the way you are using it, but I think it would be great if the keyframes created by this tool had a different color, so you can visually know where the extremes are.
Moho Product Manager
Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
Re: Tween machine (DONE)
Hey Victor,Víctor Paredes wrote: ↑Thu Sep 23, 2021 5:34 pm Thanks! I'm just playing with it. It's a lot of fun and very useful!
I don't know if that makes sense for the way you are using it, but I think it would be great if the keyframes created by this tool had a different color, so you can visually know where the extremes are.
Here's what I found is excellent:
Open the motion graph, as the keys are going on all selected bones, if you just have one of the channels showing it'll reflect the changes ( I guess) on all the keys that are being laid.
You can easily see the ease and overshoot there, it's just like the Maya tween machine , but super elegant
- Víctor Paredes
- Site Admin
- Posts: 5718
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Re: Tween machine (DONE)
Yes! thanks, I was just checking that!
I was just wondering about retakes. I'm not sure yet, but I was thinking it would be nice to have these special keys labeled with a special color. That would make the timeline easier to understand and also it would be easier to remove these interpolations and apply them again with different values.
I hope it makes sense.
I was just wondering about retakes. I'm not sure yet, but I was thinking it would be nice to have these special keys labeled with a special color. That would make the timeline easier to understand and also it would be easier to remove these interpolations and apply them again with different values.
I hope it makes sense.
Moho Product Manager
Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
- synthsin75
- Posts: 10045
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Tween machine
The switch layer channel is an example of a string channel, as it's keyframes store the active layer name. Other examples are layer and shape ordering, that store ordered lists of layer/shape names.
A string is just a string of number/letter characters.
- 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: Tween machine (DONE)
Yes, it does ,make sense, I use coloured keys a lot, it's super useful especially when bones are coloured by 'groups' ( eg. right leg)Víctor Paredes wrote: ↑Thu Sep 23, 2021 6:16 pm Yes! thanks, I was just checking that!
I was just wondering about retakes. I'm not sure yet, but I was thinking it would be nice to have these special keys labeled with a special color. That would make the timeline easier to understand and also it would be easier to remove these interpolations and apply them again with different values.
I hope it makes sense.
What about a symbol, ( like the interpolation ones ) could it be a dash instead of a full key circle, then the combined power of colours and shape could ne leveraged?
Just spit balling, to see if anything sticks .
Hey I was just watching some a recording of live scripting ( sounds agonizing, especially as I have no clue about code), but it was cool to see the dev collaborating with other scripters in the chat to build the code with their help.
This could be a good thing for Moho users to try, Eh?
Re: Tween machine
Thanks!synthsin75 wrote: ↑Thu Sep 23, 2021 6:45 pm The switch layer channel is an example of a string channel, as it's keyframes store the active layer name. Other examples are layer and shape ordering, that store ordered lists of layer/shape names.
A string is just a string of number/letter characters.
Víctor Paredes wrote: ↑Thu Sep 23, 2021 6:16 pm I'm not sure yet, but I was thinking it would be nice to have these special keys labeled with a special color. That would make the timeline easier to understand and also it would be easier to remove these interpolations and apply them again with different values.
I hope it makes sense.
Yes any improvement on timeline legibility works wonders on animation.
Re: Tween machine (DONE)
Great work!
I'm excited to use that Tween Machine functionality.
Have you tried getting it to preview the new pose while dragging the slider? That's one thing that I really miss when I tried it. Now its a bit too much trial-and-error to get the keys right, which makes it slower or at least more tedious than manually posing the overshoot in my case.
The toolbar is also a bit crowded and unclear. Maybe cut down on the buttons and focus on the slider + its settings? I would also maybe have the slider go from -50% to 150% so you can show slider-ticks every 50% (or -100% to 200% and a tick every 100%). Because it would be nice to see where the 0% and 100% points are.
I'm excited to use that Tween Machine functionality.
Have you tried getting it to preview the new pose while dragging the slider? That's one thing that I really miss when I tried it. Now its a bit too much trial-and-error to get the keys right, which makes it slower or at least more tedious than manually posing the overshoot in my case.
The toolbar is also a bit crowded and unclear. Maybe cut down on the buttons and focus on the slider + its settings? I would also maybe have the slider go from -50% to 150% so you can show slider-ticks every 50% (or -100% to 200% and a tick every 100%). Because it would be nice to see where the 0% and 100% points are.
Re: Tween machine (DONE)
This makes it show a preview of the pose while sliding the slider:Lukas wrote: ↑Fri Sep 24, 2021 9:58 amHave you tried getting it to preview the new pose while dragging the slider? That's one thing that I really miss when I tried it. Now its a bit too much trial-and-error to get the keys right, which makes it slower or at least more tedious than manually posing the overshoot in my case.
Code: Select all
elseif msg == self.SLIDER_CHANGE then
if not self.undoPrepped then
moho.document:PrepMultiUndo()
moho.document:SetDirty()
self.undoPrepped = true
end
self.slidertext:SetValue(self.slider:Value())
self.slidertextVal = self.slider:Value()
self.sliderVal = self.slider:Value()
self:SetKeyTween(moho,self.slider:Value())
moho:UpdateUI()
moho.layer:UpdateCurFrame()
if(not self.slider:IsMouseDragging()) then
self.undoPrepped = false
end
This shows ticks at 0% and 100%
Code: Select all
self.slider = LM.GUI.Slider(500,false,false, self.SLIDER_CHANGE)
layout:AddChild(self.slider)
self.slider:SetRange(-100,200)
self.slider:SetNumTicks(3)
self.slider:SetShowTicks(true)
self.slider:SetSnapToTicks(false)
self.slider:SetFatSlider(true)
Code: Select all
-- **************************************************
-- Find key
-- **************************************************
function DV_Key_Tools:FindKey(channels, start_frame, end_frame, moho)
local found_key = false
local layer = moho.layer
local timing_offset
local increment
if end_frame > start_frame then
increment = 1
else
increment = -1
end
if layer.TotalTimingOffset ~= nil then
timing_offset = layer:TotalTimingOffset()
else
timing_offset = 0
end
-- Go through next/previous frames and stop when a keyframe is found
for frame = start_frame, end_frame, increment do
for i, channel in ipairs(channels) do
if channel.HasKey ~= nil and channel:HasKey(frame) then
found_key = true
break
end
end
if found_key then
return frame-timing_offset
end
end
return 0
end
function DV_Key_Tools:UpdateWidgets(moho)
if(not self.slider:IsMouseDragging()) then
local layer = moho.layer
local current_frame
if moho.layerFrame ~= nil then
current_frame = moho.layerFrame
else
current_frame = moho.frame
end
-- Get channels, this could be improved!
local channels = RT_Utilities:get_layer_channels(moho, layer)
-- * Check whether there are any keys to the left of the cursor
local prevKey = self:FindKey(channels, current_frame-1, 0, moho)
local nextKey = self:FindKey(channels, current_frame, moho.document:AnimDuration(), moho)
-- *
local range = math.abs(nextKey-prevKey)
local tempPercentage = (current_frame-prevKey)/range*100
if tempPercentage < 0 then
tempPercentage = 0
elseif tempPercentage >= 100 then
tempPercentage = 0
end
self.sliderVal = tempPercentage
self.slidertextVal = tempPercentage
end
self.slider:SetValue(self.sliderVal)
self.slidertext:SetValue(self.slidertextVal)
Code: Select all
-- * Fix:
if nID == channel:CountKeys() then
return
end
-- * Before:
fromFrameN = channel:GetKeyWhen(nID)