hgame 0.26.4

CG production management structs, e.g. of assets, personnels, progress, etc.
Documentation
use std::fmt;

// ----------------------------------------------------------------------------
#[derive(Debug, Clone, Default, PartialEq, strum::AsRefStr, strum::EnumIter)]
/// Asset's "level of details", -- its resolution --, depending on its purpose in CG pipeline.
pub enum AssetLod {
    #[strum(serialize = "Proxy Res")]
    ProxyRes,
    #[strum(serialize = "Low Res")]
    LowRes,
    #[default]
    #[strum(serialize = "Medium Res")]
    MediumRes,
    #[strum(serialize = "High Res")]
    HighRes,
    #[strum(serialize = "Stand-in Res")]
    StandInRes,
    #[strum(serialize = "FX Res")]
    FXRes,
    #[strum(serialize = "Cloth Res")]
    ClothRes,
}

impl AssetLod {
    /// LEGACY DESIGN: DO NOT change display outputs.
    pub fn as_str(&self) -> String {
        format!("{}", self)
    }
}

impl fmt::Display for AssetLod {
    /// LEGACY DESIGN: DO NOT change display outputs.
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        let lod = match self {
            Self::ProxyRes => "proxyRes",
            Self::LowRes => "loRes",
            Self::MediumRes => "medRes",
            Self::HighRes => "hiRes",
            Self::StandInRes => "standinRes",
            Self::FXRes => "fxRes",
            Self::ClothRes => "clothRes",
        };
        write!(f, "{}", lod)
    }
}