X-Git-Url: https://git.ao2.it/vrm.git/blobdiff_plain/107a4b3320d72d749c33bfe1a2bb9250cef78914..bfe651e97954b264507caf17365aa37c8562ded8:/vrm.py diff --git a/vrm.py b/vrm.py index c7d7a87..0d35415 100755 --- a/vrm.py +++ b/vrm.py @@ -257,6 +257,7 @@ class Projector: return p + ## # Private methods # @@ -764,7 +765,7 @@ class Renderer: self._doConvertGeometricObjToMesh(workScene) - self._doSceneClipping(workScene) + #self._doSceneClipping(workScene) if config.output['JOIN_OBJECTS']: self._joinMeshObjectsInScene(workScene) @@ -775,6 +776,7 @@ class Renderer: Objects = workScene.getChildren() for obj in Objects: + if obj.getType() != 'Mesh': print "Only Mesh supported! - Skipping type:", obj.getType() @@ -786,10 +788,10 @@ class Renderer: self._doModelToWorldCoordinates(mesh, obj.matrix) - self._doObjectDepthSorting(mesh) - self._doBackFaceCulling(mesh) + self._doObjectDepthSorting(mesh) + self._doColorAndLighting(mesh) self._doEdgesStyle(mesh, edgeStyles[config.edges['STYLE']]) @@ -1051,12 +1053,20 @@ class Renderer: nmesh.faces.sort(by_max_vert_dist) nmesh.faces.reverse() + # Get visible faces + #vf = nmesh.faces + #while len(vf)>1: + # p1 = vf[0] + # insideList = + + mesh.faces.delete(1, range(0, len(mesh.faces))) for i,f in enumerate(nmesh.faces): fv = [v.index for v in f.v] mesh.faces.extend(fv) mesh.faces[i].mat = f.mat + mesh.faces[i].sel = f.sel def _doBackFaceCulling(self, mesh):