In light of the Coronavirus crisis, please help make sure nothing stands in the way of social distancing in the VFX industry.

This petition asks the MPAA to act accordingly:


Sign the petition on Change.org

Be safe, everyone.

bSpline in a Macro?

User avatar
Shem Namo
Fusionista
Posts: 349
Joined: Sun Oct 06, 2019 9:15 pm
Location: North Israel
Real name: David Kohen
Been thanked: 6 times

bSpline in a Macro?

#1

Post by Shem Namo » Thu Mar 26, 2020 9:12 am

Hi everyone, how are you?

I am trying to make a macro with a bSpline in it, and I want the points to be exposed in the macro>
I published the points and in the macro maker checked their boxes.

When I try to use the macro, I can see the widgets of the points, but I can move them,
they're just frozen.

Can someone please tell me what I'm doing wrong.

Thanks in advanced,

User avatar
SirEdric
Fusionator
Posts: 2262
Joined: Tue Aug 05, 2014 10:04 am
Answers: 9
Real name: Eric Westphal
Been thanked: 28 times
Contact:

Re: bSpline in a Macro?

#2

Post by SirEdric » Thu Mar 26, 2020 10:26 am

Hey David.

Any chance you could post the macro here, so we could have a look?

User avatar
Shem Namo
Fusionista
Posts: 349
Joined: Sun Oct 06, 2019 9:15 pm
Location: North Israel
Real name: David Kohen
Been thanked: 6 times

Re: bSpline in a Macro?

#3

Post by Shem Namo » Thu Mar 26, 2020 10:39 am

Sure thing!!


This just so happens to be the same as the one in the topic that you answered yesterday.

Thanks again,

Code: Select all

{
	Tools = ordered() {
		Dash_Arrow_Animation = GroupOperator {
			Inputs = ordered() {
				Input1 = InstanceInput {
					SourceOp = "Perspective",
					Source = "ZMove",
					Default = 1,
				},
				Input2 = InstanceInput {
					SourceOp = "Perspective",
					Source = "ZPivot",
				},
				Input3 = InstanceInput {
					SourceOp = "Perspective",
					Source = "XRotation",
					Name = "X",
					Default = 0,
				},
				Input4 = InstanceInput {
					SourceOp = "Perspective",
					Source = "YRotation",
					Name = "Y",
					Default = 0,
				},
				Input5 = InstanceInput {
					SourceOp = "Perspective",
					Source = "ZRotation",
					Name = "Z",
					Default = 0,
				},
				Input6 = InstanceInput {
					SourceOp = "Perspective",
					Source = "Perspective",
					Default = 1,
				},
				Input7 = InstanceInput {
					SourceOp = "Gradient",
					Source = "TopLeftRed",
					Name = "Top Left",
					ControlGroup = 7,
					Default = 1,
				},
				Input8 = InstanceInput {
					SourceOp = "Gradient",
					Source = "TopLeftGreen",
					ControlGroup = 7,
					Default = 0,
				},
				Input9 = InstanceInput {
					SourceOp = "Gradient",
					Source = "TopLeftBlue",
					ControlGroup = 7,
					Default = 0,
				},
				Input10 = InstanceInput {
					SourceOp = "Gradient",
					Source = "TopLeftAlpha",
					ControlGroup = 7,
					Default = 1,
				},
				Input11 = InstanceInput {
					SourceOp = "Gradient",
					Source = "TopRightRed",
					Name = "Top Right",
					ControlGroup = 8,
					Default = 0,
				},
				Input12 = InstanceInput {
					SourceOp = "Gradient",
					Source = "TopRightGreen",
					ControlGroup = 8,
					Default = 0,
				},
				Input13 = InstanceInput {
					SourceOp = "Gradient",
					Source = "TopRightBlue",
					ControlGroup = 8,
					Default = 0,
				},
				Input14 = InstanceInput {
					SourceOp = "Gradient",
					Source = "TopRightAlpha",
					ControlGroup = 8,
					Default = 1,
				},
				Input15 = InstanceInput {
					SourceOp = "Gradient",
					Source = "BottomLeftRed",
					Name = "Bottom Left",
					ControlGroup = 9,
					Default = 0,
				},
				Input16 = InstanceInput {
					SourceOp = "Gradient",
					Source = "BottomLeftGreen",
					ControlGroup = 9,
					Default = 0,
				},
				Input17 = InstanceInput {
					SourceOp = "Gradient",
					Source = "BottomLeftBlue",
					ControlGroup = 9,
					Default = 0,
				},
				Input18 = InstanceInput {
					SourceOp = "Gradient",
					Source = "BottomLeftAlpha",
					ControlGroup = 9,
					Default = 1,
				},
				Input19 = InstanceInput {
					SourceOp = "Gradient",
					Source = "BottomRightRed",
					Name = "Bottom Right",
					ControlGroup = 10,
					Default = 0,
				},
				Input20 = InstanceInput {
					SourceOp = "Gradient",
					Source = "BottomRightGreen",
					ControlGroup = 10,
					Default = 0,
				},
				Input21 = InstanceInput {
					SourceOp = "Gradient",
					Source = "BottomRightBlue",
					ControlGroup = 10,
					Default = 0,
				},
				Input22 = InstanceInput {
					SourceOp = "Gradient",
					Source = "BottomRightAlpha",
					ControlGroup = 10,
					Default = 1,
				},
				Input23 = InstanceInput {
					SourceOp = "Gradient",
					Source = "Gradient",
				},
				Input24 = InstanceInput {
					SourceOp = "Path",
					Source = "ShowViewControls",
					Default = 1,
				},
				Input25 = InstanceInput {
					SourceOp = "Path",
					Source = "WriteLength",
					Default = 1,
				},
				Input26 = InstanceInput {
					SourceOp = "Path",
					Source = "Polyline",
					Name = "Right-click here for shape animation",
					Default = 0,
				},
				Input27 = InstanceInput {
					SourceOp = "Path",
					Source = "Point0",
					Name = "Start Position",
					DefaultX = 0.249135138547679,
					DefaultY = 0.296590202029801,
				},
				Input28 = InstanceInput {
					SourceOp = "Path",
					Source = "Point1",
					Name = "Curve Hande 1",
					DefaultX = 0.381049910950547,
					DefaultY = 0.481281863941658,
				},
				Input29 = InstanceInput {
					SourceOp = "Path",
					Source = "Point2",
					Name = "Curve Handle 2",
					DefaultX = 0.582221236210242,
					DefaultY = 0.474272863392667,
				},
				Input30 = InstanceInput {
					SourceOp = "Path",
					Source = "Point3",
					Name = "End Position",
					DefaultX = 0.689240997572147,
					DefaultY = 0.30785214426495,
				},
			},
			Outputs = {
				MainOutput1 = InstanceOutput {
					SourceOp = "KeyframeStretcher1",
					Source = "Result",
				}
			},
			ViewInfo = GroupInfo { Pos = { 0, 0 } },
			Tools = ordered() {
				KeyframeStretcher1 = KeyStretcher {
					CtrlWShown = false,
					Inputs = {
						Keyframes = Input {
							SourceOp = "Opacity_Animation",
							Source = "Output",
						},
						SourceEnd = Input { Value = 71, },
						StretchStart = Input { Value = 3, },
						StretchEnd = Input { Value = 68, },
					},
					ViewInfo = OperatorInfo { Pos = { 329.031, 41.2576 } },
				},
				Opacity_Animation = BrightnessContrast {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Alpha = Input { Value = 1, },
						Gain = Input {
							SourceOp = "Opacity_AnimationGain",
							Source = "Value",
						},
						Input = Input {
							SourceOp = "Perspective",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { 109.031, 41.2576 } },
				},
				Perspective = DVE {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						AlphaMode = Input { Value = 2, },
						Input = Input {
							SourceOp = "Gradient_Apply",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -0.96875, 41.2576 } },
				},
				Trail = Fuse.Duplicate {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Copies = Input {
							SourceOp = "TrailCopies",
							Source = "Value",
						},
						TimeOffset = Input { Value = -2.66, },
						RandomSeed = Input { Value = 26024, },
						Background = Input {
							SourceOp = "Solid",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -110.969, 8.25758 } },
				},
				Gradient_Apply = Merge {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Background = Input {
							SourceOp = "Trail",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "Gradient",
							Source = "Output",
						},
						Operator = Input { Value = FuID { "In" }, },
						PerformDepthMerge = Input { Value = 0, },
					},
					ViewInfo = OperatorInfo { Pos = { -110.969, 41.2576 } },
				},
				Gradient = Background {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Width = Input { Value = 3656, },
						Height = Input { Value = 3112, },
						PixelAspect = Input { Value = { 2, 1 }, },
						UseFrameFormatSettings = Input { Value = 1, },
						["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
						Type = Input { Value = FuID { "Gradient" }, },
						TopLeftRed = Input { Value = 1, },
						Gradient = Input {
							Value = Gradient {
								Colors = {
									[0] = { 1, 0, 0, 1 },
									[1] = { 0.128, 0, 1, 1 }
								}
							},
						},
					},
					ViewInfo = OperatorInfo { Pos = { -220.969, 41.2576 } },
				},
				Solid = Background {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						EffectMask = Input {
							SourceOp = "Path",
							Source = "Mask",
						},
						Width = Input { Value = 3656, },
						Height = Input { Value = 3112, },
						PixelAspect = Input { Value = { 2, 1 }, },
						UseFrameFormatSettings = Input { Value = 1, },
						["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
						TopLeftRed = Input { Value = 1, },
						TopLeftGreen = Input { Value = 1, },
						TopLeftBlue = Input { Value = 1, },
						Gradient = Input {
							Value = Gradient {
								Colors = {
									[0] = { 1, 1, 1, 1 },
									[1] = { 1, 1, 1, 1 }
								}
							},
						},
					},
					ViewInfo = OperatorInfo { Pos = { -220.969, 8.25758 } },
				},
				Path = BSplineMask {
					DrawMode = "InsertAndModify",
					DrawMode2 = "InsertAndModify",
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Filter = Input { Value = FuID { "Fast Gaussian" }, },
						BorderWidth = Input { Value = 0.0062, },
						Solid = Input { Value = 0, },
						JoinStyle = Input { Value = 0, },
						WritePosition = Input {
							SourceOp = "PathPosition",
							Source = "Value",
						},
						WriteLength = Input {
							SourceOp = "PathLength",
							Source = "Value",
						},
						MaskWidth = Input { Value = 1280, },
						MaskHeight = Input { Value = 720, },
						PixelAspect = Input { Value = { 1, 1 }, },
						ClippingMode = Input { Value = FuID { "None" }, },
						Polyline = Input {
							Value = BSplinePolyline {
								Points = {
									{ X = -0.250864861452321, Y = -0.203409797970199, PublishID = "Point0" },
									{ X = -0.118950089049453, Y = -0.0187181360583423, PublishID = "Point1" },
									{ X = 0.0822212362102418, Y = -0.0257271366073327, PublishID = "Point2" },
									{ X = 0.189240997572147, Y = -0.19214785573505, PublishID = "Point3" }
								},
								Order = 4,
								Type = "Tensioned",
								Knots = { 0, 0, 0, 0, 1, 1, 1, 1 }
							},
						},
						Polyline2 = Input {
							Value = BSplinePolyline {
								Order = 4,
								Type = "Tensioned",
								Knots = { }
							},
							Disabled = true,
						},
						Point0 = Input { Value = { 0.249135138547679, 0.296590202029801 }, },
						Point1 = Input { Value = { 0.381049910950547, 0.481281863941658 }, },
						Point2 = Input { Value = { 0.582221236210242, 0.474272863392667 }, },
						Point3 = Input { Value = { 0.689240997572147, 0.30785214426495 }, },
					},
					ViewInfo = OperatorInfo { Pos = { -330.969, 8.25758 } },
				},
				Opacity_AnimationGain = BezierSpline {
					SplineColor = { Red = 104, Green = 144, Blue = 233 },
					CtrlWShown = false,
					NameSet = true,
					KeyFrames = {
						[0] = { 0, RH = { 1, 0 } },
						[3] = { 1, LH = { 2.00010001659393, 1 }, RH = { 24.6666666666667, 1 } },
						[68] = { 1, LH = { 46.3333333333333, 1 }, RH = { 68.9998999834061, 1 }, Flags = { Linear = true } },
						[71] = { 0, LH = { 70, 0 } }
					}
				},
				TrailCopies = BezierSpline {
					SplineColor = { Red = 38, Green = 236, Blue = 71 },
					CtrlWShown = false,
					NameSet = true,
					KeyFrames = {
						[34] = { 20, RH = { 46, 20 } },
						[70] = { 2, LH = { 58, 2 } }
					}
				},
				PathPosition = BezierSpline {
					SplineColor = { Red = 237, Green = 132, Blue = 6 },
					CtrlWShown = false,
					NameSet = true,
					KeyFrames = {
						[3] = { 0, RH = { 7.57746478873239, 0 } },
						[68] = { 0.976, LH = { 46.3333333333333, 0.976 } }
					}
				},
				PathLength = BezierSpline {
					SplineColor = { Red = 141, Green = 167, Blue = 243 },
					CtrlWShown = false,
					NameSet = true,
					KeyFrames = {
						[3] = { 0.0205, RH = { 24.6666666666667, 0.0205 } },
						[68] = { 0.0205, LH = { 46.3333333333333, 0.0205 } }
					}
				}
			},
		}
	},
	ActiveTool = "Dash_Arrow_Animation"
}