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-26 14:13:10 +0300
committerJoshua Leung <aligorith@gmail.com>2009-11-26 14:13:10 +0300
commit802cc77f71d6a1deb1e4773f135653f836e84e15 (patch)
tree9d00299273e07021be27f8de7c6240fb169db6b5 /source/blender/blenkernel/intern/fcurve.c
parentbaac1f2267631598613a6f189f45f4a5fea21b9e (diff)
Patch #20037: Use named components for Drivers instead of array_index
This patch, by Elia Sarti (vekoon), simply adds the possibility to specify the final array component of the RNA path in the path itself, e.g. using location[0] or location["x"] or even location.x, instead of specifying this using an "array_index" This should be easier for users to understand the driver system. The array-indices have been kept (but hidden from the UI under standard situations) since they are theoretically a tad faster than the in-path lookups still, and are easier for internal-tools to set for now...
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r--source/blender/blenkernel/intern/fcurve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index e90fccf6b29..0623a5cbe5e 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -822,7 +822,7 @@ float driver_get_target_value (ChannelDriver *driver, DriverTarget *dtar)
}
/* get property to read from, and get value as appropriate */
- if (RNA_path_resolve(&id_ptr, path, &ptr, &prop)) {
+ if (RNA_path_resolve_full(&id_ptr, path, &ptr, &prop, &index)) {
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
if (RNA_property_array_length(&ptr, prop))