Thanks Jonathan. I'll have another look at that with those tips in mind. How about deleting a single object? I mean, everything from it (primitives, vertices, points, attribs). Is there a more straightforward approach for that?
Thanks, Ivan On Mon, Jan 9, 2012 at 10:37 AM, Jonathan Egstad <jegs...@earthlink.net>wrote: > Deleting just the primitives is not for the faint of heart - I think that > was covered in the nuke-dev email thread from last year "Removing faces > from GEO". Basically it's not a well tested part of the API. > > When you delete the primitives in the vector (GeoInfo::cache.primitives) > and clear it you also need to clear the overall vertex count > (GeoInfo::cache.vertices) and any attributes that are bound to either > Group_Primitive or Group_Vertices as they are also now out of date > (GeoInfo::clear_attributes()). > > Plus, any GeometryList references to the GeoInfo cache pointers are now > out of date so you can try GeometryList::synchronize_objects() and see if > that cleans it up the references. > > Good luck, > > -jonathan > > On Jan 7, 2012, at 10:50 AM, Ivan Busquets wrote: > > Hi again, > > Ok, so I managed to do the primitive-deletion thing by hacking the GeoInfo > header, and making clear_primitives() public instead of private. > > I'd be interested to know what's in the clear_primitives() method, so I > can try and roll my own instead of hacking the GeoInfo header. > > Any ideas? > > Thanks, > Ivan > > On Sat, Jan 7, 2012 at 1:26 AM, Ivan Busquets <ivanbusqu...@gmail.com>wrote: > >> Hi, >> >> Is there a way to delete all primitives from a GeoInfo (in a >> SourceGeo-derived op) ? >> >> So far I've tried to get the Cache for the GeoInfo and clear the >> primitives, but any attempt at reading/writing >> "geoinfo.get_cache_pointer()->primitives" is crashing on me. >> >> Alternatively, I could do with deleting a single object from a >> GeometryList, but I only see a GeometryList::delete_objects() method? >> Is there a way to delete a single one? >> >> >> Thanks, >> Ivan >> >> > _______________________________________________ > 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 > >
_______________________________________________ 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