I’m trying to set up an automation curve to a parameter. Calling effect.addAutomator( works as expected.

However, when calling automator.addAutomationCurve(parameter), it returns an error of “Relationship ‘parameter’ expects a destination of entity type ‘ParameterPrototype'”. Passing in a parameter preset or the returned parameter variable of adding a preset parameter to the event does not work.

This is the full error message is:

Error: Relationship ‘parameter’ expects a destination of entity type ‘ParameterPrototype’., callstack:
(project = ProjectScriptable(name = “”), automator = (ManagedObject:Automator), parameter = (ManagedObject:ParameterProxy)) at :/Scripts/managed_objects.js:240
(parameter = (ManagedObject:ParameterProxy

Note on the error message: passing a preset and passing the parameter in the event gives two different messages about what entity is expected. One expects a ‘ParameterPrototype’ while the other expects a ‘ParameterProxy’.

I tried creating a ‘curveDefinition’ that follows along with what the error message is saying:

var curveDef = {name: “ParameterThatIsGoingToControlTheAutomator”, automator: automatorI’mAddingCurveTo, parameter: parameterInEvent,};
var curve = automator.addAutomationCurve(curveDef);

This way stops the error message but curve is not valid and the parameter argument is null.

I do not know what a ‘ParameterPrototype’ is; I only know what a ‘ParameterProxy’ is as that’s what entity type the parameter in the event is saying it is when calling .dump().

Lastly, doing curve.parameter = parameterInEvent does not change anything.

Any help is appreciated,

  • You must to post comments
Best Answer

Hi James,

You need to pass in the parameter’s preset, not the one in the event in order to attach an automation curve via scripting.

Assuming you already have an “automator” created and attached to a property, you can try the following line:

var curve = automator.addAutomationCurve(event.parameters[0].preset)

This isn’t very clear in the documentation so I’ll make a note to update these in the future.


  • James

    Thank you Richard for your help :)

  • Richard Simms

    No problem, James.

    Do you mind if I ask what you are using this scripting for? We may be able to improve our scripting API to help with this in future releases.


  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.