Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-11-06 14:09:04 +0300
committerJoshua Leung <aligorith@gmail.com>2009-11-06 14:09:04 +0300
commit5a12b7d159371709580cf8fb07fd10d3c3bfdff3 (patch)
tree8117e163207324afce4a6856f67ee61bb1c2eb47 /source/blender/makesrna/intern/rna_internal.h
parentd4fe2595f7c350c90feba61ba8d520850648b06f (diff)
Driver Scripting:
Added RNA functions for adding and removing Driver Targets. Unfortunately, I couldn't do this by simply adding callbacks for the add/remove of the collection, as I've had to add to extra RNA functions to do that. Example usage - driving Lamp Distance with Cube LocZ: myOb= bpy.data.objects["Lamp"] myOb.driver_add("data.distance") # drivers is list of F-Curves that have driver data drivers= myOb.animation_data.drivers distDriver= drivers[0].driver dtar= distDriver.add_target("ctrl1") dtar.id_type= 'OBJECT' dtar.id= bpy.data.objects["Cube"] dtar.rna_path= "location" dtar.array_index= 2
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 0e557b59b22..d90b4f17c85 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -204,6 +204,7 @@ char *rna_TextureSlot_path(struct PointerRNA *ptr);
/* API functions */
void RNA_api_action(StructRNA *srna);
+void RNA_api_drivers(StructRNA *srna);
void RNA_api_image(struct StructRNA *srna);
void RNA_api_keyconfig(struct StructRNA *srna);
void RNA_api_keyingset(struct StructRNA *srna);