<BFace> recognition

Can I check somehow that polygon (geom) uses ?
I know that I can set egg-emulate-bface 0 and then check culling attrib, but it bad solution as I understand. I just want to avoid creating excess geometry for the Bullet triangle mesh and convex hull.

I’m not really sure what you mean to ask here. There are two ways that can be implemented: by duplicating the triangles (but using a different winding order so that the triangles are flipped, effectively), or by assigning a CullFaceAttrib, such as what happens when you do setTwoSided(True).

When you set egg-emulate-bface to true, Panda duplicates the triangles, whereas when you set it to false, Panda uses setTwoSided. Nowadays, the default is true, since (presumably) graphics hardware is faster at sending more triangles than it is at making a state change.

I don’t think that there’s a way to find out at run time whether the flag had been set, short of loading the .egg file through the EggData interface and inspecting the EggPolygon flags yourself before loading it.
You could disable bface emulation and check if there is a cull attrib as you pointed out, or you’d have to make some fancy algorithm to loop through the triangles and see if they occur twice but with a different winding order. Neither seems like a particularly elegant solution to me.

I use suchlike loop to make a shape for Bullet body

    mesh = BulletTriangleMeshShape()
    geom_node = geom_np.node()
    for geom in geom_node.getGeoms():

If I use default egg-emulate-bface, then, as you said, Panda duplicates the triangles with , therefore I also get duplicated geometry in the Bullet shape, which is undesirable. I wanted to avoid this without changing defaults, but seems that I should left it as is, at least while I not found quite elegant solution.

Do the Bullet wrappers have a way to convert CollisionPolygons instead of visible geometry? The .egg loader is better at creating optimized collision geometry anyway.

Yes, it can, but in this case I have another problem: I trying to convert physics parameter from Blender to Panda, but Blender uses materials for store some physics parameters, and I should know which materials applied to the target geometry.

Hmm, I understand. I’m not entirely convinced that the object material is the best place to store these types of things on the Panda side, though. It doesn’t seem like something that is part of the render state. I’m not sure about this either way, though.

You right, but in Blender materials is more than the “render state”, so I should somehow collate this “materials” with the Panda’s objects. Perhaps using the render state is not an elegante way, but it allows me to avoid changing Panda internals.
In my opinion using physics parameters at the material side can be usable in some cases - for example if I make a road, then asphalt and grass should have different friction coefficients.