Exemple #1
0
 public override string GetExportName()
 {
     if (m_ReferenceImage != null)
     {
         return(m_ReferenceImage.GetExportName());
     }
     else
     {
         return(Path.GetFileNameWithoutExtension(FileName));
     }
 }
Exemple #2
0
        static DynamicExportableMaterial CreateImageQuadMaterial(ReferenceImage ri)
        {
            BrushDescriptor desc = BrushCatalog.m_Instance.GetBrush(kPbrTransparentGuid);

            return(new DynamicExportableMaterial(
                       parent: desc,
                       // GetExportName() not totally guaranteed to be unique; maybe we should detect collisions?
                       durableName: $"image_{ri.GetExportName()}",
                       uniqueName: MakeDeterministicUniqueName(desc.m_Guid, ri, 0),
                       uriBase: Path.GetDirectoryName(ri.FileFullPath))
            {
                BaseColorTex = Path.GetFileName(ri.FileFullPath),
                MetallicFactor = kRefimageMetallicFactor
            });
        }