public ToonzParam(otpAPI.otpParam p) { var info = default(otpAPI.otpParamInfo); otpAPI.otpGetParamInfo(p, ref info); name = info.name; note = info.note; type = info.type; }
public ToonzStringParam(otpAPI.otpParam p) : base(p) { int nlen = otpAPI.otpGetParamLength(p); if (nlen > 0) { byte[] tmp = new byte[nlen]; otpAPI.otpGetParamValue(p, ref tmp[0]); value = System.Text.Encoding.ASCII.GetString(tmp); } }
public ToonzEnumParam(otpAPI.otpParam p) : base(p) { otpAPI.otpGetParamTraits(p, ref traits); otpAPI.otpGetParamValue(p, ref value); var names_ptr = new IntPtr[traits.num]; Marshal.Copy(traits.names, names_ptr, 0, names_ptr.Length); names = new string[traits.num]; for (int i = 0; i < names_ptr.Length; ++i) { names[i] = otpAPI.ToS(names_ptr[i]); } }
public ToonzBoolParam(otpAPI.otpParam p) : base(p) { otpAPI.otpGetParamTraits(p, ref traits); otpAPI.otpGetParamValue(p, ref value); }