Troubleshooting the Copy Nodes To Codebox Snippet script...

User avatar
SecondMan
Site Admin
Posts: 2406
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 60 times
Contact:

Troubleshooting the Copy Nodes To Codebox Snippet script...

#1

Post by SecondMan » Tue Jun 12, 2018 6:04 pm

OK what's with people deleting that last curly bracket in Codebox snippets today?

User avatar
intelligent machine
Fusioneer
Posts: 117
Joined: Fri May 13, 2016 10:01 pm
Location: Austin, Texas, USA
Been thanked: 16 times
Contact:

Re: Keying, DoD, and efficiency

#2

Post by intelligent machine » Tue Jun 12, 2018 6:12 pm

@SecondMan The script must be broken. I just pasted and published.

User avatar
SecondMan
Site Admin
Posts: 2406
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 60 times
Contact:

Re: Keying, DoD, and efficiency

#3

Post by SecondMan » Tue Jun 12, 2018 6:32 pm

What OS and Fusion version are you running?

@Andrew could I ask you the same please?

User avatar
intelligent machine
Fusioneer
Posts: 117
Joined: Fri May 13, 2016 10:01 pm
Location: Austin, Texas, USA
Been thanked: 16 times
Contact:

Re: Keying, DoD, and efficiency

#4

Post by intelligent machine » Tue Jun 12, 2018 6:36 pm

macOS 10.14 (Mojave) developer beta1 on this machine
Fusion 9.0.2 build 15

This is my first time using that script. I'll create a new post for you later from a different mac still running 10.13.4 if you need it.

Edit:
I don't see why it would remove that last curly bracked.
It doesn't happen when I just copy and past into a text editor. :geek: :|
In the mean time I've edited the following line in the script:

Code: Select all

		local nodes = bmd:getclipboard() .. "}\n"
Last edited by intelligent machine on Tue Jun 12, 2018 7:03 pm, edited 2 times in total.

User avatar
SecondMan
Site Admin
Posts: 2406
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 60 times
Contact:

Re: Keying, DoD, and efficiency

#5

Post by SecondMan » Tue Jun 12, 2018 7:02 pm

intelligent machine wrote:
Tue Jun 12, 2018 6:36 pm
I'll create a new post for you later from a different mac still running 10.13.4 if you need it.

That would be great thanks.

If you could post it in here please?

viewtopic.php?f=2&t=769&p=10460#p10460

That way this thread doesn't go off topic for too long :)
intelligent machine wrote:
Tue Jun 12, 2018 6:36 pm
In the mean time I've edited the following line in the script:

That is totally weird. Is bmd:getclipboard() borked on Mac?

Andrew
Posts: 39
Joined: Mon Mar 19, 2018 12:50 pm
Been thanked: 2 times

Re: Keying, DoD, and efficiency

#6

Post by Andrew » Tue Jun 12, 2018 7:43 pm

SecondMan wrote:
Tue Jun 12, 2018 6:32 pm
@Andrew could I ask you the same please?

Fusion 9.0.2 on 10.12.6

User avatar
intelligent machine
Fusioneer
Posts: 117
Joined: Fri May 13, 2016 10:01 pm
Location: Austin, Texas, USA
Been thanked: 16 times
Contact:

Re: Keying, DoD, and efficiency

#7

Post by intelligent machine » Tue Jun 12, 2018 7:57 pm

@SecondMan It appears that it is borked! I tied on another Mac with the same issue.
I even altered your code in few places to see if maybe it was something else:

Code: Select all

local nodes = tostring(bmd:getclipboard())

-- Check if the copy command succeeded
if err == true and nodes ~= nil then
	local snip = opentag .. nodes .. closetag
same results

Andrew
Posts: 39
Joined: Mon Mar 19, 2018 12:50 pm
Been thanked: 2 times

Re: Keying, DoD, and efficiency

#8

Post by Andrew » Tue Jun 12, 2018 8:23 pm

I just checked my earlier posts at home and I see the masks in the "source" didn't copy over using the script. No wonder everyone is confused! Here's a direct copy from Fusion that I confirmed to be working. I picked up a few tips from your posts and I think it's dialed in pretty well now. Thank you for your patience!

Code: Select all

{
	Tools = ordered() {
		PipeRouter2 = PipeRouter {
			Inputs = {
				Input = Input {
					SourceOp = "PipeRouter1",
					Source = "Output",
				},
			},
			ViewInfo = PipeRouterInfo { Pos = { 55, 16.5 } },
		},
		Rectangle1_1 = RectangleMask {
			Inputs = {
				MaskWidth = Input { Value = 1920, },
				MaskHeight = Input { Value = 1080, },
				PixelAspect = Input { Value = { 1, 1 }, },
				ClippingMode = Input { Value = FuID { "None" }, },
				Center = Input { Value = { 0.649455136723941, 0.665049792469538 }, },
				Width = Input { Value = 0.203600631634902, },
				Height = Input { Value = 0.401918976545842, },
			},
			ViewInfo = OperatorInfo { Pos = { 220, -49.5 } },
		},
		SetDomain1 = SetDomain {
			Inputs = {
				Input = Input {
					SourceOp = "PipeRouter2",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Rectangle1",
					Source = "Mask",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 220, -115.5 } },
		},
		SetDomain1_1 = SetDomain {
			Inputs = {
				Input = Input {
					SourceOp = "PipeRouter2",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Rectangle1_1",
					Source = "Mask",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 220, 16.5 } },
		},
		Rectangle1 = RectangleMask {
			Inputs = {
				MaskWidth = Input { Value = 1920, },
				MaskHeight = Input { Value = 1080, },
				PixelAspect = Input { Value = { 1, 1 }, },
				ClippingMode = Input { Value = FuID { "None" }, },
				Center = Input { Value = { 0.25065274151436, 0.616009280742459 }, },
				Width = Input { Value = 0.215576679539094, },
				Height = Input { Value = 0.470149253731344, },
			},
			ViewInfo = OperatorInfo { Pos = { 220, -181.5 } },
		},
		Rectangle1_2 = RectangleMask {
			Inputs = {
				MaskWidth = Input { Value = 1920, },
				MaskHeight = Input { Value = 1080, },
				PixelAspect = Input { Value = { 1, 1 }, },
				ClippingMode = Input { Value = FuID { "None" }, },
				Center = Input { Value = { 0.806341364268851, 0.238610560060157 }, },
				Width = Input { Value = 0.234738356185801, },
				Height = Input { Value = 0.453091684434968, },
			},
			ViewInfo = OperatorInfo { Pos = { 220, 82.5 } },
		},
		ChromaKeyer1_1 = ChromaKeyer {
			Inputs = {
				KeyType = Input { Value = 1, },
				ColorRange = Input { Value = 1, },
				RedLow = Input { Value = -3.0517578125e-05, },
				RedHigh = Input { Value = 3.0517578125e-05, },
				GreenLow = Input { Value = 59.9999694824219, },
				GreenHigh = Input { Value = 60.0000305175781, },
				BlueLow = Input { Value = -3.0517578125e-05, },
				BlueHigh = Input { Value = 3.0517578125e-05, },
				LuminanceLow = Input { Value = 35.219970703125, },
				LuminanceHigh = Input { Value = 35.2200317382812, },
				FringeSize = Input { Value = 0, },
				ClippingMode = Input { Value = FuID { "Domain" }, },
				EffectMask = Input {
					SourceOp = "Rectangle1_1",
					Source = "Mask",
				},
				Input = Input {
					SourceOp = "SetDomain1_1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 330, 16.5 } },
		},
		ChromaKeyer1 = ChromaKeyer {
			Inputs = {
				KeyType = Input { Value = 1, },
				ColorRange = Input { Value = 1, },
				RedLow = Input { Value = -3.0517578125e-05, },
				RedHigh = Input { Value = 3.0517578125e-05, },
				GreenLow = Input { Value = 59.9999694824219, },
				GreenHigh = Input { Value = 60.0000305175781, },
				BlueLow = Input { Value = -3.0517578125e-05, },
				BlueHigh = Input { Value = 3.0517578125e-05, },
				LuminanceLow = Input { Value = 35.219970703125, },
				LuminanceHigh = Input { Value = 35.2200317382812, },
				FringeSize = Input { Value = 0, },
				ClippingMode = Input { Value = FuID { "Domain" }, },
				EffectMask = Input {
					SourceOp = "Rectangle1",
					Source = "Mask",
				},
				Input = Input {
					SourceOp = "SetDomain1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 330, -115.5 } },
		},
		PipeRouter3 = PipeRouter {
			Inputs = {
				Input = Input {
					SourceOp = "SetDomain1_1",
					Source = "Output",
				},
			},
			ViewInfo = PipeRouterInfo { Pos = { 330, 82.5 } },
		},
		SetDomain1_2 = SetDomain {
			Inputs = {
				Input = Input {
					SourceOp = "PipeRouter2",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Rectangle1_2",
					Source = "Mask",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 220, 148.5 } },
		},
		ChromaKeyer1_2 = ChromaKeyer {
			Inputs = {
				KeyType = Input { Value = 1, },
				ColorRange = Input { Value = 1, },
				RedLow = Input { Value = -3.0517578125e-05, },
				RedHigh = Input { Value = 3.0517578125e-05, },
				GreenLow = Input { Value = 59.9999694824219, },
				GreenHigh = Input { Value = 60.0000305175781, },
				BlueLow = Input { Value = -3.0517578125e-05, },
				BlueHigh = Input { Value = 3.0517578125e-05, },
				LuminanceLow = Input { Value = 35.219970703125, },
				LuminanceHigh = Input { Value = 35.2200317382812, },
				FringeSize = Input { Value = 0, },
				ClippingMode = Input { Value = FuID { "Domain" }, },
				EffectMask = Input {
					SourceOp = "Rectangle1_2",
					Source = "Mask",
				},
				Input = Input {
					SourceOp = "SetDomain1_2",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 330, 148.5 } },
		},
		Merge4 = Merge {
			Inputs = {
				Background = Input {
					SourceOp = "PipeRouter3",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "SetDomain1",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 550, 82.5 } },
		},
		Merge5 = Merge {
			Inputs = {
				Background = Input {
					SourceOp = "Merge4",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "PipeRouter4",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 550, 214.5 } },
		},
		PipeRouter4 = PipeRouter {
			CtrlWZoom = false,
			Inputs = {
				Input = Input {
					SourceOp = "SetDomain1_2",
					Source = "Output",
				},
			},
			ViewInfo = PipeRouterInfo { Pos = { 330, 214.5 } },
		},
		Merge3 = Merge {
			Inputs = {
				Background = Input {
					SourceOp = "Merge2",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "ChromaKeyer1_2",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 715, 148.5 } },
		},
		Merge2 = Merge {
			Inputs = {
				Background = Input {
					SourceOp = "ChromaKeyer1_1",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "ChromaKeyer1",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 715, 16.5 } },
		},
		Result = Merge {
			NameSet = true,
			Inputs = {
				Background = Input {
					SourceOp = "PipeRouter1",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Merge3",
					Source = "Output",
				},
				Operator = Input { Value = FuID { "In" }, },
				PerformDepthMerge = Input { Value = 0, },
				EffectMask = Input {
					SourceOp = "Merge5",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 715, 346.5 } },
		},
		Source = GroupOperator {
			NameSet = true,
			Outputs = {
				Output1 = InstanceOutput {
					SourceOp = "Merge1",
					Source = "Output",
				}
			},
			ViewInfo = GroupInfo {
				Pos = { -220, 346.5 },
				Flags = {
					AllowPan = false,
					GridSnap = true,
					AutoSnap = true,
					RemoveRouters = true
				},
				Size = { 236, 260.856, 118, 22 },
				Direction = "Horizontal",
				PipeStyle = "Direct",
				Scale = 1,
				Offset = { -220, -106.244 }
			},
			Tools = ordered() {
				Merge1 = Merge {
					CtrlWShown = false,
					Inputs = {
						Background = Input {
							SourceOp = "FastNoise1",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "Background1",
							Source = "Output",
						},
						PerformDepthMerge = Input { Value = 0, },
					},
					ViewInfo = OperatorInfo { Pos = { 275, 313.5 } },
				},
				FastNoise1 = FastNoise {
					CtrlWShown = false,
					Inputs = {
						GlobalOut = Input { Value = 120, },
						Width = Input { Value = 1920, },
						Height = Input { Value = 1080, },
						["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
						Detail = Input { Value = 5.43, },
						XScale = Input { Value = 8.97, },
						Color1Red = Input { Value = 0.056, },
						Color1Green = Input { Value = 0.019, },
						Color1Alpha = Input { Value = 1, },
						Color2Red = Input { Value = 0.381, },
						Color2Green = Input { Value = 0.156, },
						Color2Blue = Input { Value = 0.038, },
					},
					ViewInfo = OperatorInfo { Pos = { 165, 313.5 } },
				},
				Polygon3 = PolylineMask {
					DrawMode = "ModifyOnly",
					DrawMode2 = "InsertAndModify",
					CtrlWShown = false,
					Inputs = {
						MaskWidth = Input { Value = 1920, },
						MaskHeight = Input { Value = 1080, },
						PixelAspect = Input { Value = { 1, 1 }, },
						ClippingMode = Input { Value = FuID { "None" }, },
						Polyline = Input {
							Value = Polyline {
								Closed = true,
								Points = {
									{ X = 0.230188682675362, Y = -0.422818779945374, LX = 0.0305584808173323, LY = -0.0222336661700712, RX = -0.021853019854953, RY = 0.0158997677655292 },
									{ X = 0.283018857240677, Y = -0.338926166296005, LX = 0.000386874915496571, LY = -0.0419718662074005, RX = -0.0004764826055696, RY = 0.0516933597140858 },
									{ X = 0.228301882743835, Y = -0.21812079846859, LX = 0.00140492762702669, LY = -0.0516399335037721, RX = -0.00111743099236093, RY = 0.0410726225540131 },
									{ X = 0.277358502149582, Y = -0.130872488021851, LX = -0.0226950239552088, LY = -0.00794038619158032, RX = 0.0232634014357527, RY = 0.00813924637815792 },
									{ X = 0.343396216630936, Y = -0.177852347493172, LX = -0.0150964773634529, LY = 0.0325019052735624, RX = 0.0218676723841093, RY = -0.0470799246254795 },
									{ X = 0.392452836036682, Y = -0.338926166296005, LX = -0.00388586659504608, LY = 0.0606640636820386, RX = 0.00251671452818784, RY = -0.0392895964576182 },
									{ X = 0.360377371311188, Y = -0.442953020334244, LX = 0.0215785736586434, LY = 0.00959450097002853, RX = -0.017740278735448, RY = -0.007887876382768 },
									{ X = 0.324528306722641, Y = -0.369127511978149, LX = 0.0182179074430046, LY = -0.00281747770626751, RX = -0.0328944227449899, RY = 0.00508726389320501 }
								}
							},
						},
						Polyline2 = Input {
							Value = Polyline {
							},
							Disabled = true,
						},
						EffectMask = Input {
							SourceOp = "Polygon2",
							Source = "Mask",
						}
					},
					ViewInfo = OperatorInfo { Pos = { 275, 181.5 } },
				},
				Polygon2 = PolylineMask {
					DrawMode = "ModifyOnly",
					DrawMode2 = "InsertAndModify",
					CtrlWShown = false,
					Inputs = {
						MaskWidth = Input { Value = 1920, },
						MaskHeight = Input { Value = 1080, },
						PixelAspect = Input { Value = { 1, 1 }, },
						ClippingMode = Input { Value = FuID { "None" }, },
						Polyline = Input {
							Value = Polyline {
								Closed = true,
								Points = {
									{ X = 0.0792452843121763, Y = 0.221476504066646, LX = -0.00202025725758887, LY = -0.0380865907964662, RX = 0.00217168299974429, RY = 0.0409413214283501 },
									{ X = 0.1283018887043, Y = 0.308724820613861, LX = -0.0225084622323369, LY = -0.00948122353729022, RX = 0.0156785115977425, RY = 0.00660424828918933 },
									{ X = 0.158490568399429, Y = 0.241610735654831, LX = -0.0160399676787349, LY = -0.00271690048033063, RX = 0.0221577919509577, RY = 0.00375315691405254 },
									{ X = 0.207547172904015, Y = 0.322147637605667, LX = -0.0112528614802945, LY = 0.0341406385791985, RX = 0.0262076650880788, RY = -0.0795127908882216 },
									{ X = 0.222641512751579, Y = 0.0469798669219017, LX = 0.0122083655825934, LY = 0.0895655606493653, RX = -0.00427291192598275, RY = -0.0313478286398682 },
									{ X = 0.177358493208885, Y = 0.100671142339706, LX = 0.0178324681877338, LY = 0.00594664963077666, RX = -0.021426934646139, RY = -0.00714530774207599 },
									{ X = 0.132075473666191, Y = 0.0167785231024027, LX = 0.0209354767600494, LY = -0.0108099408855289, RX = -0.0209741715062005, RY = 0.0108299207466645 },
									{ X = 0.118867926299572, Y = 0.130872488021851, LX = 0.00864915369235285, LY = -0.0356540151692399, RX = -0.00852156853999153, RY = 0.0351280766647962 }
								}
							},
						},
						Polyline2 = Input {
							Value = Polyline {
							},
							Disabled = true,
						},
						EffectMask = Input {
							SourceOp = "Polygon1",
							Source = "Mask",
						}
					},
					ViewInfo = OperatorInfo { Pos = { 275, 148.5 } },
				},
				Polygon1 = PolylineMask {
					DrawMode = "ModifyOnly",
					DrawMode2 = "InsertAndModify",
					CtrlWShown = false,
					Inputs = {
						MaskWidth = Input { Value = 1920, },
						MaskHeight = Input { Value = 1080, },
						PixelAspect = Input { Value = { 1, 1 }, },
						ClippingMode = Input { Value = FuID { "None" }, },
						Polyline = Input {
							Value = Polyline {
								Closed = true,
								Points = {
									{ X = -0.281132072210312, Y = 0.255033552646637, LX = -0.019296155872158, LY = -0.021336852732387, RX = 0.021282708312704, RY = 0.0235334963099947 },
									{ X = -0.20943395793438, Y = 0.295302003622055, LX = -0.017718975053061, LY = 0.0315136086535096, RX = 0.0177250571635864, RY = -0.0315244258283355 },
									{ X = -0.232075467705727, Y = 0.167785242199898, LX = -0.00645765977643333, LY = 0.0430691192161356, RX = 0.00404984728169921, RY = -0.0270103042621089 },
									{ X = -0.186792448163033, Y = 0.144295305013657, LX = -0.00505459281296682, LY = 0.0264697083322899, RX = 0.00938279218467663, RY = -0.0491354658349034 },
									{ X = -0.198113203048706, Y = -0.0100671136751771, LX = 0.0200700104823001, LY = 0.0376758543602367, RX = -0.0226593694089246, RY = -0.042536654502415 },
									{ X = -0.288679242134094, Y = -0.0805369094014168, LX = 0.0312018360433385, LY = -0.0188467478144746, RX = -0.0234241381965078, RY = 0.0141488092158357 },
									{ X = -0.298113197088242, Y = 0.0503355711698532, LX = 0.00190161589269195, LY = -0.0438507942176803, RX = -0.00198982416389539, RY = 0.0458848552305824 },
									{ X = -0.332075476646423, Y = 0.174496650695801, LX = -0.00377691078859299, LY = -0.0455285512709292, RX = 0.00331548130273856, RY = 0.0399662763905982 }
								}
							},
						},
						Polyline2 = Input {
							Value = Polyline {
							},
							Disabled = true,
						},
					},
					ViewInfo = OperatorInfo { Pos = { 275, 115.5 } },
				},
				Background1 = Background {
					CtrlWShown = false,
					Inputs = {
						GlobalOut = Input { Value = 120, },
						Width = Input { Value = 1920, },
						Height = Input { Value = 1080, },
						["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
						TopLeftGreen = Input { Value = 60, },
						EffectMask = Input {
							SourceOp = "Polygon3",
							Source = "Mask",
						}
					},
					ViewInfo = OperatorInfo { Pos = { 275, 214.5 } },
				}
			},
		},
		PipeRouter1 = PipeRouter {
			Inputs = {
				Input = Input {
					SourceOp = "Merge1",
					Source = "Output",
				},
			},
			ViewInfo = PipeRouterInfo { Pos = { -55, 346.5 } },
		}
	}
}

User avatar
SecondMan
Site Admin
Posts: 2406
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 60 times
Contact:

Re: Keying, DoD, and efficiency

#9

Post by SecondMan » Wed Jun 13, 2018 9:02 am

Just testing that...

Code: [Select all] [Expand/Collapse] [Download] (WSLsnippet-2018Jun13-0902.setting)
  1. {
  2.     Tools = ordered() {
  3.         Source = GroupOperator {
  4.             NameSet = true,
  5.             Outputs = {
  6.                 Output1 = InstanceOutput {
  7.                     SourceOp = "Merge1",
  8.                     Source = "Output",
  9.                 }
  10.             },
  11.             ViewInfo = GroupInfo {
  12.                 Pos = { 385, 478.5 },
  13.                 Flags = {
  14.                     AllowPan = false,
  15.                     GridSnap = true,
  16.                     AutoSnap = true,
  17.                     RemoveRouters = true
  18.                 },
  19.                 Size = { 236, 260.856, 118, 22 },
  20.                 Direction = "Horizontal",
  21.                 PipeStyle = "Direct",
  22.                 Scale = 1,
  23.                 Offset = { -220, -106.244 }
  24.             },
  25.             Tools = ordered() {
  26.                 Merge1 = Merge {
  27.                     CtrlWShown = false,
  28.                     Inputs = {
  29.                         Background = Input {
  30.                             SourceOp = "FastNoise1",
  31.                             Source = "Output",
  32.                         },
  33.                         Foreground = Input {
  34.                             SourceOp = "Background1",
  35.                             Source = "Output",
  36.                         },
  37.                         PerformDepthMerge = Input { Value = 0, },
  38.                     },
  39.                     ViewInfo = OperatorInfo { Pos = { 275, 313.5 } },
  40.                 },
  41.                 FastNoise1 = FastNoise {
  42.                     CtrlWShown = false,
  43.                     Inputs = {
  44.                         Width = Input { Value = 1920, },
  45.                         Height = Input { Value = 1080, },
  46.                         ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  47.                         Detail = Input { Value = 5.43, },
  48.                         XScale = Input { Value = 8.97, },
  49.                         Color1Red = Input { Value = 0.056, },
  50.                         Color1Green = Input { Value = 0.019, },
  51.                         Color1Alpha = Input { Value = 1, },
  52.                         Color2Red = Input { Value = 0.381, },
  53.                         Color2Green = Input { Value = 0.156, },
  54.                         Color2Blue = Input { Value = 0.038, },
  55.                     },
  56.                     ViewInfo = OperatorInfo { Pos = { 165, 313.5 } },
  57.                 },
  58.                 Polygon3 = PolylineMask {
  59.                     DrawMode = "ModifyOnly",
  60.                     DrawMode2 = "InsertAndModify",
  61.                     CtrlWShown = false,
  62.                     Inputs = {
  63.                         MaskWidth = Input { Value = 1920, },
  64.                         MaskHeight = Input { Value = 1080, },
  65.                         PixelAspect = Input { Value = { 1, 1 }, },
  66.                         ClippingMode = Input { Value = FuID { "None" }, },
  67.                         Polyline = Input {
  68.                             Value = Polyline {
  69.                                 Closed = true,
  70.                                 Points = {
  71.                                     { X = 0.230188682675362, Y = -0.422818779945374, LX = 0.0305584808173323, LY = -0.0222336661700712, RX = -0.021853019854953, RY = 0.0158997677655292 },
  72.                                     { X = 0.283018857240677, Y = -0.338926166296005, LX = 0.000386874915496571, LY = -0.0419718662074005, RX = -0.0004764826055696, RY = 0.0516933597140858 },
  73.                                     { X = 0.228301882743835, Y = -0.21812079846859, LX = 0.00140492762702669, LY = -0.0516399335037721, RX = -0.00111743099236093, RY = 0.0410726225540131 },
  74.                                     { X = 0.277358502149582, Y = -0.130872488021851, LX = -0.0226950239552088, LY = -0.00794038619158032, RX = 0.0232634014357527, RY = 0.00813924637815792 },
  75.                                     { X = 0.343396216630936, Y = -0.177852347493172, LX = -0.0150964773634529, LY = 0.0325019052735624, RX = 0.0218676723841093, RY = -0.0470799246254795 },
  76.                                     { X = 0.392452836036682, Y = -0.338926166296005, LX = -0.00388586659504608, LY = 0.0606640636820386, RX = 0.00251671452818784, RY = -0.0392895964576182 },
  77.                                     { X = 0.360377371311188, Y = -0.442953020334244, LX = 0.0215785736586434, LY = 0.00959450097002853, RX = -0.017740278735448, RY = -0.007887876382768 },
  78.                                     { X = 0.324528306722641, Y = -0.369127511978149, LX = 0.0182179074430046, LY = -0.00281747770626751, RX = -0.0328944227449899, RY = 0.00508726389320501 }
  79.                                 }
  80.                             },
  81.                         },
  82.                         Polyline2 = Input {
  83.                             Value = Polyline {
  84.                             },
  85.                             Disabled = true,
  86.                         },
  87.                         EffectMask = Input {
  88.                             SourceOp = "Polygon2",
  89.                             Source = "Mask",
  90.                         }
  91.                     },
  92.                     ViewInfo = OperatorInfo { Pos = { 275, 181.5 } },
  93.                 },
  94.                 Polygon2 = PolylineMask {
  95.                     DrawMode = "ModifyOnly",
  96.                     DrawMode2 = "InsertAndModify",
  97.                     CtrlWShown = false,
  98.                     Inputs = {
  99.                         MaskWidth = Input { Value = 1920, },
  100.                         MaskHeight = Input { Value = 1080, },
  101.                         PixelAspect = Input { Value = { 1, 1 }, },
  102.                         ClippingMode = Input { Value = FuID { "None" }, },
  103.                         Polyline = Input {
  104.                             Value = Polyline {
  105.                                 Closed = true,
  106.                                 Points = {
  107.                                     { X = 0.0792452843121763, Y = 0.221476504066646, LX = -0.00202025725758887, LY = -0.0380865907964662, RX = 0.00217168299974429, RY = 0.0409413214283501 },
  108.                                     { X = 0.1283018887043, Y = 0.308724820613861, LX = -0.0225084622323369, LY = -0.00948122353729022, RX = 0.0156785115977425, RY = 0.00660424828918933 },
  109.                                     { X = 0.158490568399429, Y = 0.241610735654831, LX = -0.0160399676787349, LY = -0.00271690048033063, RX = 0.0221577919509577, RY = 0.00375315691405254 },
  110.                                     { X = 0.207547172904015, Y = 0.322147637605667, LX = -0.0112528614802945, LY = 0.0341406385791985, RX = 0.0262076650880788, RY = -0.0795127908882216 },
  111.                                     { X = 0.222641512751579, Y = 0.0469798669219017, LX = 0.0122083655825934, LY = 0.0895655606493653, RX = -0.00427291192598275, RY = -0.0313478286398682 },
  112.                                     { X = 0.177358493208885, Y = 0.100671142339706, LX = 0.0178324681877338, LY = 0.00594664963077666, RX = -0.021426934646139, RY = -0.00714530774207599 },
  113.                                     { X = 0.132075473666191, Y = 0.0167785231024027, LX = 0.0209354767600494, LY = -0.0108099408855289, RX = -0.0209741715062005, RY = 0.0108299207466645 },
  114.                                     { X = 0.118867926299572, Y = 0.130872488021851, LX = 0.00864915369235285, LY = -0.0356540151692399, RX = -0.00852156853999153, RY = 0.0351280766647962 }
  115.                                 }
  116.                             },
  117.                         },
  118.                         Polyline2 = Input {
  119.                             Value = Polyline {
  120.                             },
  121.                             Disabled = true,
  122.                         },
  123.                         EffectMask = Input {
  124.                             SourceOp = "Polygon1",
  125.                             Source = "Mask",
  126.                         }
  127.                     },
  128.                     ViewInfo = OperatorInfo { Pos = { 275, 148.5 } },
  129.                 },
  130.                 Polygon1 = PolylineMask {
  131.                     DrawMode = "ModifyOnly",
  132.                     DrawMode2 = "InsertAndModify",
  133.                     CtrlWShown = false,
  134.                     Inputs = {
  135.                         MaskWidth = Input { Value = 1920, },
  136.                         MaskHeight = Input { Value = 1080, },
  137.                         PixelAspect = Input { Value = { 1, 1 }, },
  138.                         ClippingMode = Input { Value = FuID { "None" }, },
  139.                         Polyline = Input {
  140.                             Value = Polyline {
  141.                                 Closed = true,
  142.                                 Points = {
  143.                                     { X = -0.281132072210312, Y = 0.255033552646637, LX = -0.019296155872158, LY = -0.021336852732387, RX = 0.021282708312704, RY = 0.0235334963099947 },
  144.                                     { X = -0.20943395793438, Y = 0.295302003622055, LX = -0.017718975053061, LY = 0.0315136086535096, RX = 0.0177250571635864, RY = -0.0315244258283355 },
  145.                                     { X = -0.232075467705727, Y = 0.167785242199898, LX = -0.00645765977643333, LY = 0.0430691192161356, RX = 0.00404984728169921, RY = -0.0270103042621089 },
  146.                                     { X = -0.186792448163033, Y = 0.144295305013657, LX = -0.00505459281296682, LY = 0.0264697083322899, RX = 0.00938279218467663, RY = -0.0491354658349034 },
  147.                                     { X = -0.198113203048706, Y = -0.0100671136751771, LX = 0.0200700104823001, LY = 0.0376758543602367, RX = -0.0226593694089246, RY = -0.042536654502415 },
  148.                                     { X = -0.288679242134094, Y = -0.0805369094014168, LX = 0.0312018360433385, LY = -0.0188467478144746, RX = -0.0234241381965078, RY = 0.0141488092158357 },
  149.                                     { X = -0.298113197088242, Y = 0.0503355711698532, LX = 0.00190161589269195, LY = -0.0438507942176803, RX = -0.00198982416389539, RY = 0.0458848552305824 },
  150.                                     { X = -0.332075476646423, Y = 0.174496650695801, LX = -0.00377691078859299, LY = -0.0455285512709292, RX = 0.00331548130273856, RY = 0.0399662763905982 }
  151.                                 }
  152.                             },
  153.                         },
  154.                         Polyline2 = Input {
  155.                             Value = Polyline {
  156.                             },
  157.                             Disabled = true,
  158.                         },
  159.                     },
  160.                     ViewInfo = OperatorInfo { Pos = { 275, 115.5 } },
  161.                 },
  162.                 Background1 = Background {
  163.                     CtrlWShown = false,
  164.                     Inputs = {
  165.                         Width = Input { Value = 1920, },
  166.                         Height = Input { Value = 1080, },
  167.                         ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  168.                         TopLeftGreen = Input { Value = 60, },
  169.                         EffectMask = Input {
  170.                             SourceOp = "Polygon3",
  171.                             Source = "Mask",
  172.                         }
  173.                     },
  174.                     ViewInfo = OperatorInfo { Pos = { 275, 214.5 } },
  175.                 }
  176.             },
  177.         },
  178.         PipeRouter2 = PipeRouter {
  179.             Inputs = {
  180.                 Input = Input {
  181.                     SourceOp = "PipeRouter1",
  182.                     Source = "Output",
  183.                 },
  184.             },
  185.             ViewInfo = PipeRouterInfo { Pos = { 660, 148.5 } },
  186.         },
  187.         Rectangle1_1 = RectangleMask {
  188.             Inputs = {
  189.                 MaskWidth = Input { Value = 1920, },
  190.                 MaskHeight = Input { Value = 1080, },
  191.                 PixelAspect = Input { Value = { 1, 1 }, },
  192.                 ClippingMode = Input { Value = FuID { "None" }, },
  193.                 Center = Input { Value = { 0.649455136723941, 0.665049792469538 }, },
  194.                 Width = Input { Value = 0.203600631634902, },
  195.                 Height = Input { Value = 0.401918976545842, },
  196.             },
  197.             ViewInfo = OperatorInfo { Pos = { 825, 82.5 } },
  198.         },
  199.         SetDomain1 = SetDomain {
  200.             Inputs = {
  201.                 Input = Input {
  202.                     SourceOp = "PipeRouter2",
  203.                     Source = "Output",
  204.                 },
  205.                 Foreground = Input {
  206.                     SourceOp = "Rectangle1",
  207.                     Source = "Mask",
  208.                 },
  209.             },
  210.             ViewInfo = OperatorInfo { Pos = { 825, 16.5 } },
  211.         },
  212.         SetDomain1_1 = SetDomain {
  213.             Inputs = {
  214.                 Input = Input {
  215.                     SourceOp = "PipeRouter2",
  216.                     Source = "Output",
  217.                 },
  218.                 Foreground = Input {
  219.                     SourceOp = "Rectangle1_1",
  220.                     Source = "Mask",
  221.                 },
  222.             },
  223.             ViewInfo = OperatorInfo { Pos = { 825, 148.5 } },
  224.         },
  225.         Rectangle1 = RectangleMask {
  226.             Inputs = {
  227.                 MaskWidth = Input { Value = 1920, },
  228.                 MaskHeight = Input { Value = 1080, },
  229.                 PixelAspect = Input { Value = { 1, 1 }, },
  230.                 ClippingMode = Input { Value = FuID { "None" }, },
  231.                 Center = Input { Value = { 0.25065274151436, 0.616009280742459 }, },
  232.                 Width = Input { Value = 0.215576679539094, },
  233.                 Height = Input { Value = 0.470149253731344, },
  234.             },
  235.             ViewInfo = OperatorInfo { Pos = { 825, -49.5 } },
  236.         },
  237.         Rectangle1_2 = RectangleMask {
  238.             Inputs = {
  239.                 MaskWidth = Input { Value = 1920, },
  240.                 MaskHeight = Input { Value = 1080, },
  241.                 PixelAspect = Input { Value = { 1, 1 }, },
  242.                 ClippingMode = Input { Value = FuID { "None" }, },
  243.                 Center = Input { Value = { 0.806341364268851, 0.238610560060157 }, },
  244.                 Width = Input { Value = 0.234738356185801, },
  245.                 Height = Input { Value = 0.453091684434968, },
  246.             },
  247.             ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  248.         },
  249.         ChromaKeyer1_1 = ChromaKeyer {
  250.             Inputs = {
  251.                 KeyType = Input { Value = 1, },
  252.                 ColorRange = Input { Value = 1, },
  253.                 RedLow = Input { Value = -3.0517578125e-005, },
  254.                 RedHigh = Input { Value = 3.0517578125e-005, },
  255.                 GreenLow = Input { Value = 59.9999694824219, },
  256.                 GreenHigh = Input { Value = 60.0000305175781, },
  257.                 BlueLow = Input { Value = -3.0517578125e-005, },
  258.                 BlueHigh = Input { Value = 3.0517578125e-005, },
  259.                 LuminanceLow = Input { Value = 35.219970703125, },
  260.                 LuminanceHigh = Input { Value = 35.2200317382812, },
  261.                 FringeSize = Input { Value = 0, },
  262.                 ClippingMode = Input { Value = FuID { "Domain" }, },
  263.                 EffectMask = Input {
  264.                     SourceOp = "Rectangle1_1",
  265.                     Source = "Mask",
  266.                 },
  267.                 Input = Input {
  268.                     SourceOp = "SetDomain1_1",
  269.                     Source = "Output",
  270.                 },
  271.             },
  272.             ViewInfo = OperatorInfo { Pos = { 935, 148.5 } },
  273.         },
  274.         ChromaKeyer1 = ChromaKeyer {
  275.             Inputs = {
  276.                 KeyType = Input { Value = 1, },
  277.                 ColorRange = Input { Value = 1, },
  278.                 RedLow = Input { Value = -3.0517578125e-005, },
  279.                 RedHigh = Input { Value = 3.0517578125e-005, },
  280.                 GreenLow = Input { Value = 59.9999694824219, },
  281.                 GreenHigh = Input { Value = 60.0000305175781, },
  282.                 BlueLow = Input { Value = -3.0517578125e-005, },
  283.                 BlueHigh = Input { Value = 3.0517578125e-005, },
  284.                 LuminanceLow = Input { Value = 35.219970703125, },
  285.                 LuminanceHigh = Input { Value = 35.2200317382812, },
  286.                 FringeSize = Input { Value = 0, },
  287.                 ClippingMode = Input { Value = FuID { "Domain" }, },
  288.                 EffectMask = Input {
  289.                     SourceOp = "Rectangle1",
  290.                     Source = "Mask",
  291.                 },
  292.                 Input = Input {
  293.                     SourceOp = "SetDomain1",
  294.                     Source = "Output",
  295.                 },
  296.             },
  297.             ViewInfo = OperatorInfo { Pos = { 935, 16.5 } },
  298.         },
  299.         PipeRouter3 = PipeRouter {
  300.             Inputs = {
  301.                 Input = Input {
  302.                     SourceOp = "SetDomain1_1",
  303.                     Source = "Output",
  304.                 },
  305.             },
  306.             ViewInfo = PipeRouterInfo { Pos = { 935, 214.5 } },
  307.         },
  308.         SetDomain1_2 = SetDomain {
  309.             Inputs = {
  310.                 Input = Input {
  311.                     SourceOp = "PipeRouter2",
  312.                     Source = "Output",
  313.                 },
  314.                 Foreground = Input {
  315.                     SourceOp = "Rectangle1_2",
  316.                     Source = "Mask",
  317.                 },
  318.             },
  319.             ViewInfo = OperatorInfo { Pos = { 825, 280.5 } },
  320.         },
  321.         ChromaKeyer1_2 = ChromaKeyer {
  322.             Inputs = {
  323.                 KeyType = Input { Value = 1, },
  324.                 ColorRange = Input { Value = 1, },
  325.                 RedLow = Input { Value = -3.0517578125e-005, },
  326.                 RedHigh = Input { Value = 3.0517578125e-005, },
  327.                 GreenLow = Input { Value = 59.9999694824219, },
  328.                 GreenHigh = Input { Value = 60.0000305175781, },
  329.                 BlueLow = Input { Value = -3.0517578125e-005, },
  330.                 BlueHigh = Input { Value = 3.0517578125e-005, },
  331.                 LuminanceLow = Input { Value = 35.219970703125, },
  332.                 LuminanceHigh = Input { Value = 35.2200317382812, },
  333.                 FringeSize = Input { Value = 0, },
  334.                 ClippingMode = Input { Value = FuID { "Domain" }, },
  335.                 EffectMask = Input {
  336.                     SourceOp = "Rectangle1_2",
  337.                     Source = "Mask",
  338.                 },
  339.                 Input = Input {
  340.                     SourceOp = "SetDomain1_2",
  341.                     Source = "Output",
  342.                 },
  343.             },
  344.             ViewInfo = OperatorInfo { Pos = { 935, 280.5 } },
  345.         },
  346.         Merge4 = Merge {
  347.             Inputs = {
  348.                 Background = Input {
  349.                     SourceOp = "PipeRouter3",
  350.                     Source = "Output",
  351.                 },
  352.                 Foreground = Input {
  353.                     SourceOp = "SetDomain1",
  354.                     Source = "Output",
  355.                 },
  356.                 PerformDepthMerge = Input { Value = 0, },
  357.             },
  358.             ViewInfo = OperatorInfo { Pos = { 1155, 214.5 } },
  359.         },
  360.         Merge5 = Merge {
  361.             Inputs = {
  362.                 Background = Input {
  363.                     SourceOp = "Merge4",
  364.                     Source = "Output",
  365.                 },
  366.                 Foreground = Input {
  367.                     SourceOp = "PipeRouter4",
  368.                     Source = "Output",
  369.                 },
  370.                 PerformDepthMerge = Input { Value = 0, },
  371.             },
  372.             ViewInfo = OperatorInfo { Pos = { 1155, 346.5 } },
  373.         },
  374.         PipeRouter4 = PipeRouter {
  375.             CtrlWZoom = false,
  376.             Inputs = {
  377.                 Input = Input {
  378.                     SourceOp = "SetDomain1_2",
  379.                     Source = "Output",
  380.                 },
  381.             },
  382.             ViewInfo = PipeRouterInfo { Pos = { 935, 346.5 } },
  383.         },
  384.         Merge3 = Merge {
  385.             Inputs = {
  386.                 Background = Input {
  387.                     SourceOp = "Merge2",
  388.                     Source = "Output",
  389.                 },
  390.                 Foreground = Input {
  391.                     SourceOp = "ChromaKeyer1_2",
  392.                     Source = "Output",
  393.                 },
  394.                 PerformDepthMerge = Input { Value = 0, },
  395.             },
  396.             ViewInfo = OperatorInfo { Pos = { 1320, 280.5 } },
  397.         },
  398.         Merge2 = Merge {
  399.             Inputs = {
  400.                 Background = Input {
  401.                     SourceOp = "ChromaKeyer1_1",
  402.                     Source = "Output",
  403.                 },
  404.                 Foreground = Input {
  405.                     SourceOp = "ChromaKeyer1",
  406.                     Source = "Output",
  407.                 },
  408.                 PerformDepthMerge = Input { Value = 0, },
  409.             },
  410.             ViewInfo = OperatorInfo { Pos = { 1320, 148.5 } },
  411.         },
  412.         Result = Merge {
  413.             NameSet = true,
  414.             Inputs = {
  415.                 Background = Input {
  416.                     SourceOp = "PipeRouter1",
  417.                     Source = "Output",
  418.                 },
  419.                 Foreground = Input {
  420.                     SourceOp = "Merge3",
  421.                     Source = "Output",
  422.                 },
  423.                 Operator = Input { Value = FuID { "In" }, },
  424.                 PerformDepthMerge = Input { Value = 0, },
  425.                 EffectMask = Input {
  426.                     SourceOp = "Merge5",
  427.                     Source = "Output",
  428.                 }
  429.             },
  430.             ViewInfo = OperatorInfo { Pos = { 1320, 478.5 } },
  431.         },
  432.         PipeRouter1 = PipeRouter {
  433.             Inputs = {
  434.                 Input = Input {
  435.                     SourceOp = "Merge1",
  436.                     Source = "Output",
  437.                 },
  438.             },
  439.             ViewInfo = PipeRouterInfo { Pos = { 550, 478.5 } },
  440.         }
  441.     }
  442. }
Added in 33 seconds:
Nope - that works just fine on Windows...

Added in 4 minutes 17 seconds:
Testing in Resolve...

Code: [Select all] [Expand/Collapse] [Download] (WSLsnippet-2018Jun13-0907.setting)
  1. {
  2.     Tools = ordered() {
  3.         Source = GroupOperator {
  4.             NameSet = true,
  5.             Outputs = {
  6.                 Output1 = InstanceOutput {
  7.                     SourceOp = "Merge1",
  8.                     Source = "Output",
  9.                 }
  10.             },
  11.             ViewInfo = GroupInfo {
  12.                 Pos = { 370.16, 213.237 },
  13.                 Flags = {
  14.                     AllowPan = false,
  15.                     GridSnap = true,
  16.                     AutoSnap = true,
  17.                     RemoveRouters = true
  18.                 },
  19.                 Size = { 236, 260.856, 118, 22 },
  20.                 Direction = "Horizontal",
  21.                 PipeStyle = "Direct",
  22.                 Scale = 1,
  23.                 Offset = { -220, -106.244 }
  24.             },
  25.             Tools = ordered() {
  26.                 Merge1 = Merge {
  27.                     CtrlWShown = false,
  28.                     Inputs = {
  29.                         Background = Input {
  30.                             SourceOp = "FastNoise1",
  31.                             Source = "Output",
  32.                         },
  33.                         Foreground = Input {
  34.                             SourceOp = "Background1",
  35.                             Source = "Output",
  36.                         },
  37.                         PerformDepthMerge = Input { Value = 0, },
  38.                     },
  39.                     ViewInfo = OperatorInfo { Pos = { 275, 313.5 } },
  40.                 },
  41.                 FastNoise1 = FastNoise {
  42.                     CtrlWShown = false,
  43.                     Inputs = {
  44.                         GlobalIn = Input { Value = 86400, },
  45.                         GlobalOut = Input { Value = 86519, },
  46.                         Width = Input { Value = 1920, },
  47.                         Height = Input { Value = 1080, },
  48.                         ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  49.                         Detail = Input { Value = 5.43, },
  50.                         XScale = Input { Value = 8.97, },
  51.                         Color1Red = Input { Value = 0.056, },
  52.                         Color1Green = Input { Value = 0.019, },
  53.                         Color1Alpha = Input { Value = 1, },
  54.                         Color2Red = Input { Value = 0.381, },
  55.                         Color2Green = Input { Value = 0.156, },
  56.                         Color2Blue = Input { Value = 0.038, },
  57.                     },
  58.                     ViewInfo = OperatorInfo { Pos = { 165, 313.5 } },
  59.                 },
  60.                 Polygon3 = PolylineMask {
  61.                     DrawMode = "ModifyOnly",
  62.                     DrawMode2 = "InsertAndModify",
  63.                     CtrlWShown = false,
  64.                     Inputs = {
  65.                         MaskWidth = Input { Value = 1920, },
  66.                         MaskHeight = Input { Value = 1080, },
  67.                         PixelAspect = Input { Value = { 1, 1 }, },
  68.                         ClippingMode = Input { Value = FuID { "None" }, },
  69.                         Polyline = Input {
  70.                             Value = Polyline {
  71.                                 Closed = true,
  72.                                 Points = {
  73.                                     { X = 0.230188682675362, Y = -0.422818779945374, LX = 0.0305584808173323, LY = -0.0222336661700712, RX = -0.021853019854953, RY = 0.0158997677655292 },
  74.                                     { X = 0.283018857240677, Y = -0.338926166296005, LX = 0.000386874915496571, LY = -0.0419718662074005, RX = -0.0004764826055696, RY = 0.0516933597140858 },
  75.                                     { X = 0.228301882743835, Y = -0.21812079846859, LX = 0.00140492762702669, LY = -0.0516399335037721, RX = -0.00111743099236093, RY = 0.0410726225540131 },
  76.                                     { X = 0.277358502149582, Y = -0.130872488021851, LX = -0.0226950239552088, LY = -0.00794038619158032, RX = 0.0232634014357527, RY = 0.00813924637815792 },
  77.                                     { X = 0.343396216630936, Y = -0.177852347493172, LX = -0.0150964773634529, LY = 0.0325019052735624, RX = 0.0218676723841093, RY = -0.0470799246254795 },
  78.                                     { X = 0.392452836036682, Y = -0.338926166296005, LX = -0.00388586659504608, LY = 0.0606640636820386, RX = 0.00251671452818784, RY = -0.0392895964576182 },
  79.                                     { X = 0.360377371311188, Y = -0.442953020334244, LX = 0.0215785736586434, LY = 0.00959450097002853, RX = -0.017740278735448, RY = -0.007887876382768 },
  80.                                     { X = 0.324528306722641, Y = -0.369127511978149, LX = 0.0182179074430046, LY = -0.00281747770626751, RX = -0.0328944227449899, RY = 0.00508726389320501 }
  81.                                 }
  82.                             },
  83.                         },
  84.                         Polyline2 = Input {
  85.                             Value = Polyline {
  86.                             },
  87.                             Disabled = true,
  88.                         },
  89.                         EffectMask = Input {
  90.                             SourceOp = "Polygon2",
  91.                             Source = "Mask",
  92.                         }
  93.                     },
  94.                     ViewInfo = OperatorInfo { Pos = { 275, 181.5 } },
  95.                 },
  96.                 Polygon2 = PolylineMask {
  97.                     DrawMode = "ModifyOnly",
  98.                     DrawMode2 = "InsertAndModify",
  99.                     CtrlWShown = false,
  100.                     Inputs = {
  101.                         MaskWidth = Input { Value = 1920, },
  102.                         MaskHeight = Input { Value = 1080, },
  103.                         PixelAspect = Input { Value = { 1, 1 }, },
  104.                         ClippingMode = Input { Value = FuID { "None" }, },
  105.                         Polyline = Input {
  106.                             Value = Polyline {
  107.                                 Closed = true,
  108.                                 Points = {
  109.                                     { X = 0.0792452843121763, Y = 0.221476504066646, LX = -0.00202025725758887, LY = -0.0380865907964662, RX = 0.00217168299974429, RY = 0.0409413214283501 },
  110.                                     { X = 0.1283018887043, Y = 0.308724820613861, LX = -0.0225084622323369, LY = -0.00948122353729022, RX = 0.0156785115977425, RY = 0.00660424828918933 },
  111.                                     { X = 0.158490568399429, Y = 0.241610735654831, LX = -0.0160399676787349, LY = -0.00271690048033063, RX = 0.0221577919509577, RY = 0.00375315691405254 },
  112.                                     { X = 0.207547172904015, Y = 0.322147637605667, LX = -0.0112528614802945, LY = 0.0341406385791985, RX = 0.0262076650880788, RY = -0.0795127908882216 },
  113.                                     { X = 0.222641512751579, Y = 0.0469798669219017, LX = 0.0122083655825934, LY = 0.0895655606493653, RX = -0.00427291192598275, RY = -0.0313478286398682 },
  114.                                     { X = 0.177358493208885, Y = 0.100671142339706, LX = 0.0178324681877338, LY = 0.00594664963077666, RX = -0.021426934646139, RY = -0.00714530774207599 },
  115.                                     { X = 0.132075473666191, Y = 0.0167785231024027, LX = 0.0209354767600494, LY = -0.0108099408855289, RX = -0.0209741715062005, RY = 0.0108299207466645 },
  116.                                     { X = 0.118867926299572, Y = 0.130872488021851, LX = 0.00864915369235285, LY = -0.0356540151692399, RX = -0.00852156853999153, RY = 0.0351280766647962 }
  117.                                 }
  118.                             },
  119.                         },
  120.                         Polyline2 = Input {
  121.                             Value = Polyline {
  122.                             },
  123.                             Disabled = true,
  124.                         },
  125.                         EffectMask = Input {
  126.                             SourceOp = "Polygon1",
  127.                             Source = "Mask",
  128.                         }
  129.                     },
  130.                     ViewInfo = OperatorInfo { Pos = { 275, 148.5 } },
  131.                 },
  132.                 Polygon1 = PolylineMask {
  133.                     DrawMode = "ModifyOnly",
  134.                     DrawMode2 = "InsertAndModify",
  135.                     CtrlWShown = false,
  136.                     Inputs = {
  137.                         MaskWidth = Input { Value = 1920, },
  138.                         MaskHeight = Input { Value = 1080, },
  139.                         PixelAspect = Input { Value = { 1, 1 }, },
  140.                         ClippingMode = Input { Value = FuID { "None" }, },
  141.                         Polyline = Input {
  142.                             Value = Polyline {
  143.                                 Closed = true,
  144.                                 Points = {
  145.                                     { X = -0.281132072210312, Y = 0.255033552646637, LX = -0.019296155872158, LY = -0.021336852732387, RX = 0.021282708312704, RY = 0.0235334963099947 },
  146.                                     { X = -0.20943395793438, Y = 0.295302003622055, LX = -0.017718975053061, LY = 0.0315136086535096, RX = 0.0177250571635864, RY = -0.0315244258283355 },
  147.                                     { X = -0.232075467705727, Y = 0.167785242199898, LX = -0.00645765977643333, LY = 0.0430691192161356, RX = 0.00404984728169921, RY = -0.0270103042621089 },
  148.                                     { X = -0.186792448163033, Y = 0.144295305013657, LX = -0.00505459281296682, LY = 0.0264697083322899, RX = 0.00938279218467663, RY = -0.0491354658349034 },
  149.                                     { X = -0.198113203048706, Y = -0.0100671136751771, LX = 0.0200700104823001, LY = 0.0376758543602367, RX = -0.0226593694089246, RY = -0.042536654502415 },
  150.                                     { X = -0.288679242134094, Y = -0.0805369094014168, LX = 0.0312018360433385, LY = -0.0188467478144746, RX = -0.0234241381965078, RY = 0.0141488092158357 },
  151.                                     { X = -0.298113197088242, Y = 0.0503355711698532, LX = 0.00190161589269195, LY = -0.0438507942176803, RX = -0.00198982416389539, RY = 0.0458848552305824 },
  152.                                     { X = -0.332075476646423, Y = 0.174496650695801, LX = -0.00377691078859299, LY = -0.0455285512709292, RX = 0.00331548130273856, RY = 0.0399662763905982 }
  153.                                 }
  154.                             },
  155.                         },
  156.                         Polyline2 = Input {
  157.                             Value = Polyline {
  158.                             },
  159.                             Disabled = true,
  160.                         },
  161.                     },
  162.                     ViewInfo = OperatorInfo { Pos = { 275, 115.5 } },
  163.                 },
  164.                 Background1 = Background {
  165.                     CtrlWShown = false,
  166.                     Inputs = {
  167.                         GlobalIn = Input { Value = 86400, },
  168.                         GlobalOut = Input { Value = 86519, },
  169.                         Width = Input { Value = 1920, },
  170.                         Height = Input { Value = 1080, },
  171.                         ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  172.                         TopLeftGreen = Input { Value = 60, },
  173.                         EffectMask = Input {
  174.                             SourceOp = "Polygon3",
  175.                             Source = "Mask",
  176.                         }
  177.                     },
  178.                     ViewInfo = OperatorInfo { Pos = { 275, 214.5 } },
  179.                 }
  180.             },
  181.         },
  182.         PipeRouter2 = PipeRouter {
  183.             Inputs = {
  184.                 Input = Input {
  185.                     SourceOp = "PipeRouter1",
  186.                     Source = "Output",
  187.                 },
  188.             },
  189.             ViewInfo = PipeRouterInfo { Pos = { 645.16, -116.763 } },
  190.         },
  191.         Rectangle1_1 = RectangleMask {
  192.             Inputs = {
  193.                 MaskWidth = Input { Value = 1920, },
  194.                 MaskHeight = Input { Value = 1080, },
  195.                 PixelAspect = Input { Value = { 1, 1 }, },
  196.                 ClippingMode = Input { Value = FuID { "None" }, },
  197.                 Center = Input { Value = { 0.649455136723941, 0.665049792469538 }, },
  198.                 Width = Input { Value = 0.203600631634902, },
  199.                 Height = Input { Value = 0.401918976545842, },
  200.             },
  201.             ViewInfo = OperatorInfo { Pos = { 810.16, -182.763 } },
  202.         },
  203.         SetDomain1 = SetDomain {
  204.             Inputs = {
  205.                 Input = Input {
  206.                     SourceOp = "PipeRouter2",
  207.                     Source = "Output",
  208.                 },
  209.                 Foreground = Input {
  210.                     SourceOp = "Rectangle1",
  211.                     Source = "Mask",
  212.                 },
  213.             },
  214.             ViewInfo = OperatorInfo { Pos = { 810.16, -248.763 } },
  215.         },
  216.         SetDomain1_1 = SetDomain {
  217.             Inputs = {
  218.                 Input = Input {
  219.                     SourceOp = "PipeRouter2",
  220.                     Source = "Output",
  221.                 },
  222.                 Foreground = Input {
  223.                     SourceOp = "Rectangle1_1",
  224.                     Source = "Mask",
  225.                 },
  226.             },
  227.             ViewInfo = OperatorInfo { Pos = { 810.16, -116.763 } },
  228.         },
  229.         Rectangle1 = RectangleMask {
  230.             Inputs = {
  231.                 MaskWidth = Input { Value = 1920, },
  232.                 MaskHeight = Input { Value = 1080, },
  233.                 PixelAspect = Input { Value = { 1, 1 }, },
  234.                 ClippingMode = Input { Value = FuID { "None" }, },
  235.                 Center = Input { Value = { 0.25065274151436, 0.616009280742459 }, },
  236.                 Width = Input { Value = 0.215576679539094, },
  237.                 Height = Input { Value = 0.470149253731344, },
  238.             },
  239.             ViewInfo = OperatorInfo { Pos = { 810.16, -314.763 } },
  240.         },
  241.         Rectangle1_2 = RectangleMask {
  242.             Inputs = {
  243.                 MaskWidth = Input { Value = 1920, },
  244.                 MaskHeight = Input { Value = 1080, },
  245.                 PixelAspect = Input { Value = { 1, 1 }, },
  246.                 ClippingMode = Input { Value = FuID { "None" }, },
  247.                 Center = Input { Value = { 0.806341364268851, 0.238610560060157 }, },
  248.                 Width = Input { Value = 0.234738356185801, },
  249.                 Height = Input { Value = 0.453091684434968, },
  250.             },
  251.             ViewInfo = OperatorInfo { Pos = { 810.16, -50.7626 } },
  252.         },
  253.         ChromaKeyer1_1 = ChromaKeyer {
  254.             Inputs = {
  255.                 KeyType = Input { Value = 1, },
  256.                 ColorRange = Input { Value = 1, },
  257.                 RedLow = Input { Value = -3.0517578125e-005, },
  258.                 RedHigh = Input { Value = 3.0517578125e-005, },
  259.                 GreenLow = Input { Value = 59.9999694824219, },
  260.                 GreenHigh = Input { Value = 60.0000305175781, },
  261.                 BlueLow = Input { Value = -3.0517578125e-005, },
  262.                 BlueHigh = Input { Value = 3.0517578125e-005, },
  263.                 LuminanceLow = Input { Value = 35.219970703125, },
  264.                 LuminanceHigh = Input { Value = 35.2200317382812, },
  265.                 FringeSize = Input { Value = 0, },
  266.                 ClippingMode = Input { Value = FuID { "Domain" }, },
  267.                 EffectMask = Input {
  268.                     SourceOp = "Rectangle1_1",
  269.                     Source = "Mask",
  270.                 },
  271.                 Input = Input {
  272.                     SourceOp = "SetDomain1_1",
  273.                     Source = "Output",
  274.                 },
  275.             },
  276.             ViewInfo = OperatorInfo { Pos = { 920.16, -116.763 } },
  277.         },
  278.         ChromaKeyer1 = ChromaKeyer {
  279.             Inputs = {
  280.                 KeyType = Input { Value = 1, },
  281.                 ColorRange = Input { Value = 1, },
  282.                 RedLow = Input { Value = -3.0517578125e-005, },
  283.                 RedHigh = Input { Value = 3.0517578125e-005, },
  284.                 GreenLow = Input { Value = 59.9999694824219, },
  285.                 GreenHigh = Input { Value = 60.0000305175781, },
  286.                 BlueLow = Input { Value = -3.0517578125e-005, },
  287.                 BlueHigh = Input { Value = 3.0517578125e-005, },
  288.                 LuminanceLow = Input { Value = 35.219970703125, },
  289.                 LuminanceHigh = Input { Value = 35.2200317382812, },
  290.                 FringeSize = Input { Value = 0, },
  291.                 ClippingMode = Input { Value = FuID { "Domain" }, },
  292.                 EffectMask = Input {
  293.                     SourceOp = "Rectangle1",
  294.                     Source = "Mask",
  295.                 },
  296.                 Input = Input {
  297.                     SourceOp = "SetDomain1",
  298.                     Source = "Output",
  299.                 },
  300.             },
  301.             ViewInfo = OperatorInfo { Pos = { 920.16, -248.763 } },
  302.         },
  303.         PipeRouter3 = PipeRouter {
  304.             Inputs = {
  305.                 Input = Input {
  306.                     SourceOp = "SetDomain1_1",
  307.                     Source = "Output",
  308.                 },
  309.             },
  310.             ViewInfo = PipeRouterInfo { Pos = { 920.16, -50.7626 } },
  311.         },
  312.         SetDomain1_2 = SetDomain {
  313.             Inputs = {
  314.                 Input = Input {
  315.                     SourceOp = "PipeRouter2",
  316.                     Source = "Output",
  317.                 },
  318.                 Foreground = Input {
  319.                     SourceOp = "Rectangle1_2",
  320.                     Source = "Mask",
  321.                 },
  322.             },
  323.             ViewInfo = OperatorInfo { Pos = { 810.16, 15.2374 } },
  324.         },
  325.         ChromaKeyer1_2 = ChromaKeyer {
  326.             Inputs = {
  327.                 KeyType = Input { Value = 1, },
  328.                 ColorRange = Input { Value = 1, },
  329.                 RedLow = Input { Value = -3.0517578125e-005, },
  330.                 RedHigh = Input { Value = 3.0517578125e-005, },
  331.                 GreenLow = Input { Value = 59.9999694824219, },
  332.                 GreenHigh = Input { Value = 60.0000305175781, },
  333.                 BlueLow = Input { Value = -3.0517578125e-005, },
  334.                 BlueHigh = Input { Value = 3.0517578125e-005, },
  335.                 LuminanceLow = Input { Value = 35.219970703125, },
  336.                 LuminanceHigh = Input { Value = 35.2200317382812, },
  337.                 FringeSize = Input { Value = 0, },
  338.                 ClippingMode = Input { Value = FuID { "Domain" }, },
  339.                 EffectMask = Input {
  340.                     SourceOp = "Rectangle1_2",
  341.                     Source = "Mask",
  342.                 },
  343.                 Input = Input {
  344.                     SourceOp = "SetDomain1_2",
  345.                     Source = "Output",
  346.                 },
  347.             },
  348.             ViewInfo = OperatorInfo { Pos = { 920.16, 15.2374 } },
  349.         },
  350.         Merge4 = Merge {
  351.             Inputs = {
  352.                 Background = Input {
  353.                     SourceOp = "PipeRouter3",
  354.                     Source = "Output",
  355.                 },
  356.                 Foreground = Input {
  357.                     SourceOp = "SetDomain1",
  358.                     Source = "Output",
  359.                 },
  360.                 PerformDepthMerge = Input { Value = 0, },
  361.             },
  362.             ViewInfo = OperatorInfo { Pos = { 1140.16, -50.7626 } },
  363.         },
  364.         Merge5 = Merge {
  365.             Inputs = {
  366.                 Background = Input {
  367.                     SourceOp = "Merge4",
  368.                     Source = "Output",
  369.                 },
  370.                 Foreground = Input {
  371.                     SourceOp = "PipeRouter4",
  372.                     Source = "Output",
  373.                 },
  374.                 PerformDepthMerge = Input { Value = 0, },
  375.             },
  376.             ViewInfo = OperatorInfo { Pos = { 1140.16, 81.2374 } },
  377.         },
  378.         PipeRouter4 = PipeRouter {
  379.             CtrlWZoom = false,
  380.             Inputs = {
  381.                 Input = Input {
  382.                     SourceOp = "SetDomain1_2",
  383.                     Source = "Output",
  384.                 },
  385.             },
  386.             ViewInfo = PipeRouterInfo { Pos = { 920.16, 81.2374 } },
  387.         },
  388.         Merge3 = Merge {
  389.             Inputs = {
  390.                 Background = Input {
  391.                     SourceOp = "Merge2",
  392.                     Source = "Output",
  393.                 },
  394.                 Foreground = Input {
  395.                     SourceOp = "ChromaKeyer1_2",
  396.                     Source = "Output",
  397.                 },
  398.                 PerformDepthMerge = Input { Value = 0, },
  399.             },
  400.             ViewInfo = OperatorInfo { Pos = { 1305.16, 15.2374 } },
  401.         },
  402.         Merge2 = Merge {
  403.             Inputs = {
  404.                 Background = Input {
  405.                     SourceOp = "ChromaKeyer1_1",
  406.                     Source = "Output",
  407.                 },
  408.                 Foreground = Input {
  409.                     SourceOp = "ChromaKeyer1",
  410.                     Source = "Output",
  411.                 },
  412.                 PerformDepthMerge = Input { Value = 0, },
  413.             },
  414.             ViewInfo = OperatorInfo { Pos = { 1305.16, -116.763 } },
  415.         },
  416.         Result = Merge {
  417.             NameSet = true,
  418.             Inputs = {
  419.                 Background = Input {
  420.                     SourceOp = "PipeRouter1",
  421.                     Source = "Output",
  422.                 },
  423.                 Foreground = Input {
  424.                     SourceOp = "Merge3",
  425.                     Source = "Output",
  426.                 },
  427.                 Operator = Input { Value = FuID { "In" }, },
  428.                 PerformDepthMerge = Input { Value = 0, },
  429.                 EffectMask = Input {
  430.                     SourceOp = "Merge5",
  431.                     Source = "Output",
  432.                 }
  433.             },
  434.             ViewInfo = OperatorInfo { Pos = { 1305.16, 213.237 } },
  435.         },
  436.         PipeRouter1 = PipeRouter {
  437.             Inputs = {
  438.                 Input = Input {
  439.                     SourceOp = "Merge1",
  440.                     Source = "Output",
  441.                 },
  442.             },
  443.             ViewInfo = PipeRouterInfo { Pos = { 535.16, 213.237 } },
  444.         }
  445.     }
  446. }
Added in 43 seconds:
Yup, that works fine, too.

Please send me a Mac for testing... :D

User avatar
intelligent machine
Fusioneer
Posts: 117
Joined: Fri May 13, 2016 10:01 pm
Location: Austin, Texas, USA
Been thanked: 16 times
Contact:

Re: Keying, DoD, and efficiency

#10

Post by intelligent machine » Wed Jun 13, 2018 9:17 am

SecondMan wrote:
Wed Jun 13, 2018 9:08 am
Please send me a Mac for testing... :D
Sure thing! What's the address? :D
SecondMan wrote:
Wed Jun 13, 2018 9:08 am
Nope - that works just fine on Windows...
Perhaps do an os check and then if/else if/else split adding the "}/n" to the macOS version??
SecondMan wrote:
Wed Jun 13, 2018 9:08 am
Testing in Resolve...

Yup, that works fine, too.
I'll check macOS Resolve in a bit and let you know.

User avatar
SecondMan
Site Admin
Posts: 2406
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 60 times
Contact:

Re: Keying, DoD, and efficiency

#11

Post by SecondMan » Wed Jun 13, 2018 9:22 am

intelligent machine wrote:
Wed Jun 13, 2018 9:17 am
Sure thing! What's the address? :D

PM me :D

intelligent machine wrote:
Wed Jun 13, 2018 9:17 am
Perhaps do an os check and then if/else if/else split adding the "}/n" to the macOS version??

Sure it can all be fixed with a workaround, that's easy enough - but I'm trying to get to the root cause of this first...

User avatar
intelligent machine
Fusioneer
Posts: 117
Joined: Fri May 13, 2016 10:01 pm
Location: Austin, Texas, USA
Been thanked: 16 times
Contact:

Re: Keying, DoD, and efficiency

#12

Post by intelligent machine » Wed Jun 13, 2018 10:39 am

Code: Select all

	-- Get the nodes in the comp
	local tools = fusion.CurrentComp:GetToolList(true)
I think this may be the culprit but I'm not sure.

In Lua I get the following when I do a dump:

Code: Select all

Lua> ==comp:GetToolList(true)
[string "???"]:64: bad argument #1 to 'pairs' (table expected, got nil)
When I do the dump in python (uppercase "T" in 'true'):

Code: Select all

Py2> ==comp.GetToolList(True)
{1.0: <PyRemoteObject object at 0x62a271f8>}
Do you get the same error on Windows?

User avatar
SecondMan
Site Admin
Posts: 2406
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 60 times
Contact:

Re: Troubleshooting the Copy Nodes To Codebox Snippet script...

#13

Post by SecondMan » Wed Jun 13, 2018 1:02 pm

@Andrew and @intelligent machine,

Try this please?

Code: [Select all] [Expand/Collapse] [Download] (Copy Nodes To Codebox Snippet.lua)
  1. --[[--
  2. Copy to Codebox - v1.5 Jun 13, 2018
  3. by Pieter Van Houte
  4.  
  5. A quick code snippet that copies the flow view selection and formats it for easy inclusion on the WSL forum. This script also creates the codebox filename based on the OS' date and time.
  6.  
  7. Change log:
  8. v1.5    - added workaround for bmd.getclipboard() apparently losing the last line containing the closing bracket on MacOS
  9. v1.4    - added tiny wait after comp:Copy(tools) to avoid occasional hiccups
  10. v1.3    - removed print string duplication (thanks once more Andrew!)
  11. v1.2    - splitting into functions, more error handling and now capable of itself being posted inside of WSL Codebox tags :) (thanks again AndrewHazelden)
  12. v1.1    - fixed comp:GetToolList(true) and some initial error handling (thanks AndrewHazelden)
  13. v1.0    - initial release
  14. --]]--
  15.  
  16. -- Display a UI Manager 3 second popup for notifications
  17. function CodeboxDialog(title, msg)
  18.     local ui = fu.UIManager
  19.     local disp = bmd.UIDispatcher(ui)
  20.     local width,height = 400,50
  21.  
  22.     win = disp:AddWindow({
  23.         ID = "codeboxWin",
  24.         WindowTitle = title,
  25.         Geometry = {100, 100, width, height},
  26.         Spacing = 10,
  27.  
  28.         ui:HGroup{
  29.             ID = "root",
  30.             ui:Label{
  31.                 ID = "AboutText",
  32.                 Text = msg,
  33.                 ReadOnly = true,
  34.                 Alignment = {
  35.                     AlignHCenter = true,
  36.                     AlignTop = true
  37.                 },
  38.             },
  39.         },
  40.     })
  41.  
  42.     print("\n" .. title .. '\n' .. msg .. "\n")
  43.  
  44.     -- The window was closed
  45.     function win.On.MyWin.Close(ev)
  46.             disp:ExitLoop()
  47.     end
  48.  
  49.     win:Show()
  50.     bmd.wait(3)
  51.     win:Hide()
  52. end
  53.  
  54. -- The main function
  55. function Main()
  56.     local opentag = "[" .. "Codebox=lua file=WSLsnippet-" .. os.date("%Y%b%d") .. "-" .. os.date("%H%M") .. ".setting" .. "]"
  57.     local closetag = "}[" .. "/Codebox" .. "]" -- v1.5
  58.  
  59.     -- Get the nodes in the comp
  60.     local tools = fusion.CurrentComp:GetToolList(true)
  61.  
  62.     -- Check if any nodes were selected
  63.     if #tools >= 1 then
  64.         -- Copy the selected nodes from the flow area
  65.         local err = comp:Copy(tools)
  66.         bmd.wait(0.01)
  67.         local nodes = bmd:getclipboard()
  68.         nodes = nodes:gsub("(.*)[\n].*$","%1") -- v1.5
  69.    
  70.         -- Check if the copy command succeeded
  71.         if err == true and nodes ~= nil then
  72.             local snip = opentag .. tostring(nodes) .. closetag
  73.  
  74.             print("\n--------start of snippet--------\n")
  75.             print(snip)
  76.             print("\n--------end of snippet-------\n")
  77.  
  78.             -- Copy the codebox string to your clipboard buffer
  79.             bmd.setclipboard(snip)
  80.  
  81.             CodeboxDialog("[Copied Codebox Snippet]", "Codebox Snippet copied to clipboard for use on We Suck Less")
  82.         else
  83.             CodeboxDialog("[Script Error]", "There was a problem copying the nodes.")
  84.         end
  85.     else
  86.         CodeboxDialog("[Script Error]", "Please select nodes in the Fusion Flow area.")
  87.     end
  88. end
  89.  
  90.  
  91. Main()
  92. print("[Done]")

User avatar
intelligent machine
Fusioneer
Posts: 117
Joined: Fri May 13, 2016 10:01 pm
Location: Austin, Texas, USA
Been thanked: 16 times
Contact:

Re: Troubleshooting the Copy Nodes To Codebox Snippet script...

#14

Post by intelligent machine » Wed Jun 13, 2018 1:34 pm

I was thinking some regex + string substitution was in order :)

This is working:
Code: [Select all] [Expand/Collapse] [Download] (WSLsnippet-2018Jun13-1532.setting)
  1. {
  2.     Tools = ordered() {
  3.         Background1 = Background {
  4.             CustomData = {
  5.                 Settings = {
  6.                     [1] = {
  7.                         Tools = ordered() {
  8.                             Background1 = Background {
  9.                                 Inputs = {
  10.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  11.                                     TopLeftAlpha = Input { Value = 0 },
  12.                                     Height = Input { Value = 858 },
  13.                                     Depth = Input { Value = 4 },
  14.                                     UseFrameFormatSettings = Input { Value = 1 },
  15.                                     Width = Input { Value = 2048 }
  16.                                 },
  17.                                 Name = "Background1",
  18.                                 CtrlWZoom = false,
  19.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  20.                                 CustomData = {
  21.                                 }
  22.                             }
  23.                         }
  24.                     },
  25.                     [2] = {
  26.                         Tools = ordered() {
  27.                             Background1 = Background {
  28.                                 Inputs = {
  29.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  30.                                     Height = Input { Value = 858 },
  31.                                     Depth = Input { Value = 4 },
  32.                                     UseFrameFormatSettings = Input { Value = 1 },
  33.                                     Width = Input { Value = 2048 }
  34.                                 },
  35.                                 CtrlWZoom = false,
  36.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  37.                                 CustomData = {
  38.                                 }
  39.                             }
  40.                         }
  41.                     },
  42.                     [3] = {
  43.                         Tools = ordered() {
  44.                             Background1 = Background {
  45.                                 Inputs = {
  46.                                     TopLeftBlue = Input { Value = 1 },
  47.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  48.                                     TopLeftRed = Input { Value = 1 },
  49.                                     TopLeftGreen = Input { Value = 1 },
  50.                                     Height = Input { Value = 858 },
  51.                                     Depth = Input { Value = 4 },
  52.                                     UseFrameFormatSettings = Input { Value = 1 },
  53.                                     Width = Input { Value = 2048 }
  54.                                 },
  55.                                 CtrlWZoom = false,
  56.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  57.                                 CustomData = {
  58.                                 }
  59.                             }
  60.                         }
  61.                     },
  62.                     [4] = {
  63.                         Tools = ordered() {
  64.                             Background1 = Background {
  65.                                 Inputs = {
  66.                                     Type = Input { Value = FuID { "Vertical" } },
  67.                                     Width = Input { Value = 2048 },
  68.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  69.                                     TopLeftRed = Input { Value = 1 },
  70.                                     TopLeftBlue = Input { Value = 1 },
  71.                                     Height = Input { Value = 858 },
  72.                                     Depth = Input { Value = 4 },
  73.                                     UseFrameFormatSettings = Input { Value = 1 },
  74.                                     TopLeftGreen = Input { Value = 1 }
  75.                                 },
  76.                                 CtrlWZoom = false,
  77.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  78.                                 CustomData = {
  79.                                 }
  80.                             }
  81.                         }
  82.                     },
  83.                     [5] = {
  84.                         Tools = ordered() {
  85.                             Background1 = Background {
  86.                                 Inputs = {
  87.                                     BottomLeftGreen = Input { Value = 1 },
  88.                                     Type = Input { Value = FuID { "Corner" } },
  89.                                     BottomRightRed = Input { Value = 1 },
  90.                                     BottomRightBlue = Input { Value = 0.5 },
  91.                                     BottomLeftBlue = Input { Value = 0.5 },
  92.                                     TopRightGreen = Input { Value = 1 },
  93.                                     BottomLeftRed = Input { Value = 1 },
  94.                                     Width = Input { Value = 2048 },
  95.                                     TopRightBlue = Input { Value = 0.5 },
  96.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  97.                                     TopLeftRed = Input { Value = 1 },
  98.                                     TopLeftBlue = Input { Value = 0.5 },
  99.                                     Height = Input { Value = 858 },
  100.                                     Depth = Input { Value = 4 },
  101.                                     UseFrameFormatSettings = Input { Value = 1 },
  102.                                     TopLeftGreen = Input { Value = 0.5 }
  103.                                 },
  104.                                 CtrlWZoom = false,
  105.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  106.                                 CustomData = {
  107.                                 }
  108.                             }
  109.                         }
  110.                     },
  111.                 }
  112.             },
  113.             Inputs = {
  114.                 UseFrameFormatSettings = Input { Value = 1, },
  115.                 Width = Input { Value = 2048, },
  116.                 Height = Input { Value = 858, },
  117.                 Depth = Input { Value = 4, },
  118.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  119.                 TopLeftAlpha = Input { Value = 0, },
  120.             },
  121.             ViewInfo = OperatorInfo { Pos = { 825, 181.5 } },
  122.         },
  123.         Background1_1 = Background {
  124.             CustomData = {
  125.                 Settings = {
  126.                     [1] = {
  127.                         Tools = ordered() {
  128.                             Background1 = Background {
  129.                                 Inputs = {
  130.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  131.                                     TopLeftAlpha = Input { Value = 0 },
  132.                                     Height = Input { Value = 858 },
  133.                                     Depth = Input { Value = 4 },
  134.                                     UseFrameFormatSettings = Input { Value = 1 },
  135.                                     Width = Input { Value = 2048 }
  136.                                 },
  137.                                 Name = "Background1",
  138.                                 CtrlWZoom = false,
  139.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  140.                                 CustomData = {
  141.                                 }
  142.                             }
  143.                         }
  144.                     },
  145.                     [2] = {
  146.                         Tools = ordered() {
  147.                             Background1 = Background {
  148.                                 Inputs = {
  149.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  150.                                     Height = Input { Value = 858 },
  151.                                     Depth = Input { Value = 4 },
  152.                                     UseFrameFormatSettings = Input { Value = 1 },
  153.                                     Width = Input { Value = 2048 }
  154.                                 },
  155.                                 CtrlWZoom = false,
  156.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  157.                                 CustomData = {
  158.                                 }
  159.                             }
  160.                         }
  161.                     },
  162.                     [3] = {
  163.                         Tools = ordered() {
  164.                             Background1 = Background {
  165.                                 Inputs = {
  166.                                     TopLeftBlue = Input { Value = 1 },
  167.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  168.                                     TopLeftRed = Input { Value = 1 },
  169.                                     TopLeftGreen = Input { Value = 1 },
  170.                                     Height = Input { Value = 858 },
  171.                                     Depth = Input { Value = 4 },
  172.                                     UseFrameFormatSettings = Input { Value = 1 },
  173.                                     Width = Input { Value = 2048 }
  174.                                 },
  175.                                 CtrlWZoom = false,
  176.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  177.                                 CustomData = {
  178.                                 }
  179.                             }
  180.                         }
  181.                     },
  182.                     [4] = {
  183.                         Tools = ordered() {
  184.                             Background1 = Background {
  185.                                 Inputs = {
  186.                                     Type = Input { Value = FuID { "Vertical" } },
  187.                                     Width = Input { Value = 2048 },
  188.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  189.                                     TopLeftRed = Input { Value = 1 },
  190.                                     TopLeftBlue = Input { Value = 1 },
  191.                                     Height = Input { Value = 858 },
  192.                                     Depth = Input { Value = 4 },
  193.                                     UseFrameFormatSettings = Input { Value = 1 },
  194.                                     TopLeftGreen = Input { Value = 1 }
  195.                                 },
  196.                                 CtrlWZoom = false,
  197.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  198.                                 CustomData = {
  199.                                 }
  200.                             }
  201.                         }
  202.                     },
  203.                     [5] = {
  204.                         Tools = ordered() {
  205.                             Background1 = Background {
  206.                                 Inputs = {
  207.                                     BottomLeftGreen = Input { Value = 1 },
  208.                                     Type = Input { Value = FuID { "Corner" } },
  209.                                     BottomRightRed = Input { Value = 1 },
  210.                                     BottomRightBlue = Input { Value = 0.5 },
  211.                                     BottomLeftBlue = Input { Value = 0.5 },
  212.                                     TopRightGreen = Input { Value = 1 },
  213.                                     BottomLeftRed = Input { Value = 1 },
  214.                                     Width = Input { Value = 2048 },
  215.                                     TopRightBlue = Input { Value = 0.5 },
  216.                                     ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  217.                                     TopLeftRed = Input { Value = 1 },
  218.                                     TopLeftBlue = Input { Value = 0.5 },
  219.                                     Height = Input { Value = 858 },
  220.                                     Depth = Input { Value = 4 },
  221.                                     UseFrameFormatSettings = Input { Value = 1 },
  222.                                     TopLeftGreen = Input { Value = 0.5 }
  223.                                 },
  224.                                 CtrlWZoom = false,
  225.                                 ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
  226.                                 CustomData = {
  227.                                 }
  228.                             }
  229.                         }
  230.                     },
  231.                 }
  232.             },
  233.             Inputs = {
  234.                 UseFrameFormatSettings = Input { Value = 1, },
  235.                 Width = Input { Value = 2048, },
  236.                 Height = Input { Value = 858, },
  237.                 Depth = Input { Value = 4, },
  238.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  239.                 TopLeftAlpha = Input { Value = 0, },
  240.             },
  241.             ViewInfo = OperatorInfo { Pos = { 825, 346.5 } },
  242.         },
  243.         Merge2 = Merge {
  244.             CtrlWZoom = false,
  245.             Inputs = {
  246.                 Background = Input {
  247.                     SourceOp = "Background1_1",
  248.                     Source = "Output",
  249.                 },
  250.                 Foreground = Input {
  251.                     SourceOp = "Background1",
  252.                     Source = "Output",
  253.                 },
  254.                 PerformDepthMerge = Input { Value = 0, },
  255.             },
  256.             ViewInfo = OperatorInfo { Pos = { 935, 346.5 } },
  257.             Colors = {
  258.                 TileColor = { R = 0.847058823529412, G = 0.596078431372549, B = 0.0784313725490196 },
  259.                 TextColor = { R = 0.0980392156862745, G = 0.0980392156862745, B = 0.117647058823529 },
  260.             }
  261.         }
  262.     }}

User avatar
SecondMan
Site Admin
Posts: 2406
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 60 times
Contact:

Re: Troubleshooting the Copy Nodes To Codebox Snippet script...

#15

Post by SecondMan » Wed Jun 13, 2018 5:23 pm

Interesting. Almost there...

Could you try one more time with the below please, @intelligent machine?

Thanks :)

Code: [Select all] [Expand/Collapse] [Download] (Copy Nodes To Codebox Snippet.lua)
  1. --[[--
  2. Copy to Codebox - v1.5 Jun 13, 2018
  3. by Pieter Van Houte
  4.  
  5. A quick code snippet that copies the flow view selection and formats it for easy inclusion on the WSL forum. This script also creates the codebox filename based on the OS' date and time.
  6.  
  7. Change log:
  8. v1.5    - added workaround for bmd.getclipboard() apparently losing the last line containing the closing bracket on MacOS
  9. v1.4    - added tiny wait after comp:Copy(tools) to avoid occasional hiccups
  10. v1.3    - removed print string duplication (thanks once more Andrew!)
  11. v1.2    - splitting into functions, more error handling and now capable of itself being posted inside of WSL Codebox tags :) (thanks again AndrewHazelden)
  12. v1.1    - fixed comp:GetToolList(true) and some initial error handling (thanks AndrewHazelden)
  13. v1.0    - initial release
  14. --]]--
  15.  
  16. -- Display a UI Manager 3 second popup for notifications
  17. function CodeboxDialog(title, msg)
  18.     local ui = fu.UIManager
  19.     local disp = bmd.UIDispatcher(ui)
  20.     local width,height = 400,50
  21.  
  22.     win = disp:AddWindow({
  23.         ID = "codeboxWin",
  24.         WindowTitle = title,
  25.         Geometry = {100, 100, width, height},
  26.         Spacing = 10,
  27.  
  28.         ui:HGroup{
  29.             ID = "root",
  30.             ui:Label{
  31.                 ID = "AboutText",
  32.                 Text = msg,
  33.                 ReadOnly = true,
  34.                 Alignment = {
  35.                     AlignHCenter = true,
  36.                     AlignTop = true
  37.                 },
  38.             },
  39.         },
  40.     })
  41.  
  42.     print("\n" .. title .. '\n' .. msg .. "\n")
  43.  
  44.     -- The window was closed
  45.     function win.On.MyWin.Close(ev)
  46.             disp:ExitLoop()
  47.     end
  48.  
  49.     win:Show()
  50.     bmd.wait(3)
  51.     win:Hide()
  52. end
  53.  
  54. -- The main function
  55. function Main()
  56.     local opentag = "[" .. "Codebox=lua file=WSLsnippet-" .. os.date("%Y%b%d") .. "-" .. os.date("%H%M") .. ".setting" .. "]"
  57.     local closetag = "\n}[" .. "/Codebox" .. "]" -- v1.5
  58.  
  59.     -- Get the nodes in the comp
  60.     local tools = fusion.CurrentComp:GetToolList(true)
  61.  
  62.     -- Check if any nodes were selected
  63.     if #tools >= 1 then
  64.         -- Copy the selected nodes from the flow area
  65.         local err = comp:Copy(tools)
  66.         bmd.wait(0.01)
  67.         local nodes = bmd:getclipboard():gsub("(.*)[\n].*$","%1") -- v1.5
  68.    
  69.         -- Check if the copy command succeeded
  70.         if err == true and nodes ~= nil then
  71.             local snip = opentag .. tostring(nodes) .. closetag
  72.  
  73.             print("\n--------start of snippet--------\n")
  74.             print(snip)
  75.             print("\n--------end of snippet-------\n")
  76.  
  77.             -- Copy the codebox string to your clipboard buffer
  78.             bmd.setclipboard(snip)
  79.  
  80.             CodeboxDialog("[Copied Codebox Snippet]", "Codebox Snippet copied to clipboard for use on We Suck Less")
  81.         else
  82.             CodeboxDialog("[Script Error]", "There was a problem copying the nodes.")
  83.         end
  84.     else
  85.         CodeboxDialog("[Script Error]", "Please select nodes in the Fusion Flow area.")
  86.     end
  87. end
  88.  
  89.  
  90. Main()
  91. print("[Done]")