Blender (jusqu'à 2.49)
Python 
Lampe et spot : 
trouver la direction dans laquelle le spot est orienté 
(Blender 2.3x-2.4x)
(version anglaise)
    Début   Index
précédentScript Python
En chantier Suivant

 
# -*- coding: latin1 -*-
import Blender 
# ----------------------------------
# On suppose que l'objet sélectionné est un spot. 
# ----------------------------------
SPOT=Blender.Object.GetSelected()[0]
# ----------------------------------
# On crée un Empty.
# ----------------------------------
EMPTY=Blender.Object.New('Empty')
SCENE=Blender.Scene.getCurrent()
SCENE.link(EMPTY)
# ----------------------------------
# On déplace ce spot vers l'emplacement visé 
# ----------------------------------
EMPTY.setLocation(0.0,0.0,-SPOT.getData().clipEnd)
# ----------------------------------
# Then we move it to the correct
# place 
# ----------------------------------
EMPTY.setMatrix(EMPTY.getMatrix()*SPOT.getMatrix())
 

 
précédentScript Python
 En Chantier Suivant
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