Welcome to WSL!

New to the forum? Please read this and this.

Switch (time reverse)

User avatar
alexgross
Posts: 5
Joined: Thu Nov 19, 2020 11:17 pm

Switch (time reverse)

#1

Post by alexgross »

Hi everyone!
Please tell me how can i make a countdown switch by clicking a checkbox, i.e. I made a tree of nodes: text (added a time code modifier) ​​-> timespeed -> transform. For time speed, I set -1 or 1 to change the counting direction (thanks for the hint @mrjholt), in the Transform node in the tab, the user made a checkbox (time reverse).
I tried to create an expression in the time speed node, but there is no way to add an expression by pressing the right mouse button.

1. is it possible to make a check box that would change the direction of the time code?
2. can you know another option?

Thanks)

Code: Select all

{
	Tools = ordered() {
		Text3 = TextPlus {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 149, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				StyledText = Input {
					SourceOp = "TimeCode1_1",
					Source = "Time",
				},
				Font = Input { Value = "Open Sans", },
				Style = Input { Value = "Regular", },
				Size = Input { Value = 0.0949, },
				VerticalJustificationNew = Input { Value = 3, },
				HorizontalJustificationNew = Input { Value = 3, },
				ManualFontKerningPlacement = Input {
					Value = StyledText {
						Array = {
						},
						Value = ""
					},
				},
			},
			ViewInfo = OperatorInfo { Pos = { 880, 82.5 } },
		},
		TimeCode1_1 = TimeCode {
			CtrlWZoom = false,
			Inputs = {
				DropFrame = Input { Value = 0, },
			},
		},
		TimeSpeed1_1 = TimeSpeed {
			Inputs = {
				Input = Input {
					SourceOp = "Text3",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 880, 115.5 } },
		},
		Transform1_2_12 = Transform {
			Inputs = {
				Input = Input {
					SourceOp = "TimeSpeed1_1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 880, 148.5 } },
			UserControls = ordered() {
				TimeRevers = {
					LINKS_Name = "TimeRevers",
					LINKID_DataType = "Number",
					INPID_InputControl = "CheckboxControl",
					INP_Integer = false,
					CBC_TriState = false,
				}
			}
		}
	}
}

User avatar
Midgardsormr
Fusionator
Posts: 2051
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 23
Location: Los Angeles, CA, USA
Been thanked: 12 times
Contact:

Re: Switch (time reverse)

#2

Post by Midgardsormr »

You'll need to use the Edit Controls dialog to add the Animatable property to the Speed control.

Image

However, there's a reason that TimeSpeed is not usually animatable. If you try to set a keyframe on it, you won't get a sequence that reverses direction at the time the keyframe is set. It will instead behave as though the control had always had that value. In other words, if you have a sequence from frames 1 - 10, running forward to frame 3, then the Reverse switch is thrown, your frame count will be 1, 2, 3, 7, 6, 5, 4.

User avatar
alexgross
Posts: 5
Joined: Thu Nov 19, 2020 11:17 pm

Re: Switch (time reverse)

#3

Post by alexgross »

The answer was, as always, very simple. with the help of the disolve node, it was possible to implement what I needed.
image.png
You do not have the required permissions to view the files attached to this post.