Blender (jusqu'à 2.49)
Python : 
Modéliser un cube
(voir aussi : 
Multipier les cubes 1 et 2
formes élémentaires)
 
    Début   Index
précédentScript Python
Python : multipier les cubes Suivant


import Blender
from Blender import NMesh

vertices_list=[ 
    [0.0,0.0,0.0],
        [0.0,1.0,0.0],
    [1.0,1.0,0.0],
    [1.0,0.0,0.0],
    [0.0,0.0,1.0],
    [0.0,1.0,1.0],
    [1.0,1.0,1.0],
    [1.0,0.0,1.0]
]

faces_list=[[0,1,2,3],
    [7,6,5,4],
    [3,7,4,0],
    [5,6,2,1],
    [4,5,1,0],
    [2,6,7,3]]

A_CUBE_MESH=NMesh.GetRaw()

for coordinate in vertices_list:
    A_VERTEX=NMesh.Vert(coordinate[0], coordinate[1], coordinate[2])
    A_CUBE_MESH.verts.append(A_VERTEX)

for thisface in faces_list:
    A_FACE=NMesh.Face()
    for vertexpos in thisface:
        A_FACE.append(A_CUBE_MESH.verts[vertexpos])
    A_CUBE_MESH.faces.append(A_FACE)

NMesh.PutRaw(A_CUBE_MESH,'Cube')
Blender.Redraw()


 
précédentScript Python
Script multipier les cubesSuivant
Vers le  Haut de page

Les questions concernant cette page  peuvent être posées sur  :
 news://news.zoo-logique.org/3D.Blender


 

 

Livre en français
Blender : apprenez, pratiquez, Créez, livre, Ed. Campus Press, coll. Starter Kit
Blender Starter Kit

Forum
FAQ
Lexique
Didacticiels
Compilations
Blender2KT
Débuter
Modelage
Blender python
Materiaux
Lumière
Animation
API python (eng)
Archives nzn
Statistiques
Doc flash Sculptris
Galerie Sculptris

mon site de démos sur youtube