diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-01-27 08:04:23 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-01-27 08:04:23 +0300 |
commit | 83ea5824787145f69c7346da3df91bcc841b5981 (patch) | |
tree | 453acd133f7b63a51f64c64369c15e126d5ac984 /source/blender/blenkernel | |
parent | 6e6bd16bf194dc7c92e44c87b049966ecfdfa490 (diff) |
Graph Editor - Selection Tools
* Mouse-Select and DeSelect All work again
* Added access to constraint 'influence' value
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 13 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 15 |
2 files changed, 26 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 30e5daeeb3b..374a4bfaa60 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -183,8 +183,8 @@ short animsys_remap_path (AnimMapper *remap, char *path, char **dst) } -/* Write the given value to a setting using RNA */ -static void animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_index, float value) +/* Write the given value to a setting using RNA, and return success */ +static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_index, float value) { PropertyRNA *prop; PointerRNA new_ptr; @@ -222,6 +222,15 @@ static void animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_in break; } } + + /* successful */ + // XXX should the unhandled case also be successful? + return 1; + } + else { + /* failed to get path */ + printf("Animato: Invalid path '%s[%d]' \n", path, array_index); + return 0; } } diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 9fef1c657ca..eabc3943ccb 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -250,6 +250,21 @@ static char *pchan_adrcodes_to_paths (int adrcode, int *array_index) return NULL; } +/* Constraint types */ +static char *constraint_adrcodes_to_paths (int adrcode, int *array_index) +{ + /* set array index like this in-case nothing sets it correctly */ + *array_index= 0; + + /* result depends on adrcode */ + switch (adrcode) { + case CO_ENFORCE: + return "influence"; + case CO_HEADTAIL: // XXX this needs to be wrapped in RNA.. probably then this path will be invalid + return "data.head_tail"; + } +} + /* ShapeKey types * NOTE: as we don't have access to the keyblock where the data comes from (for now), * we'll just use numerical indicies for now... |