Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_fcurve.c
| Show All 33 Lines | |||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "ED_anim_api.h" | |||||
| #include "ED_keyframes_edit.h" | #include "ED_keyframes_edit.h" | ||||
| #include "ED_keyframing.h" | #include "ED_keyframing.h" | ||||
| const EnumPropertyItem rna_enum_fmodifier_type_items[] = { | const EnumPropertyItem rna_enum_fmodifier_type_items[] = { | ||||
| {FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""}, | {FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""}, | ||||
| {FMODIFIER_TYPE_GENERATOR, | {FMODIFIER_TYPE_GENERATOR, | ||||
| "GENERATOR", | "GENERATOR", | ||||
| 0, | 0, | ||||
| ▲ Show 20 Lines • Show All 686 Lines • ▼ Show 20 Lines | static void rna_FModifier_blending_range( | ||||
| PointerRNA *ptr, float *min, float *max, float *UNUSED(softmin), float *UNUSED(softmax)) | PointerRNA *ptr, float *min, float *max, float *UNUSED(softmin), float *UNUSED(softmax)) | ||||
| { | { | ||||
| FModifier *fcm = (FModifier *)ptr->data; | FModifier *fcm = (FModifier *)ptr->data; | ||||
| *min = 0.0f; | *min = 0.0f; | ||||
| *max = fcm->efra - fcm->sfra; | *max = fcm->efra - fcm->sfra; | ||||
| } | } | ||||
| static void rna_FModifier_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_FModifier_update(Main *bmain, Scene *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); | calchandles_fcurve(fcm->curve); | ||||
| } | } | ||||
| FCurve *fcu = fcm->curve; | |||||
| if (fcu && fcu->rna_path) { | |||||
| bAction *act = (bAction *)id; | |||||
| ANIM_rna_updates_from_action_fcurve(bmain, scene, act, fcu); | |||||
| } | |||||
| 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; | ||||
| const FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm); | const FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm); | ||||
| ▲ Show 20 Lines • Show All 1,720 Lines • Show Last 20 Lines | |||||