Ok, I added a third collision filtering algorithm: a Python callback function. This is probably the most flexible one, but also slower than the others.
In oder to have this collision filteirng algorithm installed you have to set the config variable
bullet-filter-algorithm python-callback
Setting the callback function is simple:
self.world.setPythonFilterCallback(self.filter)
The callback itself is called with two PandaNodes, and should return a bool value (True if the objects should collide, False otherwise):
def filter(self, node1, node2):
...
return True
I updated the Bullet samples archive - a new sample for this collision filter algorithm is added.