Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_fcurve.c
| Show First 20 Lines • Show All 606 Lines • ▼ Show 20 Lines | static void rna_tag_animation_update(Main *bmain, ID *id) | ||||
| DEG_id_tag_update_ex(bmain, id, tags); | DEG_id_tag_update_ex(bmain, id, tags); | ||||
| } | } | ||||
| /* allow scripts to update curve after editing manually */ | /* allow scripts to update curve after editing manually */ | ||||
| static void rna_FCurve_update_data_ex(ID *id, FCurve *fcu, Main *bmain) | static void rna_FCurve_update_data_ex(ID *id, FCurve *fcu, Main *bmain) | ||||
| { | { | ||||
| sort_time_fcurve(fcu); | sort_time_fcurve(fcu); | ||||
| calchandles_fcurve(fcu); | BKE_fcurve_handles_recalc(fcu); | ||||
| rna_tag_animation_update(bmain, id); | rna_tag_animation_update(bmain, id); | ||||
| } | } | ||||
| /* RNA update callback for F-Curves after curve shape changes */ | /* RNA update callback for F-Curves after curve shape changes */ | ||||
| static void rna_FCurve_update_data(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_FCurve_update_data(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| BLI_assert(ptr->type == &RNA_FCurve); | BLI_assert(ptr->type == &RNA_FCurve); | ||||
| ▲ Show 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void rna_FModifier_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_FModifier_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| ID *id = ptr->owner_id; | ID *id = ptr->owner_id; | ||||
| FModifier *fcm = (FModifier *)ptr->data; | FModifier *fcm = (FModifier *)ptr->data; | ||||
| if (fcm->curve && fcm->type == FMODIFIER_TYPE_CYCLES) { | if (fcm->curve && fcm->type == FMODIFIER_TYPE_CYCLES) { | ||||
| calchandles_fcurve(fcm->curve); | BKE_fcurve_handles_recalc(fcm->curve); | ||||
| } | } | ||||
| rna_tag_animation_update(bmain, id); | rna_tag_animation_update(bmain, id); | ||||
| } | } | ||||
| static void rna_FModifier_verify_data_update(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_FModifier_verify_data_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| FModifier *fcm = (FModifier *)ptr->data; | FModifier *fcm = (FModifier *)ptr->data; | ||||
| ▲ Show 20 Lines • Show All 252 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| BezTriple *bezt = bezt_ptr->data; | BezTriple *bezt = bezt_ptr->data; | ||||
| int index = (int)(bezt - fcu->bezt); | int index = (int)(bezt - fcu->bezt); | ||||
| if (index < 0 || index >= fcu->totvert) { | if (index < 0 || index >= fcu->totvert) { | ||||
| BKE_report(reports, RPT_ERROR, "Keyframe not in F-Curve"); | BKE_report(reports, RPT_ERROR, "Keyframe not in F-Curve"); | ||||
| return; | return; | ||||
| } | } | ||||
| delete_fcurve_key(fcu, index, !do_fast); | BKE_fcurve_delete_key(fcu, index); | ||||
| RNA_POINTER_INVALIDATE(bezt_ptr); | RNA_POINTER_INVALIDATE(bezt_ptr); | ||||
| if (!do_fast) { | |||||
| BKE_fcurve_handles_recalc(fcu); | |||||
| } | |||||
| rna_tag_animation_update(bmain, id); | 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; | ||||
| ▲ Show 20 Lines • Show All 1,524 Lines • Show Last 20 Lines | |||||