Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_channels_defines.c
| Show First 20 Lines • Show All 4,053 Lines • ▼ Show 20 Lines | if (setting == ACHANNEL_SETTING_VISIBLE) { | ||||
| bGPdata *gpd = (bGPdata *)ale_setting->id; | bGPdata *gpd = (bGPdata *)ale_setting->id; | ||||
| DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); | DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| /* UI updates */ | /* UI updates */ | ||||
| WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); | WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); | ||||
| } | } | ||||
| /* tag copy-on-write flushing (so that the settings will have an effect) */ | /* Tag for full animation update, so that the settings will have an effect. */ | ||||
| if (ale_setting->id) { | if (ale_setting->id) { | ||||
| DEG_id_tag_update(ale_setting->id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(ale_setting->id, ID_RECALC_ANIMATION); | ||||
| } | } | ||||
| if (ale_setting->adt && ale_setting->adt->action) { | if (ale_setting->adt && ale_setting->adt->action) { | ||||
| /* action is it's own datablock, so has to be tagged specifically... */ | /* Action is it's own datablock, so has to be tagged specifically. */ | ||||
| DEG_id_tag_update(&ale_setting->adt->action->id, ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(&ale_setting->adt->action->id, ID_RECALC_ANIMATION); | ||||
| } | } | ||||
| /* verify animation context */ | /* verify animation context */ | ||||
| if (ANIM_animdata_get_context(C, &ac) == 0) | if (ANIM_animdata_get_context(C, &ac) == 0) | ||||
| return; | return; | ||||
| /* check if the setting is on... */ | /* check if the setting is on... */ | ||||
| on = ANIM_channel_setting_get(&ac, ale_setting, setting); | on = ANIM_channel_setting_get(&ac, ale_setting, setting); | ||||
| Show All 27 Lines | static void achannel_nlatrack_solo_widget_cb(bContext *C, void *ale_poin, void *UNUSED(arg2)) | ||||
| * - BUT, since the button already toggles the value, we need to un-toggle it | * - BUT, since the button already toggles the value, we need to un-toggle it | ||||
| * before the API call gets to it, otherwise it will end up clearing the result | * before the API call gets to it, otherwise it will end up clearing the result | ||||
| * again! | * again! | ||||
| */ | */ | ||||
| nlt->flag ^= NLATRACK_SOLO; | nlt->flag ^= NLATRACK_SOLO; | ||||
| BKE_nlatrack_solo_toggle(adt, nlt); | BKE_nlatrack_solo_toggle(adt, nlt); | ||||
| /* send notifiers */ | /* send notifiers */ | ||||
| DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION); | ||||
| WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL); | WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL); | ||||
| } | } | ||||
| /* callback for widget sliders - insert keyframes */ | /* callback for widget sliders - insert keyframes */ | ||||
| static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poin) | static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poin) | ||||
| { | { | ||||
| ID *id = (ID *)id_poin; | ID *id = (ID *)id_poin; | ||||
| AnimData *adt = BKE_animdata_from_id(id); | AnimData *adt = BKE_animdata_from_id(id); | ||||
| ▲ Show 20 Lines • Show All 609 Lines • Show Last 20 Lines | |||||