On Fri, May 15, 2015 at 2:14 AM, devMannemela <devm...@gmail.com> wrote:
> Thanks, Frank. > > I have been using it, but wanted a confirmation if aborted() is the way to > go. > > Could you please explain what imagePlane.makeUnique() does ? > and when exactly do we need to call it ? > > Hi Dev, makeUnique() will ensure that the image plane has its own data buffer, which is not shared by any other image plane. This means you can safely write into it without affecting any other planes. You should make sure the data buffer for the image plane has been allocated (e.g. by a call to fetchPlane) before calling makeUnique() on it. > > In my plugin() (which is a 2 input plugin), > I create 2 image planes to read my 2 input images > This function crashes if I don't make my output imgPlane writable. > You need to allocate the data buffer for the output plane (by calling makeWritable) before attempting to access it (using writableAt()). Hope that helps. Lucy > Any idea why ? > > thanks ! > Dev > > > Here is a stripped down version.. > > void myScalar::renderStripe(ImagePlane &imgPlane) > { > // create a new image plane to read input 0 > ... > input0().fetchPlane(input0_ImgPlane); > > // create another image > .... > input1().fetchPlane(input1_imgPlane); > > ... > // now I write the output > // imgPlane.makeWritable() .... plugin crashes if I don't make > it writable. > foreach (z, imgPlane.channels()) > { > for (... box iteration...) > { > imgPlane.writableAt(it.x, it.y, imgPlane.chanNo(z)) = 1.0; > } > } > } > > > > > On Thu, May 14, 2015 at 3:35 PM, Frank Harrison <fr...@thefoundry.co.uk> > wrote: > >> The aborted() state should be set. >> >> ImagePlane newPlane = ... ; >> input.fetchPlane(newPlane); >> >> if (aborted()) { >> // handle or return >> } >> >> >> hth >> >> On 14 May 2015 at 23:23, devMannemela <devm...@gmail.com> wrote: >> >>> Hi ! >>> >>> I am writing a multi-input PlanarIop node. >>> >>> When I try to read the input image into an ImagePlane, >>> Is there a way to check if fetchPlane() call has succeeded or not ? >>> >>> >>> thanks ! >>> Dev >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >>> >> >> >> -- >> Frank Harrison >> Senior Nuke Software Engineer >> The Foundry >> Tel: +44 (0)20 7968 6828 - Fax: +44 (0)20 7930 8906 >> Web: www.thefoundry.co.uk >> Email: frank.harri...@thefoundry.co.uk >> >> _______________________________________________ >> 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 >> >> > > _______________________________________________ > 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 > > -- Lucy Wilkes Senior Software Engineer The Foundry 5 Golden Square, London, W1F 9HT Tel: +44 (0)20 7479 4350 Web: www.thefoundry.co.uk Email: l...@thefoundry.co.uk The Foundry Visionmongers Ltd. Registered in England and Wales No: 4642027
_______________________________________________ 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