Hello Nuke,
I am trying to port a shake macro to Nuke and there's a difficult
incompatibility. The shake macro splits an effect up into individual
slices based on a min value, a max value, and an increment - so for
example, if the values of these non-animatable knobs were
{min=1,max=10,inc=1}, it would take the input node, create ten 'slices',
each consisting of a few nodes chained together, and then finally combine
all of these chains back together again at the end to produce the node's
output.
Is there a way I can do this in Nuke? There's examples in nukepedia from
Frank Reuter showing how to conditionally create a TransformGeo or a
Transform node, depending on the type of the input, but this only happens
on node creation. I could conceivably build a little "re-slice" routine
that is triggered from a button, and make it so that users have to
explicitly set the slice parameters, which would, when executed, clean and
re-build the underlying node tree.
The shake macro looks like this:
image shakeSliceThing(
image input0=0,
image input1=0,
float sliceMin = 1,
float sliceMax = 10,
float sliceInc = 1,
)
{
float cur_slice = sliceMin;
Result = DoSomething( input0, input1, cur_slice );
while (cur_slice<sliceMax)
{
cur_slice = cur_slice + sliceInc;
Result = DoSomething( Result, image1, cur_slice );
}
return Result;
}
Anyway - I'd love to hear if anybody has ideas about node-trees that depend
on input values, or other ways to think about such a construction.
Thanks,
Chris
--
I think this situation absolutely requires that a really futile and stupid
gesture be done on somebody's part. And we're just the guys to do it.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python