Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local camera3D=comp:FindToolByID("Camera3D") or error("No Camera3D found")
- local outCam=camera3D.Output
- local locator = comp:FindToolByID("Locator3D") or error("No Locator3D found")
- local tools = comp:GetToolList(true)
- if #tools ~= 2 then error("Error : 2 nodes must be selected") end
- local mm, node
- for t,tool in ipairs(tools) do
- if tool.ID =="MultiMerge" then mm=tool else node= tool end
- end
- if not mm then
- error("A multimerge must be selected")
- end
- local out = node:GetOutputList()[1] or error("Tool without an output")
- local name = locator.Name
- local max = 100
- local i=1
- local locators={}
- while locator and i<= max do -- liste des locator3D
- table.insert(locators,locator)
- locator.SceneInput:ConnectTo(outCam)
- locator=comp:FindToolByID("Locator3D",locator)
- i=i+1
- end
- for l = 1,#locators do
- local layer="Layer"..l
- local foreground = mm[layer].Foreground
- foreground:ConnectTo(out)
- mm[layer].Center:ConnectTo(locators[l].Position)
- end
Advertisement
Add Comment
Please, Sign In to add comment