diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-12-17 12:40:52 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-12-17 12:51:27 +0400 |
commit | 51f5c994e9f03ec2c488ac3a2af02b43c34d7ca6 (patch) | |
tree | 16d0e592b9f5b827bda5b8f238a943a5a5b12984 /source/blender/makesrna/intern/rna_fcurve.c | |
parent | e68144aed71497015384ab1a1504667a36fde330 (diff) |
Fix T37103: Keyframing custom properties issue (FCurve would not reflect Custom props type changes).
Add an helper func to re-compute integer-only fcurve flags, and call it when editing custom props.
Reviewed by aligorith, thanks!
Summary: Proposal fix for "keyframing custom properties issue" (T37103).
Reviewers: aligorith
Maniphest Tasks: T37103
Differential Revision: http://developer.blender.org/D111
Diffstat (limited to 'source/blender/makesrna/intern/rna_fcurve.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_fcurve.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 2036257e5d7..e2eff5c4b32 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -1858,6 +1858,14 @@ static void rna_def_fcurve(BlenderRNA *brna) "Min/Max values", -FLT_MAX, FLT_MAX); RNA_def_property_flag(parm, PROP_THICK_WRAP); RNA_def_function_output(func, parm); + + func = RNA_def_function(srna, "update_autoflags", "update_autoflags_fcurve"); /* calls the C/API direct */ + RNA_def_function_ui_description(func, "Update FCurve flags set automatically from affected property " + "(currently, integer/discrete flags set when the property is not a float)"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); + parm = RNA_def_pointer(func, "data", "AnyType", "Data", + "Data containing the property controlled by given FCurve"); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); } /* *********************** */ |