Example #1
0
        public static FDatasmithFacadeTexture ParseTexture(RhinoTextureInfo TextureInfo)
        {
            Texture RhinoTexture = TextureInfo.RhinoTexture;

            if (!TextureInfo.IsSupported())
            {
                return(null);
            }

            FDatasmithFacadeTexture TextureElement = new FDatasmithFacadeTexture(TextureInfo.Name);

            TextureElement.SetLabel(TextureInfo.Label);
            TextureElement.SetFile(TextureInfo.FilePath);
            TextureElement.SetTextureFilter(FDatasmithFacadeTexture.ETextureFilter.Default);
            TextureElement.SetRGBCurve(1);
            TextureElement.SetTextureAddressX(RhinoTexture.WrapU == TextureUvwWrapping.Clamp ? FDatasmithFacadeTexture.ETextureAddress.Clamp : FDatasmithFacadeTexture.ETextureAddress.Wrap);
            TextureElement.SetTextureAddressY(RhinoTexture.WrapV == TextureUvwWrapping.Clamp ? FDatasmithFacadeTexture.ETextureAddress.Clamp : FDatasmithFacadeTexture.ETextureAddress.Wrap);

            FDatasmithFacadeTexture.ETextureMode TextureMode = FDatasmithFacadeTexture.ETextureMode.Diffuse;
            if (RhinoTexture.TextureType == TextureType.Bump)
            {
                TextureMode = FDatasmithFacadeTexture.ETextureMode.Bump;
            }

            TextureElement.SetTextureMode(TextureMode);

            return(TextureElement);
        }
 public FDatasmithFacadeTexture.ETextureMode GetTextureMode()
 {
     FDatasmithFacadeTexture.ETextureMode ret = (FDatasmithFacadeTexture.ETextureMode)DatasmithFacadeCSharpPINVOKE.FDatasmithFacadeTexture_GetTextureMode(swigCPtr);
     return(ret);
 }
 public void SetTextureMode(FDatasmithFacadeTexture.ETextureMode Mode)
 {
     DatasmithFacadeCSharpPINVOKE.FDatasmithFacadeTexture_SetTextureMode(swigCPtr, (int)Mode);
 }
Example #4
0
    public static FDatasmithFacadeTexture CreateSimpleTextureElement(string InTextureFilePath, FDatasmithFacadeTexture.ETextureMode InTextureMode)
    {
        global::System.IntPtr   cPtr = DatasmithFacadeCSharpPINVOKE.FDatasmithFacadeMaterialsUtils_CreateSimpleTextureElement__SWIG_0(InTextureFilePath, (int)InTextureMode);
        FDatasmithFacadeTexture ret  = (cPtr == global::System.IntPtr.Zero) ? null : new FDatasmithFacadeTexture(cPtr, false);

        return(ret);
    }
Example #5
0
 public void SetTextureMode(FDatasmithFacadeTexture.ETextureMode InTextureMode)
 {
     DatasmithFacadeCSharpPINVOKE.FDatasmithFacadeMaterialsUtils_FWeightedMaterialExpressionParameters_SetTextureMode(swigCPtr, (int)InTextureMode);
 }