ValueAnimation.SetKeyFrame overload for boolean value missing

andrekoehlerandrekoehler DEMember ✭✭
edited April 2017 in UrhoSharp

ValueAnimation supports the following variant types already:
public bool SetKeyFrame(float time, float value);
public bool SetKeyFrame(float time, int value);
public bool SetKeyFrame(float time, Matrix3x4 value);
public bool SetKeyFrame(float time, Matrix4 value);
public bool SetKeyFrame(float time, IntVector2value);
public bool SetKeyFrame(float time, Vector4 value);
public bool SetKeyFrame(float time, Vector2 value);
public bool SetKeyFrame(float time, Color value);
public bool SetKeyFrame(float time, IntRect value);
public bool SetKeyFrame(float time, Vector3 value);
public bool SetKeyFrame(float time, string value);
public bool SetKeyFrame(float time, Quaternion value);

But there is no support for the bool type, even tough the Urho3D::Variant class supports bool and the Urho3D::Node class registers an animatable attribute "Is Enabled":
URHO3D_ACCESSOR_ATTRIBUTE("Is Enabled", IsEnabled, SetEnabled, bool, true, AM_DEFAULT);

I tried using the int-overload of SetKeyFrame together with setting ValueAnimation.ValueType to VariantType.Bool but the animation is silently ignored.
If I set ValueAnimation.InterpolationMethod from "Linear" to "None" I even get an AccessViolationException if I call Node.SetAttributeAnimationTime later on.

Posts

Sign In or Register to comment.