## [Fuse] Time Machine Modifier Fuse

SecondMan
Posts: 3383
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 70 times
Contact:

### [Fuse] Time Machine Modifier Fuse

What once was a very complicated Macro is now a handy and much, much faster Modifier Fuse:

## Please note that a newer version of Time Machine is available on Reactor.

TimeMachine1.6_Screenshot.PNG

Retiming has never been this much fun in Fusion!

A quick rundown of the modes:

Warp: scrubs inside the Source Start to Source End range using the Time Warp slider.
Remap: maps Source Start-End to Target Start-End.
Delta: steps through a range in user definable steps. *NEW in 1.2!*
Lock Start: locks Source Start to Target Start frame, and you can use Speed/Step to go from there.
Lock End: locks Source End to Target End frame, and you can use Speed/Step to go from there.
Random: random frames from within the Source range.
Hold: holds a frame.
Skip: skips frames, so a setting of 2 starting from 1 does 111444777...
Offset: offsets your source range forward or backward.
Trigger: repeatedly runs through your frames, based on thresholds. *NEW in 1.4!*
XSheet: retime your source frames using an exposure sheet! *NEW in 1.3!* with a mini scripting engine! *NEW in 1.5!*
Switch: easily switch to user definable starting points. *NEW in 1.6!* (requires Fusion 7.7 or later)

Before/After Time defines the behaviour before or after the Target Range. You can also force a Target Range in modes that don't require it, like Random or Offset.

Now that it's a Modifier Fuse you can use it on a TimeStretcher, or a Time3D, or even (in Fusion 7) any other parameter in Fusion.

Enjoy!

Time Machine is free to use. Donations are not required, but if you find Time Machine useful, please consider supporting We Suck Less.

Become a Patron!
You do not have the required permissions to view the files attached to this post.

Tags:

Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

### Re: [Fuse] Time Machine Modifier Fuse

All hail the newest Fuse developer in town

Fusionator
Posts: 1381
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 9 times

### Re: [Fuse] Time Machine Modifier Fuse

Pet peeve, the multibutton control should using FuID so it's easier to animate. Just had this issue with Twixtor, where the modes are numbers, but have no business interpolating.

Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

### Re: [Fuse] Time Machine Modifier Fuse

Chad wrote:Pet peeve, the multibutton control should using FuID so it's easier to animate. Just had this issue with Twixtor, where the modes are numbers, but have no business interpolating.
This is a good start for the upcoming list of best practices and the Fuse collaboration subforum.

edit:

next up: how to change this without breaking existing comps Is that possible without changing the input ID and using the LegacyID attribute?

Fusionator
Posts: 1381
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 9 times

### Re: [Fuse] Time Machine Modifier Fuse

And you also want to have the same mappings between like inputs on other tools. So changing this would mean changing the others too.

PeterLoveday
Fusioneer
Posts: 143
Joined: Sun Sep 14, 2014 6:09 pm
Been thanked: 13 times

### Re: [Fuse] Time Machine Modifier Fuse

I would probably be inclined to use a multibutton for the rounding mode too. The tristate checkbox is less than obvious I think, and three descriptive buttons on one line would make more sense for no extra space.

Fusionator
Posts: 1381
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 9 times

### Re: [Fuse] Time Machine Modifier Fuse

And another thought (which I don't know how to do)... This is a number modifier. If you wanted other modifiers like Point, Gradient, etc... you'd want to reuse as much code as possible. So either keeping the common functions in one file, or having one .fuse that has all of the types in it. Possible?

PeterLoveday
Fusioneer
Posts: 143
Joined: Sun Sep 14, 2014 6:09 pm
Been thanked: 13 times

### Re: [Fuse] Time Machine Modifier Fuse

There are two ways this is commonly done by Tools in Fusion.

One is the way the Expression modifier does it, which results in it having outputs for all types (Number, Point) regardless of which input it was connected to. This requires a "DataTypeArray" to be used, which is not available for Fuses unfortunately. (I'll add that now)

But the other option *does* work in Fuses... and that is to do it like 'Publish' does.

This involves registering the plugin more than once, with different attributes. The particular 'type' of tool or modifier constructed can be detected at create time, and so the plugin can adapt its behaviour based on that.

I have attached a very simple Fuse which does just that. It outputs a random number within a specified range, to either a Number or a Point, depending what input it gets created on.

It's much simpler than it sounds, as one can see from the Fuse.

Love, Light and Peace,
- Peter Loveday
You do not have the required permissions to view the files attached to this post.

SecondMan
Posts: 3383
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 70 times
Contact:

### Re: [Fuse] Time Machine Modifier Fuse

Ooooh! This thread is already exactly what I hoped it would be!
Chad wrote:Pet peeve, the multibutton control should using FuID so it's easier to animate. Just had this issue with Twixtor, where the modes are numbers, but have no business interpolating.
Great idea! Also makes the code much easier to read.

Although couldn't interpolation be avoided by setting the control to INP_Integer = true?

EDIT: oh right, you wouldn't want to interpolate between whole numbers either...

I was wondering how to do FuID's when I wanted to add an option in the middle of the Before and After Time behaviour lists and I ended up counting all the time. It took me a hell of a long time to find it in VFXPedia though. Searched for "FuID" first, which came up as a dead link.
Chad wrote:And you also want to have the same mappings between like inputs on other tools. So changing this would mean changing the others too.
Not entirely sure if I understand this. Is it about consistency between Fuses? What is the mapping you speak of?
ploveday wrote:I would probably be inclined to use a multibutton for the rounding mode too. The tristate checkbox is less than obvious I think, and three descriptive buttons on one line would make more sense for no extra space.
Good point. In fact I had never made a tristate checkbox before so I just wanted to give that a go...

I also have a question. Is it possible to change the UI based on the state of multiple inputs?
Specifically, some controls don't require a Target Range. Like Lock Start only requires the Target Start Frame. So I would ideally hide the Target End Frame, unless Force Target Range is turned on. But when I would then switch modes again I could end up with the Target End Frame hidden when Force Target Range is on.

I guess what I am asking is: can I do something like "if Force Target Range is "1" AND mode is set to "Lock Start" then show Target End Frame.

And finally I updated the Fuse to version 1.1:
• All ComboControls and MultiButtonControls now use FuID as their datatype.
• Rounding mode is now a MultiButtonControl, too.
I left v1.0 in the opening post should people want to follow progress. Good idea, if potentially messy?

Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

### Re: [Fuse] Time Machine Modifier Fuse

SecondMan wrote:Ooooh! This thread is already exactly what I hoped it would be!

I guess what I am asking is: can I do something like "if Force Target Range is "1" AND mode is set to "Lock Start" then show Target End Frame.
Yes, you can. You can query other inputs in NotifyChanged. Here's a snippet from my SmoothCam Fuse:

Code: Select all

if inp == InTransformationType then
local m = math.floor(InMode:GetSource(time, REQF_SecondaryTime).Value)
InDoTranslation:SetAttrs({ IC_Visible = param.Value == 0 and m == 1 })
end

What it does is that it sets the DoTranslation's visibility based on both the InTransformationType value (which needs to be 0) and the value of InMode (which needs to be 1).

I've used that REQF_SecondaryTime flag but I'm not sure whether that's necessary. Maybe Peter can shed some light on this

edit: the important thing, however, is that you need to be able to determine the visibility of each input control at all times based on the current values of your inputs. You can't set a helper variable at one point and use it again later because if you close and reload your comp, Fusion needs to be able to set the visibilities correctly based on nothing more than the current state of the Fuse.

SecondMan
Posts: 3383
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 70 times
Contact:

### Re: [Fuse] Time Machine Modifier Fuse

Oh neat! Thanks Tilt!

Must try as soon as I can - pretty exciting I can actually read that stuff now

(although I have no idea what REQF_SecondaryTime does, either - couldn't find anything useful on VFXPedia about it)

SecondMan
Posts: 3383
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 70 times
Contact:

### Re: [Fuse] Time Machine Modifier Fuse

Just a quick update.

I got the UI stuff working nicely - and I could have updated the Fuse straight away but I got a little sidetracked.

Which does mean that very very soon it will be easy to do stuff like this:

Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

### Re: [Fuse] Time Machine Modifier Fuse

does it produce the timecode or modify it? Does it hold frames randomly?

SecondMan
Posts: 3383
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 70 times
Contact:

### Re: [Fuse] Time Machine Modifier Fuse

PS. Make sure to turn your volume up...

SecondMan