Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_fcurve.c
| Show First 20 Lines • Show All 1,025 Lines • ▼ Show 20 Lines | static void rna_FKeyframe_points_remove( | ||||
| if (!do_fast) { | if (!do_fast) { | ||||
| BKE_fcurve_handles_recalc(fcu); | BKE_fcurve_handles_recalc(fcu); | ||||
| } | } | ||||
| rna_tag_animation_update(bmain, id); | rna_tag_animation_update(bmain, id); | ||||
| } | } | ||||
| static void rna_FKeyframe_points_clear(ID *id, FCurve *fcu, Main *bmain) | |||||
| { | |||||
| BKE_fcurve_delete_keys_all(fcu); | |||||
| rna_tag_animation_update(bmain, id); | |||||
| } | |||||
| static FCM_EnvelopeData *rna_FModifierEnvelope_points_add( | static FCM_EnvelopeData *rna_FModifierEnvelope_points_add( | ||||
| ID *id, FModifier *fmod, Main *bmain, ReportList *reports, float frame) | ID *id, FModifier *fmod, Main *bmain, ReportList *reports, float frame) | ||||
| { | { | ||||
| FCM_EnvelopeData fed; | FCM_EnvelopeData fed; | ||||
| FMod_Envelope *env = (FMod_Envelope *)fmod->data; | FMod_Envelope *env = (FMod_Envelope *)fmod->data; | ||||
| int i; | int i; | ||||
| rna_tag_animation_update(bmain, id); | rna_tag_animation_update(bmain, id); | ||||
| ▲ Show 20 Lines • Show All 1,263 Lines • ▼ Show 20 Lines | static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_function_ui_description(func, "Remove keyframe from an F-Curve"); | RNA_def_function_ui_description(func, "Remove keyframe from an F-Curve"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN | FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "keyframe", "Keyframe", "", "Keyframe to remove"); | parm = RNA_def_pointer(func, "keyframe", "Keyframe", "", "Keyframe to remove"); | ||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| /* optional */ | /* optional */ | ||||
| RNA_def_boolean( | RNA_def_boolean( | ||||
| func, "fast", 0, "Fast", "Fast keyframe removal to avoid recalculating the curve each time"); | func, "fast", 0, "Fast", "Fast keyframe removal to avoid recalculating the curve each time"); | ||||
| func = RNA_def_function(srna, "clear", "rna_FKeyframe_points_clear"); | |||||
| RNA_def_function_ui_description(func, "Remove all keyframes from an F-Curve"); | |||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN); | |||||
| } | } | ||||
| static void rna_def_fcurve(BlenderRNA *brna) | static void rna_def_fcurve(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| ▲ Show 20 Lines • Show All 242 Lines • Show Last 20 Lines | |||||