Blender (jusqu'à 2.49)
Python 
Lamp and  spot : 
find the orientation of the selected spot 
(french version)
    Début   Index
previoustScript Python
En chantier Suivant

 
import Blender 
# ----------------------------------
# we suppose that the only selected object is a spot 
# ----------------------------------
SPOT=Blender.Object.GetSelected()[0]

# ----------------------------------
# We create an empty at  the spotlight's target 
# before transformations 
# ----------------------------------
EMPTY=Blender.Object.New('Empty')
SCENE=Blender.Scene.getCurrent()
SCENE.link(EMPTY)

# ----------------------------------
# we move this empty at the place 
# originaly spotted . In this case, the clipend point :
# ----------------------------------
EMPTY.setLocation(0.0,0.0,-SPOT.getData().clipEnd)

# ----------------------------------
# Then we move it to the correct
# place 
# ----------------------------------
EMPTY.setMatrix(EMPTY.getMatrix()*SPOT.getMatrix())
 


 
previoustScript 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