Exemple #1
0
        MaterialInformation GetMaterialProperties(IMtl material, MessageMaterialRequest request)
        {
            if (material == null)
            {
                return null;
            }

            if (request.m_materialIndex < 0)
            {
                return GetMaterialProperties(material);
            }

            return GetMaterialProperties(material.GetSubMtl(request.m_materialIndex));
        }
Exemple #2
0
 IEnumerable<MaterialInformation> GetMaterials(MessageMaterialRequest request)
 {
     if (request.m_nodeName != null)
     {
         foreach (var node in GetNode(request.m_nodeName))
         {
             yield return GetMaterialProperties(node.Mtl, request);
         }
     }
     if (request.m_handle > 0)
     {
         yield return GetMaterialProperties(_gi.Animatable.GetAnimByHandle(new UIntPtr(request.m_handle)) as IMtl, request);
     }
 }