contexttools.get_context_marks_attached_to_component

abjad.tools.contexttools.get_context_marks_attached_to_component.get_context_marks_attached_to_component(component, klasses=(<class 'abjad.tools.contexttools.ContextMark.ContextMark.ContextMark'>, ))[source]

New in version 2.0.

Get context marks attached to component:

abjad> staff = Staff("c'8 d'8 e'8 f'8")
abjad> contexttools.ClefMark('treble')(staff)
ClefMark('treble')(Staff{4})
abjad> contexttools.DynamicMark('p')(staff[0])
DynamicMark('p')(c'8)
abjad> f(staff)
\new Staff {
    \clef "treble"
    c'8 \p
    d'8
    e'8
    f'8
}
abjad> contexttools.get_context_marks_attached_to_component(staff[0])
(DynamicMark('p')(c'8),)

Return tuple of zero or more context marks.

Changed in version 2.0: renamed contexttools.get_context_marks_attached_to_component() to contexttools.get_context_marks_attached_to_component().

This Page