Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_fcurve.c
| Show First 20 Lines • Show All 489 Lines • ▼ Show 20 Lines | |||||
| /* RNA update callback for F-Curves to indicate that there are copy-on-write tagging/flushing needed | /* RNA update callback for F-Curves to indicate that there are copy-on-write tagging/flushing needed | ||||
| * (e.g. for properties that affect how animation gets evaluated) | * (e.g. for properties that affect how animation gets evaluated) | ||||
| */ | */ | ||||
| static void rna_FCurve_update_eval(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_FCurve_update_eval(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| IdAdtTemplate *iat = (IdAdtTemplate *)ptr->id.data; | IdAdtTemplate *iat = (IdAdtTemplate *)ptr->id.data; | ||||
| if (iat && iat->adt && iat->adt->action) { | if (iat && iat->adt && iat->adt->action) { | ||||
| /* action is separate datablock, needs separate tag */ | /* action is separate datablock, needs separate tag */ | ||||
| DEG_id_tag_update(&iat->adt->action->id, ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(&iat->adt->action->id, ID_RECALC_ANIMATION); | ||||
| } | } | ||||
| } | } | ||||
| static PointerRNA rna_FCurve_active_modifier_get(PointerRNA *ptr) | static PointerRNA rna_FCurve_active_modifier_get(PointerRNA *ptr) | ||||
| { | { | ||||
| FCurve *fcu = (FCurve *)ptr->data; | FCurve *fcu = (FCurve *)ptr->data; | ||||
| FModifier *fcm = find_active_fmodifier(&fcu->modifiers); | FModifier *fcm = find_active_fmodifier(&fcu->modifiers); | ||||
| ▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | static void rna_FModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| /* tag datablock for time update so that animation is recalculated, | /* tag datablock for time update so that animation is recalculated, | ||||
| * as FModifiers affect how animation plays... | * as FModifiers affect how animation plays... | ||||
| */ | */ | ||||
| DEG_id_tag_update(id, ID_RECALC_ANIMATION); | DEG_id_tag_update(id, ID_RECALC_ANIMATION); | ||||
| if (adt != NULL) { | if (adt != NULL) { | ||||
| if (adt->action != NULL) { | if (adt->action != NULL) { | ||||
| /* action is separate datablock, needs separate tag */ | /* action is separate datablock, needs separate tag */ | ||||
| DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION); | ||||
| } | } | ||||
| } | } | ||||
| if (fcm->curve && fcm->type == FMODIFIER_TYPE_CYCLES) { | if (fcm->curve && fcm->type == FMODIFIER_TYPE_CYCLES) { | ||||
| calchandles_fcurve(fcm->curve); | calchandles_fcurve(fcm->curve); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 320 Lines • ▼ Show 20 Lines | static void rna_Keyframe_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| ID *id = ptr->id.data; | ID *id = ptr->id.data; | ||||
| AnimData *adt = BKE_animdata_from_id(id); | AnimData *adt = BKE_animdata_from_id(id); | ||||
| DEG_id_tag_update(id, ID_RECALC_ANIMATION); | DEG_id_tag_update(id, ID_RECALC_ANIMATION); | ||||
| if (adt != NULL) { | if (adt != NULL) { | ||||
| if (adt->action != NULL) { | if (adt->action != NULL) { | ||||
| /* action is separate datablock, needs separate tag */ | /* action is separate datablock, needs separate tag */ | ||||
| DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| #else | #else | ||||
| static void rna_def_fmodifier_generator(BlenderRNA *brna) | static void rna_def_fmodifier_generator(BlenderRNA *brna) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,156 Lines • Show Last 20 Lines | |||||