Hi!

My guess is that you need to call the base class constructor like this:

class WithInitNodeVisitor(osg.NodeVisitor):
    def __init__(self):
        osg.NodeVisitor.__init__(self)   #<-- !!

Cheers,
Martin


Sébastien Barthélemy schrieb:
Hello,

I'm trying to use node visitors from python 2.6 with osg 2.6 and
osgswig. However
for some reason I cannot use a subclass of osg.NodeVisitor. I crafted a simple
illustrative example that fails with this message:

/home/seb/Devel/arboris-python/tst_nv.pyc in test()

/home/seb/.local/lib/python2.6/site-packages/OpenSceneGraph/osg.pyc in
accept(*args)
 14578     def accept(*args):
 14579         """accept(self, NodeVisitor nv)"""
14580         return _osg.Group_accept(*args)
 14581
 14582     def asGroup(*args):

TypeError: in method 'Group_accept', argument 2 of type 'osg::NodeVisitor &'

Any hint why this is happening ?

Thanks !

PS: I also filed the issue as
http://code.google.com/p/osgswig/issues/detail?id=36

--
Cheers,
SB


------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to