~ubuntu-branches/ubuntu/natty/phatch/natty

« back to all changes in this revision

Viewing changes to data/blender/object.py

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski
  • Date: 2009-10-12 11:53:43 UTC
  • mfrom: (1.1.7 upstream) (4.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20091012115343-viftquwjkjx19mgz
Tags: 0.2.3-2
* phatch.desktop and menu files are now shipped by phatch package
  (LP: #449210)
  - add lintian overrides for above changes (phatch depends on phatch-cli so
    everything is ok)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import os
24
24
import sys
25
25
import tempfile
26
 
from Blender import Camera, Image, Material, Object, Texture
 
26
from Blender import Camera, Image, Mathutils, Material, Object, Texture
27
27
from PIL import Image as PILImage
28
28
from PIL import ImageOps
29
29
 
318
318
    vec1 = get_vec(edges[0])
319
319
    vec2 = get_vec(edges[1])
320
320
 
321
 
    return vec1.cross(vec2).normalize()
 
321
    return Mathutils.CrossVecs(vec1, vec2).normalize()
322
322
 
323
323
 
324
324
def vectors_on_same_side(v1, v2):
325
325
    # checks if the vec are on the same side of a ball. expects that v1
326
326
    # and v2 have been normalized already
327
 
    return math.acos(v1.dot(v2)) < math.pi
 
327
    return math.acos(Mathutils.DotVecs(v1, v2)) < math.pi
328
328
 
329
329
 
330
330
def get_length(edge, ob):