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