Do not recalculate the normals for all object types, do this only for
Text and Curve objects which can have the normals inverted when they are
converted to mesh.
REMOVE that when blender fixes the issue.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
# Render from the currently active camera
self.cameraObj = self._SCENE.getCurrentCamera()
# Render from the currently active camera
self.cameraObj = self._SCENE.getCurrentCamera()
# Get the list of lighting sources
obj_lst = self._SCENE.getChildren()
# Get the list of lighting sources
obj_lst = self._SCENE.getChildren()
scene.link(obj)
scene.unlink(old_obj)
scene.link(obj)
scene.unlink(old_obj)
- # Mesh Cleanup
- me = obj.getData(mesh=1)
- for f in me.faces: f.sel = 1;
- for v in me.verts: v.sel = 1;
- me.remDoubles(0)
- me.triangleToQuad()
- me.recalcNormals()
- me.update()
+
+ # XXX Workaround for Text and Curve which have some normals
+ # inverted when they are converted to Mesh, REMOVE that when
+ # blender will fix that!!
+ if old_obj.getType() in ['Curve', 'Text']:
+ me = obj.getData(mesh=1)
+ for f in me.faces: f.sel = 1;
+ for v in me.verts: v.sel = 1;
+ me.remDoubles(0)
+ me.triangleToQuad()
+ me.recalcNormals()
+ me.update()
+
def _doSceneClipping(self, scene):
"""Clip objects against the View Frustum.
def _doSceneClipping(self, scene):
"""Clip objects against the View Frustum.