On May 25, 2012, at 7:30 AM, Julik Tarkhanov wrote: > Aha, thanks Jonathan - that clarifies it a bit. However, what I see in > UVProject is writing to the "uv" attribute. I need to modify the point > coordinates, and the "pw" attribute that is mentioned in the doco > is not there on my Card. How should I proceed? (since apparently the GeoInfo > is readonly). > When I iterate over each GeoInfo in the output GeometryList I am only getting > read-only Vector3s. writable_points() of course clears out the whole output.
You remember the pointer to the source PointList *before* you call writable_points() as writable_points() will create a new output pointlist buffer and update the pointer in the output GeometryList. The source points are still owned by a buffer further up the GeoOp tree. Iterate over the source points, multiply each by the GeoInfo matrix to get PW and write the result to the output pointlist - bob's your uncle. -jonathan > > Would help tremendously if I could see how ModifyGeo does it's > geometry_engine :-( > > On 24 mei 2012, at 21:35, Jonathan Egstad wrote: > >> The points are stored in the GeoInfo without the GeoInfo's matrix applied to >> them. >> DD::Image::GeoOp has the convenience function 'evaluate_transform()' that >> will transform the point list and the ModifyGeo class uses this >> automatically to make it easier to write simple point modifiers. >> >> Point lists on input GeoInfo's should not automatically be transformed >> unless you're subclassing off ModifyGeo, subclass off GeoOp instead and the >> GeoInfo's should be 'raw'. >> > > > -- > Julik Tarkhanov | HecticElectric | Keizersgracht 736 1017 EX > Amsterdam | The Netherlands | tel. +31 20 330 8250 > cel. +31 61 145 06 36 | http://hecticelectric.nl > > > > > > _______________________________________________ > Nuke-dev mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
_______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
