Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show All 28 Lines | |||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_timecode.h" | #include "BLI_timecode.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "DNA_anim_types.h" | |||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_sound_types.h" | #include "DNA_sound_types.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_lib_id.h" | #include "BKE_lib_id.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| ▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| bool ED_space_sequencer_check_show_strip(SpaceSeq *sseq) | bool ED_space_sequencer_check_show_strip(SpaceSeq *sseq) | ||||
| { | { | ||||
| return (ELEM(sseq->view, SEQ_VIEW_SEQUENCE, SEQ_VIEW_SEQUENCE_PREVIEW) && | return (ELEM(sseq->view, SEQ_VIEW_SEQUENCE, SEQ_VIEW_SEQUENCE_PREVIEW) && | ||||
| ELEM(sseq->mainb, SEQ_DRAW_SEQUENCE, SEQ_DRAW_IMG_IMBUF)); | ELEM(sseq->mainb, SEQ_DRAW_SEQUENCE, SEQ_DRAW_IMG_IMBUF)); | ||||
| } | } | ||||
| static bool sequencer_fcurves_targets_color_strip(const FCurve *fcurve) | |||||
| { | |||||
| if (!BLI_str_startswith(fcurve->rna_path, "sequence_editor.sequences_all[\"")) { | |||||
| return false; | |||||
| } | |||||
| if (!BLI_str_endswith(fcurve->rna_path, "\"].color")) { | |||||
| return false; | |||||
| } | |||||
| return true; | |||||
| } | |||||
| /* | |||||
| * Check if there is animation attached to a strip, that is shown on the strip in the UI. | |||||
| * | |||||
| * - Colors of color strips are displayed on the strip itself. | |||||
| */ | |||||
| bool ED_space_sequencer_has_visible_animation_on_strip(const struct Scene *scene) | |||||
| { | |||||
| if (!scene->adt) { | |||||
| return false; | |||||
| } | |||||
| if (!scene->adt->action) { | |||||
| return false; | |||||
| } | |||||
| LISTBASE_FOREACH (FCurve *, fcurve, &scene->adt->action->curves) { | |||||
| if (sequencer_fcurves_targets_color_strip(fcurve)) { | |||||
| return true; | |||||
| } | |||||
| } | |||||
| return false; | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Shared Poll Functions | /** \name Shared Poll Functions | ||||
| * \{ */ | * \{ */ | ||||
| /* Operator functions. */ | /* Operator functions. */ | ||||
| bool sequencer_edit_poll(bContext *C) | bool sequencer_edit_poll(bContext *C) | ||||
| ▲ Show 20 Lines • Show All 3,086 Lines • Show Last 20 Lines | |||||