@@ -32,18 +32,18 @@ scene = pywavefront.Wavefront('something.obj')
32
32
33
33
A more complex example
34
34
35
- * ` strict ` will raise an exception if unsupported features are found in the obj or mtl file. Default ` True ` .
36
- * ` encoding ` of the obj and mtl file(s). Default ` utf-8 ` .
37
- * ` create_materials ` will create materials if mtl file is missing or obj file references non-exiting materials . Default ` False ` .
38
- * ` parse ` decides if parsing should start immediately. Default ` False ` .
35
+ * ` strict ` (Default: ` False ` ) will raise an exception if unsupported features are found in the obj or mtl file
36
+ * ` encoding ` (Default: ` utf-8 ` ) of the obj and mtl file(s)
37
+ * ` create_materials ` (Default: ` False ` ) will create materials if mtl file is missing or obj file references non-existing materials
38
+ * ` parse ` (Default: ` True ` ) decides if parsing should start immediately.
39
39
40
40
``` python
41
41
import pywavefront
42
42
scene = pywavefront.Wavefront(' something.obj' , strict = True , encoding = " iso-8859-1" , parse = False )
43
43
scene.parse() # Explicit call to parse() needed when parse=False
44
44
45
- # All vertex data if merged
46
- for name, material in data .materials.items():
45
+ # Iterate vertex data collected in each material
46
+ for name, material in scene .materials.items():
47
47
# Contains the vertex format (string) such as "T2F_N3F_V3F"
48
48
# T2F, C3F, N3F and V3F may appear in this string
49
49
material.vertex_format
@@ -82,7 +82,7 @@ The `example` directory contains some basic examples using the `visualization` m
82
82
83
83
* ` pyglet_demo.py ` : Simple textured globe
84
84
* ` pyglet_demo2.py ` : Higher resolution textured globe
85
- * ` pyglet_demo_boxes.py ` : Boxes demonstrating supported vertex formats
85
+ * ` pyglet_demo_boxes.py ` : Boxes demonstrating supported vertex formats of the visualization module
86
86
87
87
### Generating a Wavefront file with Blender
88
88
0 commit comments