Esempio n. 1
0
 public void SetColor(FbxColor pColor)
 {
     FbxWrapperNativePINVOKE.FbxMediaClip_SetColor(swigCPtr, FbxColor.getCPtr(pColor));
     if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
     {
         throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 2
0
 public void SetDefaultColor(FbxColor pColor)
 {
     fbx_wrapperPINVOKE.FbxMarker_SetDefaultColor(swigCPtr, FbxColor.getCPtr(pColor));
     if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
     {
         throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 3
0
 public void SetLast(FbxColor pItem)
 {
     FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_SetLast(swigCPtr, FbxColor.getCPtr(pItem));
     if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
     {
         throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 4
0
 public void SetAt(int pIndex, FbxColor pItem)
 {
     NativeMethods.FbxLayerElementArray_SetAt__SWIG_2(swigCPtr, pIndex, pItem);
     if (NativeMethods.SWIGPendingException.Pending)
     {
         throw NativeMethods.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 5
0
 public void SetColor(FbxColor value)
 {
     NativeMethods.FbxProperty_SetColor(swigCPtr, value);
     if (NativeMethods.SWIGPendingException.Pending)
     {
         throw NativeMethods.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 6
0
 public void SetFogColor(FbxColor pColor)
 {
     fbx_wrapperPINVOKE.FbxGlobalLightSettings_SetFogColor(swigCPtr, FbxColor.getCPtr(pColor));
     if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
     {
         throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 7
0
 public void SetAmbientColor(FbxColor pAmbientColor)
 {
     NativeMethods.FbxGlobalSettings_SetAmbientColor(swigCPtr, pAmbientColor);
     if (NativeMethods.SWIGPendingException.Pending)
     {
         throw NativeMethods.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 8
0
 public void SetAmbientColor(FbxColor pAmbientColor)
 {
     FbxWrapperNativePINVOKE.FbxGlobalSettings_SetAmbientColor(swigCPtr, FbxColor.getCPtr(pAmbientColor));
     if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
     {
         throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public void SetLast(FbxColor pItem)
 {
     fbx_wrapperPINVOKE.DirectArrayFbxColor_SetLast(swigCPtr, FbxColor.getCPtr(pItem));
     if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
     {
         throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
     }
 }
        public int Find(FbxColor pItem)
        {
            int ret = fbx_wrapperPINVOKE.DirectArrayFbxColor_Find(swigCPtr, FbxColor.getCPtr(pItem));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 11
0
        public bool SetLimbNodeColor(FbxColor pColor)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxSkeleton_SetLimbNodeColor(swigCPtr, FbxColor.getCPtr(pColor));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 12
0
        public bool ne(FbxColor pColor)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxColor_ne(swigCPtr, FbxColor.getCPtr(pColor));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 13
0
        public FbxColor assign(FbxDouble4 pColor)
        {
            FbxColor ret = new FbxColor(FbxWrapperNativePINVOKE.FbxColor_assign__SWIG_2(swigCPtr, FbxDouble4.getCPtr(pColor)), false);

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 14
0
        public int Add(FbxColor pItem)
        {
            int ret = NativeMethods.FbxLayerElementArray_Add__SWIG_2(swigCPtr, pItem);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 15
0
        public bool eq(FbxColor pColor)
        {
            bool ret = fbx_wrapperPINVOKE.FbxColor_eq(swigCPtr, FbxColor.getCPtr(pColor));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 16
0
        public FbxColor assign(FbxDouble3 pColor)
        {
            FbxColor ret = new FbxColor(fbx_wrapperPINVOKE.FbxColor_assign__SWIG_1(swigCPtr, FbxDouble3.getCPtr(pColor)), false);

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public int InsertAt(int pIndex, FbxColor pItem)
        {
            int ret = fbx_wrapperPINVOKE.DirectArrayFbxColor_InsertAt(swigCPtr, pIndex, FbxColor.getCPtr(pItem));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 18
0
        public bool Set(FbxColor pValue)
        {
            bool ret = NativeMethods.FbxProperty_Set__SWIG_1(swigCPtr, pValue);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 19
0
        public bool SetLimbNodeColor(FbxColor pColor)
        {
            bool ret = NativeMethods.FbxSkeleton_SetLimbNodeColor(swigCPtr, pColor);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public bool RemoveIt(FbxColor pItem)
        {
            bool ret = fbx_wrapperPINVOKE.DirectArrayFbxColor_RemoveIt(swigCPtr, FbxColor.getCPtr(pItem));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 21
0
        public int InsertAt(int pIndex, FbxColor pItem)
        {
            int ret = FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_InsertAt(swigCPtr, pIndex, FbxColor.getCPtr(pItem));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 22
0
        public bool RemoveIt(FbxColor pItem)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_RemoveIt(swigCPtr, FbxColor.getCPtr(pItem));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 23
0
        public FbxColor GetDefaultColor(FbxColor pColor)
        {
            FbxColor ret = new FbxColor(fbx_wrapperPINVOKE.FbxMarker_GetDefaultColor(swigCPtr, FbxColor.getCPtr(pColor)), false);

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 24
0
        public void TestBasics()
        {
            FbxColor c;

            c = new FbxColor(0.1, 0.2, 0.3, 0.5);
            Assert.AreEqual(0.1, c.mRed);
            Assert.AreEqual(0.2, c.mGreen);
            Assert.AreEqual(0.3, c.mBlue);
            Assert.AreEqual(0.5, c.mAlpha);

            c = new FbxColor(0.1, 0.2, 0.3);
            Assert.AreEqual(0.1, c.mRed);
            Assert.AreEqual(0.2, c.mGreen);
            Assert.AreEqual(0.3, c.mBlue);
            Assert.AreEqual(1.0, c.mAlpha);

            c = new FbxColor(new FbxDouble3(0.1, 0.2, 0.3), 0.5);
            Assert.AreEqual(0.1, c.mRed);
            Assert.AreEqual(0.2, c.mGreen);
            Assert.AreEqual(0.3, c.mBlue);
            Assert.AreEqual(0.5, c.mAlpha);

            c = new FbxColor(new FbxDouble4(0.1, 0.2, 0.3, 0.5));
            Assert.AreEqual(0.1, c.mRed);
            Assert.AreEqual(0.2, c.mGreen);
            Assert.AreEqual(0.3, c.mBlue);
            Assert.AreEqual(0.5, c.mAlpha);

            Assert.IsTrue(c.IsValid());
            c.mRed   = -1;
            c.mGreen = 1e6;
            Assert.IsFalse(c.IsValid());

            c.Set(1, 2, 3, 5);
            Assert.AreEqual(1, c.mRed);
            Assert.AreEqual(2, c.mGreen);
            Assert.AreEqual(3, c.mBlue);
            Assert.AreEqual(5, c.mAlpha);
            Assert.AreEqual(1, c[0]);
            Assert.AreEqual(2, c[1]);
            Assert.AreEqual(3, c[2]);
            Assert.AreEqual(5, c[3]);
            Assert.IsFalse(c.IsValid());

            c[0] = 0.1;
            Assert.AreEqual(0.1, c[0]);
            c[1] = 0.2;
            Assert.AreEqual(0.2, c[1]);
            c[2] = 0.3;
            Assert.AreEqual(0.3, c[2]);
            c[3] = 0.5;
            Assert.AreEqual(0.5, c[3]);
        }
Esempio n. 25
0
            /// <summary>
            /// Export Component's color property
            /// </summary>
            FbxProperty ExportColorProperty(FbxObject fbxObject, Color value, string name, string label)
            {
                // create a custom property for component value
                var fbxProperty = FbxProperty.Create(fbxObject, Globals.FbxColor4DT, name, label);

                if (!fbxProperty.IsValid())
                {
                    throw new System.NullReferenceException();
                }

                FbxColor fbxColor = new FbxColor(value.r, value.g, value.b, value.a);

                fbxProperty.Set(fbxColor);

                // Must be marked user-defined or it won't be shown in most DCCs
                fbxProperty.ModifyFlag(FbxPropertyFlags.EFlags.eUserDefined, true);
                fbxProperty.ModifyFlag(FbxPropertyFlags.EFlags.eAnimatable, true);

                return(fbxProperty);
            }
Esempio n. 26
0
        static void ReadColor(MeshData data)
        {
            FbxLayerElementVertexColor pVertexColors = data.Mesh.GetElementVertexColor();

            if (pVertexColors == null)
            {
                for (int i = 0; i < data.Vertices.Length; i++)
                {
                    data.Vertices[i].Vertex.Color = new ColorValue(1, 1, 1);
                }
                return;
            }

            var mappingMode = pVertexColors.GetMappingMode();

            if (!CheckPolygonVertexOrControlPoint(mappingMode))
            {
                FbxImportLog.LogWarning(data.Node, $"has unsupported VertexColors mapping mode: {pVertexColors.GetMappingMode()}");
                return;
            }
            data.VertexComponents |= StandardVertex.Components.Color;
            var indexArray  = pVertexColors.GetReferenceMode() != FbxLayerElement.EReferenceMode.eDirect ? pVertexColors.GetIndexArray() : null;
            var directArray = pVertexColors.GetDirectArray();

            for (int i = 0; i < data.Vertices.Length; i++)
            {
                ref VertexInfo vertex = ref data.Vertices[i];
                FbxColor       color  = null;
                switch (pVertexColors.GetMappingMode())
                {
                case FbxLayerElement.EMappingMode.eByPolygonVertex:
                    color = directArray.GetAt(indexArray?.GetAt(vertex.PolygonVertexIndex) ?? vertex.PolygonVertexIndex);
                    break;

                case FbxLayerElement.EMappingMode.eByControlPoint:
                    color = directArray.GetAt(indexArray?.GetAt(vertex.ControlPointIndex) ?? vertex.ControlPointIndex);
                    break;
                }
                data.Vertices[i].Vertex.Color = color?.ToColorValue() ?? new ColorValue(1, 1, 1);
            }
Esempio n. 27
0
        public FbxColor GetAmbientColor()
        {
            FbxColor ret = new FbxColor(FbxWrapperNativePINVOKE.FbxGlobalSettings_GetAmbientColor(swigCPtr), true);

            return(ret);
        }
Esempio n. 28
0
        public FbxColor RemoveLast()
        {
            FbxColor ret = new FbxColor(FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_RemoveLast(swigCPtr), true);

            return(ret);
        }
Esempio n. 29
0
        public FbxColor at(int pIndex)
        {
            FbxColor ret = new FbxColor(FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_at(swigCPtr, pIndex), true);

            return(ret);
        }
Esempio n. 30
0
        internal static bool IsValidColor(FbxColor c)
        {
            bool ret = NativeMethods.IsValidColor(c);

            return(ret);
        }