Actions specific to a given blueprint

Hi,

I am trying to set a behaviour in a custom class that restricts the methods that can be used depending on the blueprint on which they are used.

For example, I have a getter and a setter on a class and I want the setter method to be available in a Character Blueprint but not in Animation Blueprint.
How could I achieve such a result

Thanks