Beamer overlay specifications with genealogytree?

Is there a way I can use beamer overlay specifications with options in genealogytree? In this example I want to first show a tree and next show the same tree with an option "highlight" applied to one node. Instead of having this as two frames, how can I write it so that [highlight] is only used for <2>?

\documentclass{beamer}

\usepackage[all]{genealogytree}

\gtrset{highlight/.style={box={colback=yellow!20}}}

\begin{document}
\frame{
\frametitle{Example}
\begin{tikzpicture}
\genealogytree[template=signpost]{
parent{
p{father}
p{mother}
g{child}
}
}
\end{tikzpicture}
}
\frame{
\frametitle{Example}
\begin{tikzpicture}
\genealogytree[template=signpost]{
parent{
p{father}
p{mother}
g[highlight]{child}
}
}
\end{tikzpicture}
}
\end{document}


You can use \only but help the tree parser a bit by moving it outside the tree.

\documentclass{beamer}

\usepackage[all]{genealogytree}

\gtrset{highlight/.style={box={colback=yellow!20}}}

\begin{document}

\newcommand\tmp[1]{%
\genealogytree[template=signpost]{
parent{
p{father}
p{mother}
g[#1]{child}
}}}
\begin{frame}
\frametitle{Example}
\begin{tikzpicture}
\only<1>{\tmp{}}%
\only<2>{\tmp{highlight}}%
\end{tikzpicture}

\end{frame}

\end{document}

• Thanks, I guess it was too optimistic to hope for something cleaner to read and write.
– pst
Jul 18 at 20:49