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

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

src/b/l/Blender-Exporter-HEAD/org.xml3d.exporter.blender/src/2.49/xml3d_exporter.py   Blender-Exporter(Download)
                    containerMesh = tempMesh
        if not containerMesh and createNew:
            containerMesh = Mesh.New(temp_mesh_name)
        del meshName
        del tempMesh

src/p/y/PyPRP-HEAD/PyPRP/prp_Functions.py   PyPRP(Download)
def alcCreateMesh(name,vertices,faces):
    obj = Blender.Mesh.New(name)
    obj.verts.extend(vertices)
    obj.faces.extend(faces)
    scene = Blender.Scene.GetCurrent()
def alcCreateBox(name,size,x=0,y=0,z=0,bReverse=False):
    obj = Blender.Mesh.New(name)
    coords = [ [x,y,z], [size+x,y,z], [x,size+y,z], [x,y,size+z], [size+x,size+y,size+z], [size+x,size+y,z], [size+x,y,size+z], [x,size+y,size+z] ]
    obj.verts.extend(coords)
    if bReverse:
def alcCreatePlane(name,size,x=0,y=0,z=0):
    obj = Blender.Mesh.New(name)
    coords = [ [x,y,z], [size+x,y,z], [x,size+y,z], [size+x,size+y,z] ]
    obj.verts.extend(coords)
    face = [0,1,3,2]

src/p/y/PyPRP-HEAD/PyPRP/prp_ObjClasses.py   PyPRP(Download)
            obj = Blender.Object.New('Mesh',str(self.Key.name))
            scene.objects.link(obj)
            mesh = Mesh.New(str(self.Key.name))
            obj.link(mesh)
            obj.layers=[1,]
            obj = Blender.Object.New('Mesh',str(self.Key.name))
            scene.objects.link(obj)
            mesh = Mesh.New(str(self.Key.name))
            obj.link(mesh)
            obj.layers=[2,]
    def export_obj(self,obj):
        mesh = obj.getData(False,True)
        # if the object has modifiers and no vertex groups (as in plDrawInterface.export_obj), apply the modifiers
        if len(obj.modifiers) > 0 and len(mesh.getVertGroupNames()) == 0:
            mesh = Mesh.New()
        # if the object has modifiers and no vertex groups (as in plDrawInterface.export_obj), apply the modifiers
        if len(obj.modifiers) > 0 and len(mesh.getVertGroupNames()) == 0:
            mesh = Mesh.New()
            mesh.getFromObject(obj)
        print "   Exporting %d (%d) vertices"%(len(mesh.verts),len(obj.data.verts))
    def export_obj(self,obj):
        mesh = obj.getData(False,True)
        # if the object has modifiers and no vertex groups (as in plDrawInterface.export_obj), apply the modifiers
        if len(obj.modifiers) > 0 and len(mesh.getVertGroupNames()) == 0:
            mesh = Mesh.New()

src/a/e/Aerospace-Simulations-HEAD/morse/src/morse/geolandloader/geoShapefileLoader.py   Aerospace-Simulations(Download)
        N = len(groundCoverage)
        logging.info('Building ', (i+1), 'with ', N, ' vertices')
        buildingMesh  = Blender.Mesh.New('buildingMesh');
        #--- Average the altitude of building first floor
        if (N > 0):

src/p/y/PyPRP-HEAD/PyPRP/prp_DrawClasses.py   PyPRP(Download)
        if len(obj.modifiers) > 0:
            if len(mesh.getVertGroupNames()) == 0:
                mesh = Mesh.New()
                # ignore the OB/ME switch and only use materials linked to the mesh, as with modifier-less objects
                savedcolbits = obj.colbits

src/m/a/mavsim-HEAD/blender/import_freecad.py   mavsim(Download)
def drawmesh(meshdata,sce):
    "draws meshes in blender"
    mes = Mesh.New()
    mes.verts.extend(meshdata['verts'])
    if meshdata['edges']: mes.edges.extend(meshdata['edges'])