Add means to display objects accessible from a grob
A convenient means of displaying the grobs and grob-arrays pointed to by various internal properties of a given grob would be very helpful for debugging and development purposes. For example, it would facilitate the creation of advanced tweaks, which frequently require "lateral" access to other grobs.
The output of the function 'grob::display-objects' shows all of the grobs accessible to a given grob through ly:grob-object, along with the relevant interfaces and properties. It includes properties which are empty: not all properties within an interface may be set for or used by a grob supporting that interface.
Comment #1
Posted on Mar 24, 2015 by Quick BirdHere's an example of usage:
\version "2.19.18"
%% To write to a file: %#(set-current-output-port (open-output-file "pointers.txt"))
% Note: the example uses 'after-line-breaking, but you can use the function % within callbacks for other properties.
{ \override Dots.after-line-breaking = #grob::display-objects \override NoteHead.after-line-breaking = #grob::display-objects \override NoteColumn.after-line-breaking = #grob::display-objects \override Score.VerticalAxisGroup.after-line-breaking = #grob::display-objects cis4. }
Comment #2
Posted on Mar 24, 2015 by Quick BirdExample of use within a callback:
{ \override Dots.color = #(lambda (grob) (grob::display-objects grob) red) }
Comment #3
Posted on Mar 24, 2015 by Quick KangarooPatchy the autobot says: passes tests. includes a full make doc
Comment #4
Posted on Mar 25, 2015 by Quick KangarooPatch on countdown for March 28th
Comment #5
Posted on Mar 28, 2015 by Quick KangarooPatch counted down - please push
Comment #6
Posted on Mar 28, 2015 by Quick BirdPushed to staging as commit f4f75589864371d3a6c50eace36561a73203acee.
Comment #7
Posted on Apr 28, 2015 by Happy Wombat(No comment was entered for this change.)
Status: Verified
Labels:
Type-Enhancement
Fixed_2_19_18