summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aa602f6)
Reported-by: Thomas Lachmann <tl@automatic-brain.de>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
# * Remove the real file opening in the abstract VectorWriter
# * View frustum clipping
# * Scene clipping done using bounding box instead of object center
# * Remove the real file opening in the abstract VectorWriter
# * View frustum clipping
# * Scene clipping done using bounding box instead of object center
+# * Fix camera type selection for blender>2.43 (Thanks to Thomas Lachmann)
#
# ---------------------------------------------------------------------
#
# ---------------------------------------------------------------------
fovy = atan(0.5/aspect/(camera.lens/32))
fovy = fovy * 360.0/pi
fovy = atan(0.5/aspect/(camera.lens/32))
fovy = fovy * 360.0/pi
+
+
+ if Blender.Get('version') < 243:
+ camPersp = 0
+ camOrtho = 1
+ else:
+ camPersp = 'persp'
+ camOrtho = 'ortho'
+
# What projection do we want?
# What projection do we want?
+ if camera.type == camPersp:
mP = self._calcPerspectiveMatrix(fovy, aspect, near, far)
mP = self._calcPerspectiveMatrix(fovy, aspect, near, far)
- elif camera.type == 1:
- mP = self._calcOrthoMatrix(fovy, aspect, near, far, scale)
+ elif camera.type == camOrtho:
+ mP = self._calcOrthoMatrix(fovy, aspect, near, far, scale)
# View transformation
cam = Matrix(cameraObj.getInverseMatrix())
cam.transpose()
# View transformation
cam = Matrix(cameraObj.getInverseMatrix())
cam.transpose()