Thanks for the sample code. I think I'm just about there, but I can't seem
to get the ValueProvider hooked up.
There's no function called "SetValueProvider" that I can find anywhere in
any of the header files, and attempting to build anyway results in a
(predictable) "not declared in this scope" error. Is it possible this is one
that should be exposed but in fact isn't yet? Or is there another way to
hook the knob up to the provider?
Thanks,
-Nathan
-----Original Message-----
From: Abigail Brady
Sent: Tuesday, June 14, 2011 3:13 AM
To: Nuke plug-in development discussion
Subject: Re: [Nuke-dev] Using knob as a feedback device
It would look something like (note, I didn't test this):
class Example : public Iop, public ArrayKnobI::ValueProvider
{
...
void knobs(Knob_Callbacks f) {
Float_knob(f, &_a0, "a0");
Float_knob(f, &_a1, "a1");
Int_knob(f, &_which, "which");
SetValueProvider(f, this);
}
bool provideValuesEnabled(const ArrayKnobI*,
const OutputContext& oc) const
{
return true;
}
std::vector<double> provideValues(const ArrayKnobI*,
const OutputContext& oc)
{
float a0 = knob("a0")->get_value_at_view(oc.frame(), oc.view());
float a1 = knob("a1")->get_value_at_view(oc.frame(), oc.view());
std::vector<double> values;
values.push_back(a1 > a0);
return values;
}
};
On Mon, 2011-06-13 at 10:06 -0700, Nathan Rusch wrote:
Good to know for certain on that one.
I'm just taking a look at ArrayKnobI.h, and am honestly pretty lost on how
to get started with the ValueProvider. Do you have a quick block of sample
code that would show me how or where to go about implementing it? I was
hoping for something in the NDK examples, but no luck... Sorry, I'm still
not on top of all the NDK nooks and crannies.
--
Abigail Brady, Senior Architect
The Foundry, 6th Floor, 48 Leicester Square, London. WC2H 7LT
Tel: +44 20 7968 6828 * Fax: +44 20 7930 8906
Web: www.thefoundry.co.uk
The Foundry Visionmongers Ltd
Registered in England and Wales No: 4642027
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev