Find tracks, exposed parameters, links and more of parameters
o = script.parentElement.layers[0].renderer.opacity
for sourceElement in o.sourceElements():
print (f"Source Element: {sourceElement.__oil_repr__()}")
#layer color
leftColor = script.parentElement.layers["UniformLeft"].generator.color
rightColor = script.parentElement.layers["UniformRight"].generator.color
#find the parameter that control the color of the UniformLeft
exposedParam = leftColor.sourceElements()[0].parent
#create a new target and assign it target to the UniformRight color
targetL = Oil.createObject("ParameterLinkTarget")
targetL.target.set(rightColor)
#add the target to the exposed parameter
exposedParam.append(targetL)
o = script.parentElement.layers[0].renderer.opacity
for sourcePointer in o.sourcePointers():
print (f"Source Pointer: {sourcePointer.__oil_repr__()} {sourcePointer.getFriendlyName()}")