[NUI] Use ModelNode for the child of Model
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Scene3D / src / public / ModelComponents / Material.cs
1 /*
2  * Copyright(c) 2023 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System;
19 using System.Runtime.InteropServices;
20 using System.ComponentModel;
21 using Tizen.NUI;
22 using Tizen.NUI.Binding;
23 using Tizen.NUI.BaseComponents;
24
25 namespace Tizen.NUI.Scene3D
26 {
27     /// <summary>
28     /// Class for setting Material properties of 3D models.
29     /// </summary>
30     /// <remarks>
31     /// This Material class is for setting Material properties of 3D models.
32     /// This Material supports properties and textures for PBR. Also, Material
33     /// can be shared with multiple ModelPrimitives and if the value is modified,
34     /// the rendering results of all ModelPrimitives using this Material will be changed.
35     /// </remarks>
36     /// <example>
37     /// <code>
38     /// Material material = new Material();
39     /// ModelPrimitive modelPrimitive = new ModelPrimitive();
40     /// modelPrimitive.Material = material;
41     /// </code>
42     /// </example>
43     [EditorBrowsable(EditorBrowsableState.Never)]
44     public class Material : BaseHandle
45     {
46         internal Material(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
47         {
48         }
49
50         /// <summary>
51         /// Create an initialized Material.
52         /// </summary>
53         [EditorBrowsable(EditorBrowsableState.Never)]
54         public Material() : this(Interop.Material.MaterialNew(), true)
55         {
56             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57         }
58
59         /// <summary>
60         /// Copy constructor.
61         /// </summary>
62         /// <param name="material">Source object to copy.</param>
63         [EditorBrowsable(EditorBrowsableState.Never)]
64         public Material(Material material) : this(Interop.Material.NewMaterial(Material.getCPtr(material)), true)
65         {
66             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67         }
68
69         /// <summary>
70         /// Assignment operator.
71         /// </summary>
72         /// <param name="material">Source object to be assigned.</param>
73         /// <returns>Reference to this.</returns>
74         internal Material Assign(Material material)
75         {
76             Material ret = new Material(Interop.Material.MaterialAssign(SwigCPtr, Material.getCPtr(material)), false);
77             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78             return ret;
79         }
80
81         /// <summary>
82         /// The name of the Material.
83         /// </summary>
84         /// <remarks>
85         /// This Name property is for setting the name of Material. The name can be used to identify the Material.
86         /// </remarks>
87         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
88         [EditorBrowsable(EditorBrowsableState.Never)]
89         public string Name
90         {
91             set
92             {
93                 var temp = new Tizen.NUI.PropertyValue(value);
94                 SetProperty(Interop.Material.PropertyNameIndexGet(), temp);
95                 temp.Dispose();
96             }
97             get
98             {
99                 string temp;
100                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyNameIndexGet());
101                 pValue.Get(out temp);
102                 pValue.Dispose();
103                 return temp;
104             }
105         }
106
107         /// <summary>
108         /// Property for the URL of the base color texture.
109         /// </summary>
110         /// <remarks>
111         /// This texture represents the base color of the material.
112         /// </remarks>
113         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
114         [EditorBrowsable(EditorBrowsableState.Never)]
115         public string BaseColorUrl
116         {
117             set
118             {
119                 var temp = new Tizen.NUI.PropertyValue(value);
120                 SetProperty(Interop.Material.PropertyBaseColorUrlIndexGet(), temp);
121                 temp.Dispose();
122             }
123             get
124             {
125                 string temp;
126                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyBaseColorUrlIndexGet());
127                 pValue.Get(out temp);
128                 pValue.Dispose();
129                 return temp;
130             }
131         }
132
133         /// <summary>
134         /// Property for the base color factor of the material.
135         /// </summary>
136         /// <remarks>
137         /// This factor is multiplied with the base color of the material.
138         /// </remarks>
139         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
140         [EditorBrowsable(EditorBrowsableState.Never)]
141         public Vector4 BaseColorFactor
142         {
143             set
144             {
145                 var temp = new Tizen.NUI.PropertyValue(value);
146                 SetProperty(Interop.Material.PropertyBaseColorFactorIndexGet(), temp);
147                 temp.Dispose();
148             }
149             get
150             {
151                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
152                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyBaseColorFactorIndexGet());
153                 pValue.Get(temp);
154                 pValue.Dispose();
155                 return temp;
156             }
157         }
158
159         /// <summary>
160         /// Property for the URL of the metallic roughness texture.
161         /// </summary>
162         /// <remarks>
163         /// This texture represents the metallicness and roughness of the material.
164         /// </remarks>
165         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
166         [EditorBrowsable(EditorBrowsableState.Never)]
167         public string MetallicRoughnessUrl
168         {
169             set
170             {
171                 var temp = new Tizen.NUI.PropertyValue(value);
172                 SetProperty(Interop.Material.PropertyMetallicRoughnessUrlIndexGet(), temp);
173                 temp.Dispose();
174             }
175             get
176             {
177                 string temp;
178                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyMetallicRoughnessUrlIndexGet());
179                 pValue.Get(out temp);
180                 pValue.Dispose();
181                 return temp;
182             }
183         }
184
185         /// <summary>
186         /// Property for the metallic factor of the material.
187         /// </summary>
188         /// <remarks>
189         /// This factor is multiplied with the metallicness of the material.
190         /// </remarks>
191         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
192         [EditorBrowsable(EditorBrowsableState.Never)]
193         public float MetallicFactor
194         {
195             set
196             {
197                 var temp = new Tizen.NUI.PropertyValue(value);
198                 SetProperty(Interop.Material.PropertyMetallicFactorIndexGet(), temp);
199                 temp.Dispose();
200             }
201             get
202             {
203                 float temp = 0.0f;
204                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyMetallicFactorIndexGet());
205                 pValue.Get(out temp);
206                 pValue.Dispose();
207                 return temp;
208             }
209         }
210
211         /// <summary>
212         /// Property for the roughness factor of the material.
213         /// </summary>
214         /// <remarks>
215         /// This factor is multiplied with the roughness of the material.
216         /// </remarks>
217         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
218         [EditorBrowsable(EditorBrowsableState.Never)]
219         public float RoughnessFactor
220         {
221             set
222             {
223                 var temp = new Tizen.NUI.PropertyValue(value);
224                 SetProperty(Interop.Material.PropertyRoughnessFactorIndexGet(), temp);
225                 temp.Dispose();
226             }
227             get
228             {
229                 float temp = 0.0f;
230                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyRoughnessFactorIndexGet());
231                 pValue.Get(out temp);
232                 pValue.Dispose();
233                 return temp;
234             }
235         }
236
237         /// <summary>
238         /// Property for the URL of the normal texture.
239         /// </summary>
240         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
241         [EditorBrowsable(EditorBrowsableState.Never)]
242         public string NormalUrl
243         {
244             set
245             {
246                 var temp = new Tizen.NUI.PropertyValue(value);
247                 SetProperty(Interop.Material.PropertyNormalUrlIndexGet(), temp);
248                 temp.Dispose();
249             }
250             get
251             {
252                 string temp;
253                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyNormalUrlIndexGet());
254                 pValue.Get(out temp);
255                 pValue.Dispose();
256                 return temp;
257             }
258         }
259
260         /// <summary>
261         /// Property for the scale of the normal texture.
262         /// </summary>
263         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
264         [EditorBrowsable(EditorBrowsableState.Never)]
265         public float NormalScale
266         {
267             set
268             {
269                 var temp = new Tizen.NUI.PropertyValue(value);
270                 SetProperty(Interop.Material.PropertyNormalScaleIndexGet(), temp);
271                 temp.Dispose();
272             }
273             get
274             {
275                 float temp = 0.0f;
276                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyNormalScaleIndexGet());
277                 pValue.Get(out temp);
278                 pValue.Dispose();
279                 return temp;
280             }
281         }
282
283         /// <summary>
284         /// Property for the URL of the occlusion texture.
285         /// </summary>
286         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
287         [EditorBrowsable(EditorBrowsableState.Never)]
288         public string OcclusionUrl
289         {
290             set
291             {
292                 var temp = new Tizen.NUI.PropertyValue(value);
293                 SetProperty(Interop.Material.PropertyOcclusionUrlIndexGet(), temp);
294                 temp.Dispose();
295             }
296             get
297             {
298                 string temp;
299                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyOcclusionUrlIndexGet());
300                 pValue.Get(out temp);
301                 pValue.Dispose();
302                 return temp;
303             }
304         }
305
306         /// <summary>
307         /// Property for the strength of the occlusion texture.
308         /// </summary>
309         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
310         [EditorBrowsable(EditorBrowsableState.Never)]
311         public float OcclusionStrength
312         {
313             set
314             {
315                 var temp = new Tizen.NUI.PropertyValue(value);
316                 SetProperty(Interop.Material.PropertyOcclusionStrengthIndexGet(), temp);
317                 temp.Dispose();
318             }
319             get
320             {
321                 float temp = 0.0f;
322                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyOcclusionStrengthIndexGet());
323                 pValue.Get(out temp);
324                 pValue.Dispose();
325                 return temp;
326             }
327         }
328
329         /// <summary>
330         /// Property for the URL of the emissive texture.
331         /// </summary>
332         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
333         [EditorBrowsable(EditorBrowsableState.Never)]
334         public string EmissiveUrl
335         {
336             set
337             {
338                 var temp = new Tizen.NUI.PropertyValue(value);
339                 SetProperty(Interop.Material.PropertyEmissiveUrlIndexGet(), temp);
340                 temp.Dispose();
341             }
342             get
343             {
344                 string temp;
345                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyEmissiveUrlIndexGet());
346                 pValue.Get(out temp);
347                 pValue.Dispose();
348                 return temp;
349             }
350         }
351
352         /// <summary>
353         /// Property for the emissive factor of the material.
354         /// </summary>
355         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
356         [EditorBrowsable(EditorBrowsableState.Never)]
357         public Vector3 EmissiveFactor
358         {
359             set
360             {
361                 var temp = new Tizen.NUI.PropertyValue(value);
362                 SetProperty(Interop.Material.PropertyEmissiveFactorIndexGet(), temp);
363                 temp.Dispose();
364             }
365             get
366             {
367                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
368                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyEmissiveFactorIndexGet());
369                 pValue.Get(temp);
370                 pValue.Dispose();
371                 return temp;
372             }
373         }
374
375         /// <summary>
376         /// Property for the alpha blending mode of the material.
377         /// </summary>
378         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
379         [EditorBrowsable(EditorBrowsableState.Never)]
380         public MaterialAlphaModeType AlphaMode
381         {
382             set
383             {
384                 var temp = new Tizen.NUI.PropertyValue((int)value);
385                 SetProperty(Interop.Material.PropertyAlphaModeIndexGet(), temp);
386                 temp.Dispose();
387             }
388             get
389             {
390                 int temp = 0;
391                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyAlphaModeIndexGet());
392                 pValue.Get(out temp);
393                 pValue.Dispose();
394                 return (MaterialAlphaModeType)temp;
395             }
396         }
397
398         /// <summary>
399         /// Property for the alpha cutoff value of the material.
400         /// </summary>
401         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
402         [EditorBrowsable(EditorBrowsableState.Never)]
403         public float AlphaCutoff
404         {
405             set
406             {
407                 var temp = new Tizen.NUI.PropertyValue(value);
408                 SetProperty(Interop.Material.PropertyAlphaCutOffIndexGet(), temp);
409                 temp.Dispose();
410             }
411             get
412             {
413                 float temp = 0.0f;
414                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyAlphaCutOffIndexGet());
415                 pValue.Get(out temp);
416                 pValue.Dispose();
417                 return temp;
418             }
419         }
420
421         /// <summary>
422         /// Property for the double sided material flag.
423         /// </summary>
424         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
425         [EditorBrowsable(EditorBrowsableState.Never)]
426         public bool DoubleSided
427         {
428             set
429             {
430                 var temp = new Tizen.NUI.PropertyValue(value);
431                 SetProperty(Interop.Material.PropertyDoubleSidedIndexGet(), temp);
432                 temp.Dispose();
433             }
434             get
435             {
436                 bool temp = false;
437                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyDoubleSidedIndexGet());
438                 pValue.Get(out temp);
439                 pValue.Dispose();
440                 return temp;
441             }
442         }
443
444         /// <summary>
445         /// Property for the index of refraction of the material.
446         /// </summary>
447         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
448         [EditorBrowsable(EditorBrowsableState.Never)]
449         public float Ior
450         {
451             set
452             {
453                 var temp = new Tizen.NUI.PropertyValue(value);
454                 SetProperty(Interop.Material.PropertyIorIndexGet(), temp);
455                 temp.Dispose();
456             }
457             get
458             {
459                 float temp = 0.0f;
460                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertyIorIndexGet());
461                 pValue.Get(out temp);
462                 pValue.Dispose();
463                 return temp;
464             }
465         }
466
467         /// <summary>
468         /// Property for the URL of the specular texture.
469         /// </summary>
470         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
471         [EditorBrowsable(EditorBrowsableState.Never)]
472         public string SpecularUrl
473         {
474             set
475             {
476                 var temp = new Tizen.NUI.PropertyValue(value);
477                 SetProperty(Interop.Material.PropertySpecularUrlIndexGet(), temp);
478                 temp.Dispose();
479             }
480             get
481             {
482                 string temp;
483                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertySpecularUrlIndexGet());
484                 pValue.Get(out temp);
485                 pValue.Dispose();
486                 return temp;
487             }
488         }
489
490
491
492
493         /// <summary>
494         /// Property for the specular factor of the material.
495         /// </summary>
496         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
497         [EditorBrowsable(EditorBrowsableState.Never)]
498         public float SpecularFactor
499         {
500             set
501             {
502                 var temp = new Tizen.NUI.PropertyValue(value);
503                 SetProperty(Interop.Material.PropertySpecularFactorIndexGet(), temp);
504                 temp.Dispose();
505             }
506             get
507             {
508                 float temp = 0.0f;
509                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertySpecularFactorIndexGet());
510                 pValue.Get(out temp);
511                 pValue.Dispose();
512                 return temp;
513             }
514         }
515
516         /// <summary>
517         /// Property for the URL of the specular color texture.
518         /// </summary>
519         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
520         [EditorBrowsable(EditorBrowsableState.Never)]
521         public string SpecularColorUrl
522         {
523             set
524             {
525                 var temp = new Tizen.NUI.PropertyValue(value);
526                 SetProperty(Interop.Material.PropertySpecularColorUrlIndexGet(), temp);
527                 temp.Dispose();
528             }
529             get
530             {
531                 string temp;
532                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertySpecularColorUrlIndexGet());
533                 pValue.Get(out temp);
534                 pValue.Dispose();
535                 return temp;
536             }
537         }
538
539         /// <summary>
540         /// Property for the specular color factor of the material.
541         /// </summary>
542         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
543         [EditorBrowsable(EditorBrowsableState.Never)]
544         public Vector3 SpecularColorFactor
545         {
546             set
547             {
548                 var temp = new Tizen.NUI.PropertyValue(value);
549                 SetProperty(Interop.Material.PropertySpecularColorFactorIndexGet(), temp);
550                 temp.Dispose();
551             }
552             get
553             {
554                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
555                 Tizen.NUI.PropertyValue pValue = GetProperty(Interop.Material.PropertySpecularColorFactorIndexGet());
556                 pValue.Get(temp);
557                 pValue.Dispose();
558                 return temp;
559             }
560         }
561
562
563
564
565
566         /// <summary>
567         /// Sets the texture of the ModelNode object for the specified texture type.
568         /// </summary>
569         /// <param name="textureType">The TextureType of the texture to set.</param>
570         /// <param name="texture">The Texture object to set.</param>
571         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
572         [EditorBrowsable(EditorBrowsableState.Never)]
573         public void SetTexture(MaterialTextureType textureType, Texture texture)
574         {
575             Interop.Material.SetTexture(SwigCPtr, (int)textureType, Texture.getCPtr(texture));
576             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
577         }
578
579         /// <summary>
580         /// Gets the texture of the ModelNode object for the specified texture type.
581         /// </summary>
582         /// <param name="textureType">The TextureType of the texture to get.</param>
583         /// <returns>The Texture object of the ModelNode object for the specified texture type.</returns>
584         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
585         [EditorBrowsable(EditorBrowsableState.Never)]
586         public Texture GetTexture(MaterialTextureType textureType)
587         {
588             IntPtr cPtr = Interop.Material.GetTexture(SwigCPtr, (int)textureType);
589             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
590             Texture ret = (cPtr == IntPtr.Zero) ? null : Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Texture;
591             return ret;
592         }
593
594         /// <summary>
595         /// Sets the sampler of the ModelNode object for the specified texture type.
596         /// </summary>
597         /// <param name="textureType">The TextureType of the sampler to set.</param>
598         /// <param name="sampler">The Sampler object to set.</param>
599         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
600         [EditorBrowsable(EditorBrowsableState.Never)]
601         public void SetSampler(MaterialTextureType textureType, Sampler sampler)
602         {
603             Interop.Material.SetSampler(SwigCPtr, (int)textureType, Sampler.getCPtr(sampler));
604             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
605         }
606
607         /// <summary>
608         /// Gets the sampler of the ModelNode object for the specified texture type.
609         /// </summary>
610         /// <param name="textureType">The TextureType of the sampler to get.</param>
611         /// <returns>The Sampler object of the ModelNode object for the specified texture type.</returns>
612         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
613         [EditorBrowsable(EditorBrowsableState.Never)]
614         public Sampler GetSampler(MaterialTextureType textureType)
615         {
616             IntPtr cPtr = Interop.Material.GetSampler(SwigCPtr, (int)textureType);
617             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
618             Sampler ret = (cPtr == IntPtr.Zero) ? null : Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Sampler;
619             return ret;
620         }
621
622         /// <summary>
623         /// Sets the value of an existing property.
624         /// </summary>
625         /// <param name="index">The index of the property.</param>
626         /// <param name="propertyValue">The new value of the property.</param>
627         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
628         [EditorBrowsable(EditorBrowsableState.Never)]
629         private void SetProperty(int index, PropertyValue propertyValue)
630         {
631             global::System.Runtime.InteropServices.HandleRef handle = SwigCPtr;
632             if (handle.Handle == global::System.IntPtr.Zero)
633             {
634                 throw new global::System.InvalidOperationException("Error! NUI's native dali object is already disposed. OR the native dali object handle of NUI becomes null!");
635             }
636
637             Interop.Material.SetProperty(handle, index, PropertyValue.getCPtr(propertyValue));
638             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
639         }
640
641         /// <summary>
642         /// Retrieves a property value.
643         /// </summary>
644         /// <param name="index">The index of the property.</param>
645         /// <returns>The property value.</returns>
646         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
647         [EditorBrowsable(EditorBrowsableState.Never)]
648         private PropertyValue GetProperty(int index)
649         {
650             global::System.Runtime.InteropServices.HandleRef handle = SwigCPtr;
651             if (handle.Handle == global::System.IntPtr.Zero)
652             {
653                 throw new global::System.InvalidOperationException("Error! NUI's native dali object is already disposed. OR the native dali object handle of NUI becomes null!");
654             }
655
656             PropertyValue ret = new PropertyValue(Interop.Material.GetProperty(handle, index), true);
657             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
658             return ret;
659         }
660
661         /// <summary>
662         /// Release swigCPtr.
663         /// </summary>
664         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
665         [EditorBrowsable(EditorBrowsableState.Never)]
666         protected override void ReleaseSwigCPtr(global::System.Runtime.InteropServices.HandleRef swigCPtr)
667         {
668             Interop.Material.DeleteMaterial(swigCPtr);
669         }
670     }
671 }