[DF-3254] add flag declarations
[DF-3267] add SwitchTemplate method to material