Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_channels_defines.c
| Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
| #include "DNA_gpencil_types.h" | #include "DNA_gpencil_types.h" | ||||
| #include "DNA_speaker_types.h" | #include "DNA_speaker_types.h" | ||||
| #include "DNA_mask_types.h" | #include "DNA_mask_types.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "BKE_animsys.h" | #include "BKE_animsys.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_gpencil.h" | |||||
| #include "BKE_key.h" | #include "BKE_key.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_nla.h" | #include "BKE_nla.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "GPU_immediate.h" | #include "GPU_immediate.h" | ||||
| #include "GPU_state.h" | #include "GPU_state.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_interface_icons.h" | #include "UI_interface_icons.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "ED_anim_api.h" | #include "ED_anim_api.h" | ||||
| #include "ED_keyframing.h" | #include "ED_keyframing.h" | ||||
| #include "BIF_gl.h" | #include "BIF_gl.h" | ||||
| #include "DEG_depsgraph.h" | |||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| /* *********************************************** */ | /* *********************************************** */ | ||||
| // XXX constant defines to be moved elsewhere? | // XXX constant defines to be moved elsewhere? | ||||
| /* extra padding for lengths (to go under scrollers) */ | /* extra padding for lengths (to go under scrollers) */ | ||||
| #define EXTRA_SCROLL_PAD 100.0f | #define EXTRA_SCROLL_PAD 100.0f | ||||
| ▲ Show 20 Lines • Show All 562 Lines • ▼ Show 20 Lines | switch (ob->type) { | ||||
| case OB_ARMATURE: | case OB_ARMATURE: | ||||
| return ICON_OUTLINER_OB_ARMATURE; | return ICON_OUTLINER_OB_ARMATURE; | ||||
| case OB_FONT: | case OB_FONT: | ||||
| return ICON_OUTLINER_OB_FONT; | return ICON_OUTLINER_OB_FONT; | ||||
| case OB_SURF: | case OB_SURF: | ||||
| return ICON_OUTLINER_OB_SURFACE; | return ICON_OUTLINER_OB_SURFACE; | ||||
| case OB_EMPTY: | case OB_EMPTY: | ||||
| return ICON_OUTLINER_OB_EMPTY; | return ICON_OUTLINER_OB_EMPTY; | ||||
| case OB_GPENCIL: | |||||
| return ICON_OUTLINER_OB_GREASEPENCIL; | |||||
| default: | default: | ||||
| return ICON_OBJECT_DATA; | return ICON_OBJECT_DATA; | ||||
| } | } | ||||
| } | } | ||||
| /* name for object */ | /* name for object */ | ||||
| static void acf_object_name(bAnimListElem *ale, char *name) | static void acf_object_name(bAnimListElem *ale, char *name) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 3,371 Lines • ▼ Show 20 Lines | static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void *setting_wrap) | ||||
| /* send notifiers before doing anything else... */ | /* send notifiers before doing anything else... */ | ||||
| WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); | WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); | ||||
| /* verify that we have a channel to operate on. */ | /* verify that we have a channel to operate on. */ | ||||
| if (!ale_setting) { | if (!ale_setting) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (ale_setting->type == ANIMTYPE_GPLAYER) | if (ale_setting->type == ANIMTYPE_GPLAYER) { | ||||
| /* draw cache updates for settings that affect the visible strokes */ | |||||
| if (setting == ACHANNEL_SETTING_VISIBLE) { | |||||
| bGPdata *gpd = (bGPdata *)ale_setting->id; | |||||
| DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA); | |||||
| } | |||||
| /* 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 copy-on-write flushing (so that the settings will have an effect) */ | ||||
| if (ale_setting->id) { | if (ale_setting->id) { | ||||
| DEG_id_tag_update(ale_setting->id, DEG_TAG_COPY_ON_WRITE); | DEG_id_tag_update(ale_setting->id, DEG_TAG_COPY_ON_WRITE); | ||||
| } | } | ||||
| 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, DEG_TAG_COPY_ON_WRITE); | DEG_id_tag_update(&ale_setting->adt->action->id, DEG_TAG_COPY_ON_WRITE); | ||||
| ▲ Show 20 Lines • Show All 639 Lines • Show Last 20 Lines | |||||