AnarchidIn botany, a tree is a perennial plant with an elongated stem, or trunk, supporting branches and leaves in most species.
In Spring, you'll have to parse the unitdef, either by name as I've given in the example, or by some other meta-data means, such as looking at the customparams.category value (most trees in Spring Features feature set have that set to "tree").
In addition to that, you can also have maps specify what unitdef uses what shader, or even write custom ones so artists have more creative choice. I personally wouldn't animate the bloodthornes in the same way (with the swaying shader), but I'll leave that decision to you.