diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_animation_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_animation_api.c | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c index 6bc891259ad..f201b8e6e99 100644 --- a/source/blender/makesrna/intern/rna_animation_api.c +++ b/source/blender/makesrna/intern/rna_animation_api.c @@ -21,7 +21,6 @@ * \ingroup RNA */ - #include <stdlib.h> #include <stdio.h> @@ -32,46 +31,48 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" -#include "rna_internal.h" /* own include */ +#include "rna_internal.h" /* own include */ #ifdef RNA_RUNTIME -#include "BKE_context.h" -#include "BKE_report.h" +# include "BKE_context.h" +# include "BKE_report.h" -#include "ED_keyframing.h" +# include "ED_keyframing.h" static void rna_KeyingSet_context_refresh(KeyingSet *ks, bContext *C, ReportList *reports) { - /* TODO: enable access to providing a list of overrides (dsources)? */ - int success = ANIM_validate_keyingset(C, NULL, ks); - - if (success != 0) { - switch (success) { - case MODIFYKEY_INVALID_CONTEXT: - BKE_report(reports, RPT_ERROR, "Invalid context for keying set"); - break; - - case MODIFYKEY_MISSING_TYPEINFO: - BKE_report(reports, RPT_ERROR, "Incomplete built-in keying set, appears to be missing type info"); - break; - } - } + /* TODO: enable access to providing a list of overrides (dsources)? */ + int success = ANIM_validate_keyingset(C, NULL, ks); + + if (success != 0) { + switch (success) { + case MODIFYKEY_INVALID_CONTEXT: + BKE_report(reports, RPT_ERROR, "Invalid context for keying set"); + break; + + case MODIFYKEY_MISSING_TYPEINFO: + BKE_report( + reports, RPT_ERROR, "Incomplete built-in keying set, appears to be missing type info"); + break; + } + } } #else void RNA_api_keyingset(StructRNA *srna) { - FunctionRNA *func; - /*PropertyRNA *parm; */ - - /* validate relative Keying Set (used to ensure paths are ok for context) */ - func = RNA_def_function(srna, "refresh", "rna_KeyingSet_context_refresh"); - RNA_def_function_ui_description(func, - "Refresh Keying Set to ensure that it is valid for the current context " - "(call before each use of one)"); - RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); + FunctionRNA *func; + /*PropertyRNA *parm; */ + + /* validate relative Keying Set (used to ensure paths are ok for context) */ + func = RNA_def_function(srna, "refresh", "rna_KeyingSet_context_refresh"); + RNA_def_function_ui_description( + func, + "Refresh Keying Set to ensure that it is valid for the current context " + "(call before each use of one)"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); } #endif |