예제 #1
0
        public static IEnumerable <Material> SelectSingleMaterial(string name)
        {
            IMaterial material = null;

            try
            {
                material = MaterialAdapter.CreateMaterial(ProductClient.GetMaterialByName(name));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                yield break;
            }

            yield return(material.Unwrap());
        }
예제 #2
0
 public static IEnumerable <IMaterial> SelectSingleProjectSpecific(string name, bool includeStandardMaterials)
 {
     yield return(MaterialAdapter.CreateMaterial(ProjectClient.GetMaterialForCurrentProjectByName(name, includeStandardMaterials)));
 }