From: Eunki, Hong Date: Wed, 10 May 2023 08:11:44 +0000 (+0900) Subject: [NUI.Scene3D] Change the API name for BlendShape morphing X-Git-Tag: accepted/tizen/unified/20231205.024657~317 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf47d5e0d6d8fcd47943e115a3de4b670088b40e;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI.Scene3D] Change the API name for BlendShape morphing Since json file can change not only facial, The name of API is not good. Instead, Let we change the name of facial API as 'BlendShapeAnimation'. Now user can notify that this API can control all kinds of blendshape. Signed-off-by: Eunki, Hong --- diff --git a/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs b/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs index e94c06e..870e437 100755 --- a/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs +++ b/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs @@ -96,10 +96,10 @@ namespace Tizen.NUI.Scene3D public static extern global::System.IntPtr LoadBvhAnimationFromBuffer(global::System.Runtime.InteropServices.HandleRef model, string bvhBuffer, int bvhBufferLength, global::System.Runtime.InteropServices.HandleRef scale, bool translateRootFromModelNode); [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_LoadFacialAnimation_1")] - public static extern global::System.IntPtr LoadFacialAnimation(global::System.Runtime.InteropServices.HandleRef model, string facialFilename); + public static extern global::System.IntPtr LoadBlendShapeAnimation(global::System.Runtime.InteropServices.HandleRef model, string jsonFilename); [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_LoadFacialAnimation_2")] - public static extern global::System.IntPtr LoadFacialAnimationFromBuffer(global::System.Runtime.InteropServices.HandleRef model, string facialBuffer, int facialBufferLength); + public static extern global::System.IntPtr LoadBlendShapeAnimationFromBuffer(global::System.Runtime.InteropServices.HandleRef model, string jsonBuffer, int jsonBufferLength); } } } diff --git a/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs b/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs index 4969483..34253bf 100755 --- a/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs +++ b/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs @@ -419,9 +419,35 @@ namespace Tizen.NUI.Scene3D /// Animaion of facial // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Do not use this LoadFacialAnimation. Use LoadBlendShapeAnimation instead.")] public Animation LoadFacialAnimation(string facialFilename) { - global::System.IntPtr cPtr = Interop.Model.LoadFacialAnimation(SwigCPtr, facialFilename); + return LoadBlendShapeAnimation(facialFilename); + } + + /// + /// Load facial animation and assign to model. + /// + /// Contents of json format file what we predefined. + /// Animaion of facial + // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Do not use this LoadFacialAnimationFromBuffer. Use LoadBlendShapeAnimationFromBuffer instead.")] + public Animation LoadFacialAnimationFromBuffer(string facialBuffer) + { + return LoadBlendShapeAnimationFromBuffer(facialBuffer); + } + + /// + /// Load blendshape animation and assign to model from json file. + /// + /// Name of json format file what we predefined. + /// Animaion of facial + // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) + [EditorBrowsable(EditorBrowsableState.Never)] + public Animation LoadBlendShapeAnimation(string jsonFilename) + { + global::System.IntPtr cPtr = Interop.Model.LoadBlendShapeAnimation(SwigCPtr, jsonFilename); Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation; if (ret == null) { @@ -440,15 +466,15 @@ namespace Tizen.NUI.Scene3D } /// - /// Load facial animation and assign to model. + /// Load morphing animation and assign to model from json string. /// - /// Contents of json format file what we predefined. + /// Contents of json format file what we predefined. /// Animaion of facial // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) [EditorBrowsable(EditorBrowsableState.Never)] - public Animation LoadFacialAnimationFromBuffer(string facialBuffer) + public Animation LoadBlendShapeAnimationFromBuffer(string jsonBuffer) { - global::System.IntPtr cPtr = Interop.Model.LoadFacialAnimationFromBuffer(SwigCPtr, facialBuffer, facialBuffer.Length); + global::System.IntPtr cPtr = Interop.Model.LoadBlendShapeAnimationFromBuffer(SwigCPtr, jsonBuffer, jsonBuffer.Length); Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation; if (ret == null) {