Nuke - Linked expression not working

30 views
Skip to first unread message

Alexandre Bizeau (36Pix)

unread,
Oct 8, 2020, 2:34:59 PM10/8/20
to ofx-discussion

Hello all, its been a while since my last post, but back on plugin dev/beta.

One of my beta-tester tried the following in Nuke:

LinkedExpression.JPG

Where he created a NoOp Node and create a floating point slider. Then he link one of my parameter to that newly created slider, as an expression.

This is not working properly, I debugged it, but I could not found a fix. I dont know if the problem is my plugin or the host code of OFX.

When I modify the parameter in the NoOp slider, it change the value in my plugin UI, but its never calling the C++ changedParam() method, and its calling the render() action, but not parameter have change, so nothing change on the result.

Next, if I tried to modify the linked parameter in my plugin instead, then its call the changedParam(), but not the render() and note that the UI does let the parameter change, it just set back the value of the slider.

So, there is no solution. One block the parameter to be edited, and the other block the render....

Is there something I do wrong?

Sincerely,
Alex






LinkedExpression.JPG

Paul Miller

unread,
Oct 8, 2020, 2:40:44 PM10/8/20
to ofx-dis...@googlegroups.com

Did you provide a kOfxParamPropScriptName for your parameter?

--
You received this message because you are subscribed to the Google Groups "ofx-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ofx-discussio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ofx-discussion/9e8c9493-ec15-4531-86c8-01f02985960dn%40googlegroups.com.

Alexandre Bizeau (36Pix)

unread,
Oct 8, 2020, 2:49:11 PM10/8/20
to ofx-discussion
There is so much properties to set! I did not know about that one. Where I have to include it ? Plugin? Parameter?

Im using the C++ OpenFX support library in my plugin.

Paul Miller

unread,
Oct 8, 2020, 2:50:16 PM10/8/20
to ofx-dis...@googlegroups.com

You set it on the parameter. I don't use the support library, so I can't help you there.

Alexandre Bizeau (36Pix)

unread,
Oct 8, 2020, 2:53:05 PM10/8/20
to ofx-discussion
I figure out. Its on the parameter and the method is setScriptName(). 

I will try it.

Alexandre Bizeau (36Pix)

unread,
Oct 8, 2020, 3:07:43 PM10/8/20
to ofx-discussion
I add the properties to the parameter and does not work either. I put the same name as the param, and a new name, and neither of those are fired to the changedParam action.

Paul Miller

unread,
Oct 8, 2020, 3:10:22 PM10/8/20
to ofx-dis...@googlegroups.com

Does your parameter name or script name have spaces in it? I noticed your parameter label did, so want to make sure you aren't using spaces for internal names.

Alexandre Bizeau (36Pix)

unread,
Oct 8, 2020, 3:12:00 PM10/8/20
to ofx-discussion
None of my parameter have space in it, only their labels. This one is named color_content.

Paul Miller

unread,
Oct 8, 2020, 3:13:54 PM10/8/20
to ofx-dis...@googlegroups.com

Hmm - I'm sorry, I'm out of ideas!

Alexandre Bizeau (36Pix)

unread,
Oct 8, 2020, 3:15:46 PM10/8/20
to ofx-discussion
It seems that when I link the NoOp (script thing of Nuke) to my slider, the changedParam() is called once on linkage time. But when I modify the slider, it doesn't fire anymore.

But the Script name seems to be the right path, just dont understand... :(

Alexandre Bizeau (36Pix)

unread,
Oct 8, 2020, 4:21:07 PM10/8/20
to ofx-discussion
As debugging test, while Im in the render() action, I go read the value of the parameter, and it is well set to the value defined by the script.

It just that the kOfxActionInstanceChanged is not called any time... I might try to reach Nuke/The foundry on that, but looks weird to me, should be a simple functionnality.

Alexandre Bizeau (36Pix)

unread,
Oct 13, 2020, 9:15:40 AM10/13/20
to ofx-discussion
So right now, I implement the parameter read in the render action, and I received the following from the support:

-------------------------------------------------------------------------------------------

Hey Alexandre,

Thank you for contacting Foundry Support.

I have talked to our development team, and they say that it is expected that kOfxActionInstanceChanged is not fired when the value of a plugin parameter changes in some situations, like when using an Expression. 

Nuke cannot make paramInstanceChanged actions when Expressions are evaluated, due to computer reasons, as Expressions can be evaluated at any time for a host of different reasons. The only way to get the callback to fire is to change the slider on the manually or trigger a slider change through python. Expressions are only guaranteed to be evaluated for a certain contexts, like rendering, which is why they see the correct parameter value during render.  With animated parameters, it’s necessary to update the parameters every frame anyway. 

The develops suggest that the plugin needs to be changed to reflect this, to not rely on paramInstanceChanged actions like kOfxActionInstanceChanged for cache invalidation, as this can only be really relied upon to indicate that the user has edited the parameter directly, or that the 'uncooked' parameter has changed (ie that the Expression itself has changed rather than the value).

Please let me know if this information answers your question?

Kind Regards,

Peter  
------------------------------------------------------------------------------------------- 

So its seems that not feasible to do that within Nuke. I will have to change my way to access parameters values. I expected to have less call to those parameters using  kOfxActionInstanceChanged, but it seems that not the case.
Reply all
Reply to author
Forward
0 new messages