Update READMEs
parent
efbabf3b0d
commit
b84dbb68ec
|
@ -42,17 +42,14 @@ substituted by assertions ...):
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
||||||
from pyassimp import *
|
from pyassimp import load
|
||||||
scene = load('hello.3ds')
|
with load('hello.3ds') as scene:
|
||||||
|
|
||||||
assert len(scene.meshes)
|
assert len(scene.meshes)
|
||||||
mesh = scene.meshes[0]
|
mesh = scene.meshes[0]
|
||||||
|
|
||||||
assert len(mesh.vertices)
|
assert len(mesh.vertices)
|
||||||
print(mesh.vertices[0])
|
print(mesh.vertices[0])
|
||||||
|
|
||||||
# don't forget this one, or you will leak!
|
|
||||||
release(scene)
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -61,14 +58,12 @@ scene:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
||||||
from pyassimp import *
|
from pyassimp import load
|
||||||
scene = load('hello.3ds')
|
with load('hello.3ds') as scene:
|
||||||
|
|
||||||
for c in scene.rootnode.children:
|
for c in scene.rootnode.children:
|
||||||
print(str(c))
|
print(str(c))
|
||||||
|
|
||||||
release(scene)
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
INSTALL
|
INSTALL
|
||||||
|
|
|
@ -49,8 +49,8 @@ substituted by assertions ...):
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
|
|
||||||
from pyassimp import *
|
from pyassimp import load
|
||||||
scene = load('hello.3ds')
|
with load('hello.3ds') as scene:
|
||||||
|
|
||||||
assert len(scene.meshes)
|
assert len(scene.meshes)
|
||||||
mesh = scene.meshes[0]
|
mesh = scene.meshes[0]
|
||||||
|
@ -58,21 +58,18 @@ substituted by assertions ...):
|
||||||
assert len(mesh.vertices)
|
assert len(mesh.vertices)
|
||||||
print(mesh.vertices[0])
|
print(mesh.vertices[0])
|
||||||
|
|
||||||
# don't forget this one, or you will leak!
|
|
||||||
release(scene)
|
|
||||||
|
|
||||||
Another example to list the 'top nodes' in a scene:
|
Another example to list the 'top nodes' in a scene:
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
|
|
||||||
from pyassimp import *
|
from pyassimp import load
|
||||||
scene = load('hello.3ds')
|
with load('hello.3ds') as scene:
|
||||||
|
|
||||||
for c in scene.rootnode.children:
|
for c in scene.rootnode.children:
|
||||||
print(str(c))
|
print(str(c))
|
||||||
|
|
||||||
release(scene)
|
|
||||||
|
|
||||||
INSTALL
|
INSTALL
|
||||||
-------
|
-------
|
||||||
|
|
Loading…
Reference in New Issue