openusd-build 0.8.0

Generates Rust schema views from OpenUSD schema.usda files, for use as a build dependency
Documentation
// WARNING: THIS FILE IS GENERATED BY openusd-build. DO NOT EDIT.
// Generated from schema.usda.

/// The strings this library names things by.
///
/// A token's value is what a stage actually reads; the constant is a
/// name for it, so an application can say what it means instead of
/// retyping a string.
pub mod tokens {
    /// `"big"`: `Marked`.
    pub const BIG: &str = "big";
    /// `"blocked"`: `Marked`.
    pub const BLOCKED: &str = "blocked";
    /// `"file"`: `Marked`.
    pub const FILE: &str = "file";
    /// `"limit"`: `Marked`.
    pub const LIMIT: &str = "limit";
    /// `"loose"`: `Marked`.
    pub const LOOSE: &str = "loose";
    /// `"middling"`: `Marked`.
    pub const MIDDLING: &str = "middling";
    /// `"plain"`: `Marked`.
    pub const PLAIN: &str = "plain";
    /// `"small"`: `Marked`.
    pub const SMALL: &str = "small";
    /// `"spin"`: `Marked`.
    pub const SPIN: &str = "spin";
    /// `"tiny"`: `Marked`.
    pub const TINY: &str = "tiny";
    /// `"when"`: `Marked`.
    pub const WHEN: &str = "when";
    /// `"Marked"`: the schema identifier and family of `Marked`.
    pub const MARKED: &str = "Marked";
    /// `"Typed"`: the schema identifier and family of `Typed`.
    pub const TYPED: &str = "Typed";
}

/// The library's name, which is the family its declarations register
/// under.
pub const LIBRARY_NAME: &str = "testValues";

/// What this library declares, ready to register: its schemas, and
/// the metadata fields and kinds declared beside them.
///
/// Hand it to
/// [`SchemaRegistryBuilder::register`](::openusd::usd::SchemaRegistryBuilder::register):
/// a stage opened with the resulting registry resolves the fallbacks
/// of the schemas and metadata fields declared here, answers `is_a`
/// along the schemas' inheritance, and counts a declared kind as its
/// base kind. One opened without it knows none of them, so the typed
/// constructors answer `None`.
pub const SCHEMAS: &::openusd::usd::SchemaFamily<'static> = &::openusd::usd::SchemaFamily::new(
    LIBRARY_NAME,
    &[
        ::openusd::usd::SchemaDecl::new(
                "Typed",
                ::openusd::usd::SchemaKind::AbstractBase,
            )
            .bases(&["SchemaBase"]),
        ::openusd::usd::SchemaDecl::new(
                "Marked",
                ::openusd::usd::SchemaKind::AbstractTyped,
            )
            .bases(&["Typed"])
            .properties(
                &[
                    ::openusd::usd::PropertyDecl::attribute("blocked", "double")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::ValueBlock,
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::relationship("plain").uniform(),
                    ::openusd::usd::PropertyDecl::relationship("loose").varying(),
                    ::openusd::usd::PropertyDecl::attribute("big", "matrix4d")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Matrix4d(
                                        ::openusd::gf::Matrix4d([
                                            1f64, 0f64, 0f64, 0f64, 0f64, 1f64, 0f64, 0f64, 0f64, 0f64,
                                            1f64, 0f64, 0f64, 0f64, 0f64, 1f64,
                                        ]),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute("small", "matrix2d")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Matrix2d(
                                        ::openusd::gf::Mat2d([1f64, 0f64, 0f64, 1f64]),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute("middling", "matrix3d")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Matrix3d(
                                        ::openusd::gf::Mat3d([
                                            1f64, 0f64, 0f64, 0f64, 1f64, 0f64, 0f64, 0f64, 1f64,
                                        ]),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute("spin", "quath")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Quath(
                                        ::openusd::gf::quath(
                                            ::openusd::gf::f16::from_bits(15360u16),
                                            ::openusd::gf::f16::from_bits(0u16),
                                            ::openusd::gf::f16::from_bits(0u16),
                                            ::openusd::gf::f16::from_bits(0u16),
                                        ),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute("when", "timecode")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::TimeCode(
                                        ::openusd::sdf::TimeCode(3f64),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute("tiny", "half")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Half(
                                        ::openusd::gf::f16::from_bits(14336u16),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute("file", "asset")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::AssetPath(
                                        ::openusd::sdf::AssetPath::new("./texture.png"),
                                    ),
                                ),
                            ],
                        ),
                    ::openusd::usd::PropertyDecl::attribute("limit", "float")
                        .varying()
                        .fields(
                            &[
                                ::openusd::usd::Field::new(
                                    "default",
                                    || ::openusd::sdf::Value::Float(1f32),
                                ),
                            ],
                        ),
                ],
            )
            .fields(
                &[
                    ::openusd::usd::Field::new(
                        "assetInfo",
                        || ::openusd::sdf::Value::Dictionary(
                            ::openusd::sdf::Dictionary::from([
                                (
                                    ::std::string::String::from("version"),
                                    ::openusd::sdf::Value::String(
                                        ::std::string::String::from("1"),
                                    ),
                                ),
                                (
                                    ::std::string::String::from("weights"),
                                    ::openusd::sdf::Value::DoubleVec(::std::vec![0.5f64, 1f64]),
                                ),
                            ]),
                        ),
                    ),
                ],
            ),
    ],
);