Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-12-12 08:46:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-12-12 08:46:07 +0300
commite94dae4c039438aa6d970996d68280c9f4933e52 (patch)
tree9aae5d0bf38285ad03ddcf5f542f9e8e927bdfbe /release/scripts/bpymodules
parent1ecf855276060a2d571732b1247b8de003a907df (diff)
VRML/X3D
* Improved compatibility with VRML files * Extract strings so they dont get modified for parsing, filename URL's with {} [] dont break importing anymore. * Cameras were rotated incorrectly * inline files were not opened with GZip * Animation Support - currently only loc/scale/rot (scale untested) * Lists of image URLs now use the first image from the list since there is no support for dynamic switching. * use imagemagick to convert GIF's so they load in linux. (WIP - could be extended, At least it should not break anything) BPyMathutils angle2ToLength function could be simplified (pointed out by brecht)
Diffstat (limited to 'release/scripts/bpymodules')
-rw-r--r--release/scripts/bpymodules/BPyMathutils.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/release/scripts/bpymodules/BPyMathutils.py b/release/scripts/bpymodules/BPyMathutils.py
index 27736b4169e..bfa1dcc3c61 100644
--- a/release/scripts/bpymodules/BPyMathutils.py
+++ b/release/scripts/bpymodules/BPyMathutils.py
@@ -225,15 +225,5 @@ from math import pi, sin, cos, sqrt
def angleToLength(angle):
# Alredy accounted for
- if angle < 0.000001:
- return 1.0
-
- angle = 2*pi*angle/360
- x,y = cos(angle), sin(angle)
- # print "YX", x,y
- # 0 d is hoz to the right.
- # 90d is vert upward.
- fac=1/x
- x=x*fac
- y=y*fac
- return sqrt((x*x)+(y*y))
+ if angle < 0.000001: return 1.0
+ else: return abs(1.0 / cos(pi*angle/180));