mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-02 16:28:51 +02:00
[ui] Viewer3D: add support for vertex-colored meshes
Use PerVertexColorMaterial if any vertex color data is available on a mesh without textures.
This commit is contained in:
parent
d30b2364eb
commit
cee8d1b612
2 changed files with 17 additions and 1 deletions
|
@ -45,6 +45,13 @@ class Scene3DHelper(QObject):
|
|||
count += sum([attr.count() for attr in geo.attributes() if attr.name() == "vertexPosition"])
|
||||
return count / 3
|
||||
|
||||
@Slot(Qt3DCore.QEntity, result=int)
|
||||
def vertexColorCount(self, entity):
|
||||
count = 0
|
||||
for geo in entity.findChildren(Qt3DRender.QGeometry):
|
||||
count += sum([attr.count() for attr in geo.attributes() if attr.name() == "vertexColor"])
|
||||
return count
|
||||
|
||||
|
||||
class TrackballController(QObject):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue