Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(46)  |  Call(46)  |  Derive(0)  |  Import(0)

src/p/y/PyPRP-HEAD/PyPRP/prp_LogicClasses.py   PyPRP(Download)
 
        rotEuler = l2wMtx.rotationPart().toEuler()
        sizeVect = Blender.Mathutils.Vector(obj.size)
 
        # get the objects bounding box
        # index = [x,y,z] -> z/x/y = 1 indicates hightest value, 0 indicates lowest value
        for i in [0,1,3,2,4,5,7,6]:
            vworld = Blender.Mathutils.Vector(bbx[i][0],bbx[i][1],bbx[i][2],1)
            vlocal = Blender.Mathutils.Vector(vworld) * w2lMtx
 
 
        # first calculate the bottom region's centerpoint, and make it into a vector
        btmVect = Blender.Mathutils.Vector(ctrLX,ctrLY + (gripOffset/sizeVect.y) + (btmYOffset/sizeVect.y) + (deltaLY/2) + ((btmdepth/sizeVect.y)/2), mlocal[0].z,1) * l2wMtx
        # next calculate the top region's centerpoint, and make it into a vector
        topVect = Blender.Mathutils.Vector(ctrLX,ctrLY + (topYOffset/sizeVect.y) + (deltaLY/2) - ((topdepth/sizeVect.y)/2), mlocal[7].z,1) * l2wMtx

src/p/y/PyPRP-HEAD/PyPRP/prp_GeomClasses.py   PyPRP(Download)
    def getVector(self):
        return Blender.Mathutils.Vector(self.x,self.y,self.z,1)
 
 
class Vertex4:
    def export_face(self, verts, normal):
        self.fNorm.setVector(normal)
        self.fDist = -Blender.Mathutils.DotVecs(verts[0], normal)
        center = Blender.Mathutils.Vector()
        for v in verts:

src/m/a/mavsim-HEAD/blender/import_freecad.py   mavsim(Download)
 
	startmatrix = Mathutils.RotationMatrix(-start, 3, "Z")
	startpoint = startmatrix * Mathutils.Vector(radius, 0, 0)
	endmatrix = Mathutils.RotationMatrix(-end, 3, "Z")
	endpoint = endmatrix * Mathutils.Vector(radius, 0, 0)
 
		if center:
			centerVec = Mathutils.Vector(center)
			#points = [point + centerVec for point in points()]
			points = [point + centerVec for point in points]
		print 'deb:calcArcCurve: bulg, deltaY:\n',  bulg, deltaY  #---------
		print 'deb:calcArcCurve: step:\n',  step  #---------
		handler0 = Mathutils.Vector(0.0, -deltaY, 0.0)
 
		points = [startpoint]
		handler = startmatrix * handler0
		endhandler = endmatrix * handler0
		handlers1 = [startpoint + handler]
		handlers2 = [startpoint - handler]
		point = Mathutils.Vector(startpoint)

src/p/y/PyPRP-HEAD/PyPRP/prp_ObjClasses.py   PyPRP(Download)
            if (len(face.v) > 0):
                # reversed uru space
                Nor = tmatrix.rotationPart().invert().transpose() * Blender.Mathutils.Vector(face.no) * -1
                Nor.normalize()
                # transform verts into world space (transposed for uru's reversed space)
                Verts = []
                for v in face.v:
                    vertVec = tmatrix * Blender.Mathutils.Vector(v.co.x, v.co.y, v.co.z)

src/p/y/PyPRP-HEAD/PyPRP/prp_DrawClasses.py   PyPRP(Download)
                s=icicle.fVStartIdx + e  # originally used icicle.fCellOffset
                plvert = verts[s]
                mesh.verts.extend((Mathutils.Vector(plvert.X(),plvert.Y(),plvert.Z())))
 
                vertidx = len(mesh.verts)-1
                vert = mesh.verts[vertidx]
                normalVector = Mathutils.Vector(plvert.nx,plvert.ny,plvert.nz)
        if getTextPropertyOrDefault(obj, "renormal", FindInDict(objscript, "visual.renormal", None)) == "areaweighted":
            # compute vertex normals as the average of the face normals of all faces adjacent to the vertex, weighted by face area
            normals = [Mathutils.Vector((0, 0, 0)) for i in range(len(mesh.verts))]
            for f in mesh.faces:
                n = f.area*f.no

src/p/y/PyPRP-HEAD/PyPRP/prp_Stream.py   PyPRP(Download)
    def ReadVector(self):
        vx,vy,vz, = struct.unpack("<fff",self.fs.read(12))
        return Blender.Mathutils.Vector(vx,vy,vz)
 
 

src/b/l/Blender-Exporter-HEAD/org.xml3d.exporter.blender/src/2.49/xml3d_exporter.py   Blender-Exporter(Download)
    def veckey3d(self, v):
        if v == None:
            return None
        return Mathutils.Vector(round(v.x, 8), round(v.y, 8), round(v.z, 8))
 
    def veckey2d(self, v):
        if v == None:
            return None
        return Mathutils.Vector(round(v.x, 8), round(v.y, 8))

src/b/l/blender2cal3d-HEAD/blender2cal3d.py   blender2cal3d(Download)
def calculate_base_translation(scene):
	base_translation = Blender.Mathutils.Vector([0,0,0])
	armature_translation = Blender.Mathutils.Vector([0,0,0])
	root_bone_translation = Blender.Mathutils.Vector([0,0,0])
	for obj in scene.objects:
def get_armature_translation(scene):
	armature_translation = Blender.Mathutils.Vector([0,0,0])
	for obj in scene.objects:
		data = obj.getData()
		if type(data) is Blender.Types.ArmatureType:
				tmp_quat = Blender.Mathutils.Quaternion()
 
			tmp_loc = Blender.Mathutils.Vector([0.0,0.0,0.0])
			parent = Bone(skeleton, None, "service_root",
			              tmp_loc.copy(), tmp_quat.copy())

src/b/l/blender-smooth-slides-HEAD/odp_importer.py   blender-smooth-slides(Download)
		me.verts.extend(coord)
		me.faces.extend(faces)
		uv = ( Mathutils.Vector([1,0]) , Mathutils.Vector([1,1]) , Mathutils.Vector([0,1]) , Mathutils.Vector([0,0]) )
		for i in me.faces:
			i.uv = uv
		me.verts.extend(coord)
		me.faces.extend(faces)
		uv = ( Mathutils.Vector([1,0]) , Mathutils.Vector([1,1]) , Mathutils.Vector([0,1]) , Mathutils.Vector([0,0]) )
		for i in me.faces:
			i.uv = uv

src/b/l/blender-smooth-slides-HEAD/odp_blenderize.py   blender-smooth-slides(Download)
		me.verts.extend(coord)
		me.faces.extend(faces)
		uv = ( Mathutils.Vector([1,0]) , Mathutils.Vector([1,1]) , Mathutils.Vector([0,1]) , Mathutils.Vector([0,0]) )
		for i in me.faces:
			i.uv = uv
					me.verts.extend(coord)
					me.faces.extend(faces)
					uv = ( Mathutils.Vector([1,0]) , Mathutils.Vector([1,1]) , Mathutils.Vector([0,1]) , Mathutils.Vector([0,0]) )
					for i in me.faces:
						i.uv = uv