Adding support for adding copies of existing drivers to other animdata
authorJoshua Leung <aligorith@gmail.com>
Tue, 26 Apr 2011 13:49:40 +0000 (13:49 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 26 Apr 2011 13:49:40 +0000 (13:49 +0000)
commit64a37fadf09e32772520272a831034a9fe790fc8
tree6cadbf712bc9186b731cfeeda256d2228820da5f
parent481aed1d0e7f943b9b7caa12a890c0cc4286ac00
Adding support for adding copies of existing drivers to other animdata
blocks via PyAPI/RNA

For example:
ob = bpy.context.active_object # assumes default cube has some drivers
added already before running script
dst = bpy.data.objects["Camera"]

adt = dst.animation_data_create()
for driver in ob.animation_data.drivers:
    new_driver = adt.drivers.from_existing(driver)
source/blender/blenkernel/intern/anim_sys.c
source/blender/makesrna/intern/rna_animation.c