Open GoogleCodeExporter opened 9 years ago
Suggesting to add "continue"
line such as below:
if values[0] in ("o", "g"):
objs.append(ObjGroup(values[1]))
continue
"""
pyggel.mesh
This library (PYGGEL) is licensed under the LGPL by Matthew Roe and PYGGEL
contributors.
The mesh module contains mesh classes for different kinds of meshes, as well as
loaders for various kinds of meshes.
"""
from include import *
import os
import image, view, data, misc, math3d
from scene import BaseSceneObject
import time
import random
import math
def OBJ(filename, pos=(0,0,0), rotation=(0,0,0), colorize=(1,1,1,1)):
"""Load a WaveFront OBJ mesh.
filename must be the filename of the mesh to load
pos/rotation/colorize are the starting attributes of the mesh object."""
view.require_init()
objs = []
mtls = {}
vertices = []
normals = []
texcoords = []
for line in open(filename, "r"):
if line.startswith('#'): continue
values = line.split()
if not values: continue
###print values
if values[0] in ("o", "g"):
objs.append(ObjGroup(values[1]))
continue
Original comment by rtr...@vt.edu
on 6 Aug 2015 at 10:49
Original issue reported on code.google.com by
a.bucky....@gmail.com
on 25 Sep 2014 at 4:28