A few additionnal functions for the Blender.Object module .
get/set functions for DupliFrames, DupliGroup, DupliRot, DupliNoSpeed.
Easy to do and perhaps usefull .
Example :
from Blender import Object
OBJECT=Object.Get('Cube')
print OBJECT.getDupliFrames()
OBJECT.setDupliFrames(1)
print OBJECT.getDupliGroup()
OBJECT.setDupliGroup(1)
print OBJECT.getDupliRot()
OBJECT.setDupliRot(1)
print OBJECT.getDupliNoSpeed()
OBJECT.setDupliNoSpeed(1)
More complicated :
Object_getDupliMatrices()
Be happy, it returns real matrices and one can play with in Mathutils functions .
Exemple :
import Blender
from Blender import Object, Scene
OBJET=Object.Get('Cube') #has dupliverts or dupliframes buts set
DUPLIOBJET=OBJET.getDupliMatrices()
if DUPLIOBJET!=[]:
SCENE=Scene.GetCurrent()
for O in DUPLIOBJET:
print DUPLIOBJET.index(O)
E=Object.New('Empty')
SCENE.link(E)
E.setMatrix(O)
Blender.Redraw()
The official patch (waiting to be commited, cambo ? anyone ? help !) :
https://projects.blender.org/tracker/download.php/9/127/3947/1858/duplitruematrices.patch
Mainwhile, try a cvs Blender version with this patch :
http://www.zoo-logique.org/3D.Blender/index.php3?zoo=com