Hey. Here is the patch allowing a reference to it's skeleton being serialized in a RigGeometry. Unfortunately this became more than a one line patch because RigGeometry previously used a weak reference on a Skeleton - this breaks down if the used Skeleton is inserted in the tree later through a reference (the serializer holding the reference gives it up after passing it to Skeleton...).
So I modified RigGeometry to switch between a weak or a strong reference depending on whether or not the skeleton is in some of it's parental path or not. Of course it's possible to construct a leak by first attaching the Skeleton and then inserting it into the parental chain - but a) this procedure sounds very obscure and I can't think of a reason why someone might do that, b) I documented the behaviour at setSkeleton and c) there are other ways to build circular references in OSG, most of them not being documented. :-) On a nice side this now allows the skeleton to be contained completely in a RigGeometry - as long as there is no geometry attached to it's bones there is no need for it to appear anywhere in the scene. Did a few quick tests with both parental and contained skeletons, everything still seems to work fine. Cheers, Felix
osg-patch4.diff
Description: Binary data
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
