Do not call get_geometry() on the GeoOp, just call build_scene(). -jonathan
Sent from my iPhone On Jun 28, 2011, at 10:27 AM, "Pieter Van Houten" <pietervanhou...@gmx.de> wrote: > Thank you for your feedback Moritz. I get NULL pointers for all lights, even > if i do exactly what you wrote.... still :( > > That is exactly what i am doing in _validate: > > 1. get the GeoOp* from the op (cast) > 2. myGeoOp->validate() > 3. GeometryList geoList; > and geoOp->get_geometry(scene, geoList); > gives me perfectly aligned geometry > > ... processing of my geometry ... > > 4. then i do: > > geoOp->build_scene(scene); > scene.validate(); > if(scene.evaluate_lights()) > { > ... here i do what you suggested ... > std::vector<LightContext*> lights(scene.lights); > > ... my lights have the correct size (number of input lights to the GeoOp > SCENE node) > but all entries are NULL. > } > > So it looks like i am missing something :( :( :( but what? any help is > appreciated ..... > > >> On 06/28/2011 05:07 PM, PieterVanHouten wrote: >>> i really need help. i can get the scene and its content (in terms of >>> objects as suggested, my GeometryList is filled with useful data) but >>> when i look at myScene.lights, it has the correct number of lights in an >>> array, but they remain NULL no matter what i do. my camera pointer is >>> also NULL. but i have a camera connected. i do everything in validate(). >>> >>> i have in my test case a scene node as input to my Iop, this scene node >>> has a camera, a sphere and some lights. >> >> This is what I use: >> >> BOOST_FOREACH( const LightContext* l, scene.lights ) { >> LightOp* light( l->light() ); >> ... // grab data from light >> } >> >> My scene is built from the GeoOp input inside validate(). >> >> .mm >> _______________________________________________ >> 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 > > -- > NEU: FreePhone - kostenlos mobil telefonieren! > Jetzt informieren: http://www.gmx.net/de/go/freephone > _______________________________________________ > 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