public void CreateKey(xmAPI::xmPostprocessParamType paramType, float time) { xmAPI::xmPostprocessParam param = animator.GetParam(paramType); try { switch (paramType) { case xmAPI::xmPostprocessParamType.AddColor: case xmAPI::xmPostprocessParamType.BaseColor: // 3 components param.AddValue(time, 0.0f, 0); param.AddValue(time, 0.0f, 1); param.AddValue(time, 0.0f, 2); break; case xmAPI::xmPostprocessParamType.GrayColor: // 3+1 components param.AddValue(time, 0.0f, 0); param.AddValue(time, 0.0f, 1); param.AddValue(time, 0.0f, 2); param.Dispose(); param = animator.GetParam(xmAPI::xmPostprocessParamType.GrayValue); param.AddValue(time, 0.0f, 0); break; case xmAPI::xmPostprocessParamType.DualityH: param.AddValue(time, 0.44f, 0); param.Dispose(); param = animator.GetParam(xmAPI::xmPostprocessParamType.DualityV); param.AddValue(time, 0.44f, 0); // 2 components break; case xmAPI::xmPostprocessParamType.NoiseIntensity: param.AddValue(time, 0.33f, 0); param.Dispose(); param = animator.GetParam(xmAPI::xmPostprocessParamType.NoiseGrain); param.AddValue(time, 0.11f, 0); param.Dispose(); param = animator.GetParam(xmAPI::xmPostprocessParamType.NoiseFps); param.AddValue(time, 1.0f, 0); break; case xmAPI::xmPostprocessParamType.Blur: case xmAPI::xmPostprocessParamType.ColorMappingInfluence: // 1 component param.AddValue(time, 0.33f, 0); break; default: throw new ArgumentException("Invalid param type."); } } finally { param.Dispose(); } }
public xmAPI::xmPostprocessParam GetParam(xmAPI::xmPostprocessParamType paramType) { return(animator.GetParam(paramType)); }