>>> sor.apply(rootScene)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pivy/coin.py", line 13292, in apply
return _coin.SoReorganizeAction_apply(self, *args)
NotImplementedError: Wrong number or type of arguments for overloaded function 'SoReorganizeAction_apply'.
Possible C/C++ prototypes are:
SoReorganizeAction::apply(SoNode *)
SoReorganizeAction::apply(SoPath *)
SoReorganizeAction::apply(SoPathList const &,SbBool)
SoReorganizeAction::apply(SoPathList const &)
How can I pass scenegraph to SoReorganizeAction?
SoSeparator inherits SoNode, but then the prototype shouldn't be SoReorganizeAction::apply(SoNode * root) as shown here?
Last edited by kwahoo on Fri Oct 04, 2019 4:48 pm, edited 3 times in total.
NotImplementedError: Wrong number or type of arguments for overloaded function 'SoReorganizeAction_apply'.
Possible C/C++ prototypes are:
SoReorganizeAction::apply(SoNode *)
SoReorganizeAction::apply(SoPath *)
SoReorganizeAction::apply(SoPathList const &,SbBool)
SoReorganizeAction::apply(SoPathList const &)
I guess this is a pivy bug. There are a few classes of Coin3d which are not properly wrapped with swig. Maybe you can ask looo since he maintains the pivy sources and has fixed several bugs already.
wmayer wrote: ↑Fri Oct 04, 2019 8:29 am
I guess this is a pivy bug. There are a few classes of Coin3d which are not properly wrapped with swig. Maybe you can ask looo since he maintains the pivy sources and has fixed several bugs already.
Not sure if it is really a bug or if this is the normal way how swig works. I guess we need to extend the SoReorganizeAction::apply function to also support other classes which inherits from SoNode.
Not sure if it is really a bug or if this is the normal way how swig works. I guess we need to extend the SoReorganizeAction::apply function to also support other classes which inherits from SoNode.
If you create e.g. an SoSearchAction then it also works with pivy to traverse the passed node using the apply() function. Only with SoReorganizeAction it doesn't seem to work.
Not sure if it is really a bug or if this is the normal way how swig works. I guess we need to extend the SoReorganizeAction::apply function to also support other classes which inherits from SoNode.
If you create e.g. an SoSearchAction then it also works with pivy to traverse the passed node using the apply() function. Only with SoReorganizeAction it doesn't seem to work.
I will have a look. The python code for both of the functions looks the same:
Btw.: There seems to be a problem with the code snippet. I guess one must call the apply function on the object and not on the class of SoReorganizeAction. So this works for me: