On 09/05/13 17:05, villain749 wrote:
Hi,
I have recently been attempting to create a plugin similar to the
DisplaceGeo node. It would need to manipulate 3d geometry based on the
pixels of the in input image. When working with 2D IOPs getting the
pixels is pretty strait forward, just request the channels and bbox you
want, then loop over the rows and read the pixels. I don't know how to
do this with a GeoOP. I looked through all the examples and docs but I
didn't see anything. Obviously it can be done as the DisplaceGeo and
Postion2Points nodes make heavy use of it.

I was just wondering if anybody could point me in the right direction?
Are there any docs I missed that cover this? Is there any example code
out there that could help me? Any pointers?

GeoOp inherits off Op, so you can dynamic_cast<> (or reinterpret_cast<> if you're feeling lucky and have a decent test_input() set up) any input you want to GeoOp or Iop, and then use it from there.

On the inputs that you want to be Iop*, you'll need to call validate() and request() before you can use it, before validation is probably the best place.

Peter
--
Peter Pearson, Software Engineer
The Foundry, 6th Floor, The Communications Building,
48 Leicester Square, London, UK, WC2H 7LT
Tel: +44 (0)20 7434 0449   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

Reply via email to