public static void SetParamValue(aepParam param, AEFxParam v) { var t = v.GetType(); if (t == typeof(AEFxBoolParam)) { aepSetParamValue(param, ref ((AEFxBoolParam)v).value); } else if (t == typeof(AEFxIntParam)) { aepSetParamValue(param, ref ((AEFxIntParam)v).value); } else if (t == typeof(AEFxDoubleParam)) { aepSetParamValue(param, ref ((AEFxDoubleParam)v).value); } else if (t == typeof(AEFxPoint2DParam)) { aepSetParamValue(param, ref ((AEFxPoint2DParam)v).value); } else if (t == typeof(AEFxPoint3DParam)) { aepSetParamValue(param, ref ((AEFxPoint3DParam)v).value); } else if (t == typeof(AEFxColorParam)) { aepSetParamValue(param, ref ((AEFxColorParam)v).value); } }
public static AEFxParam CreateAEFxParam(aepParam param) { var info = default(aepParamInfo); aepGetParamInfo(param, ref info); AEFxParam ret = null; switch (info.type) { case aepParamType.Bool: ret = new AEFxBoolParam(param); break; case aepParamType.Int: ret = new AEFxIntParam(param); break; case aepParamType.Double: ret = new AEFxDoubleParam(param); break; case aepParamType.Point2D: ret = new AEFxPoint2DParam(param); break; case aepParamType.Point3D: ret = new AEFxPoint3DParam(param); break; case aepParamType.Color: ret = new AEFxColorParam(param); break; default: ret = new AEFxParam(param); break; } return(ret); }