OK, I discovered that Iop treats input #0 differently than other
inputs - it expects a 2D image processing Op and never calls
test_input() with n==0.

My op originally had just the one camera input but I added a second
input just to see what would happen, and now it does call my
test_input() function and accept the camera connection for that second
input.

Is there any way to hide the dangling input #0? My op does not need
any 2D inputs.

Dan


* Ivan Busquets (ivanbusqu...@gmail.com) wrote:
> Hi Daniel,
> 
> I think the Iop version of test_input is just() reimplemented from the
> Op::test_input(), which IS virtual. So I don't think there should be a
> problem in overriding it.
> 
> I've done it like this on a few Iop's and it seems to work fine.
> 
>   bool test_input(int n, Op *op)  const {
>          if (n == 1) {  // assuming your camera input is input 1
>          return dynamic_cast<CameraOp*>(op) != 0;
>          }
>          return Iop::test_input(n, op);
>   }
_______________________________________________
Nuke-dev mailing list
Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to