From 42c2654d0e77dfe2df0cac04c848d2d3935db139 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 13 Mar 2011 06:44:40 +0000 Subject: Inconsistent use of array_index vs index with animation keyword args. Settle with 'index' even though the attribute is array_index. --- source/blender/makesrna/intern/rna_action.c | 2 +- source/blender/makesrna/intern/rna_animation.c | 3 ++- source/blender/makesrna/intern/rna_fcurve.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 9d7ea4c439b..43f5a0c3ab9 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -445,7 +445,7 @@ static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_flag(func, FUNC_USE_REPORTS); parm= RNA_def_string(func, "data_path", "", 0, "Data Path", "FCurve data path to use."); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_int(func, "array_index", 0, 0, INT_MAX, "Index", "Array index.", 0, INT_MAX); + RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index.", 0, INT_MAX); RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this fcurve into."); parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created fcurve"); diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index b690a4f419a..17d2e27c462 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -550,7 +550,8 @@ static void rna_def_keyingset_path(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Data Path", "Path to property setting"); RNA_def_struct_name_property(srna, prop); // XXX this is the best indicator for now... RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); - + + /* called 'index' when given as function arg */ prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE); RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific setting if applicable"); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); // XXX: maybe a bit too noisy diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index b14b6a396db..ea6398701f9 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -1419,7 +1419,8 @@ static void rna_def_fcurve(BlenderRNA *brna) RNA_def_property_string_funcs(prop, "rna_FCurve_RnaPath_get", "rna_FCurve_RnaPath_length", "rna_FCurve_RnaPath_set"); RNA_def_property_ui_text(prop, "Data Path", "RNA Path to property affected by F-Curve"); RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this to that animation gets evaluated - + + /* called 'index' when given as function arg */ prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE); RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property affected by F-Curve if applicable"); RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this so that animation gets evaluated -- cgit v1.2.3