pub struct ModelRoot {
pub models: Models,
pub buffers: ModelBuffers,
pub image_textures: Vec<ImageTexture>,
pub skeleton: Option<Skeleton>,
}Fields§
§models: Models§buffers: ModelBuffersThe vertex data for each Model.
image_textures: Vec<ImageTexture>The textures selected by each Material. This includes all packed and embedded textures after combining all mip levels.
skeleton: Option<Skeleton>Implementations§
Source§impl ModelRoot
Apply the values from this model onto the original mxmd and msrd.
impl ModelRoot
Apply the values from this model onto the original mxmd and msrd.
Some of the original values will be retained due to exporting limitations. For best results, use the Mxmd and Msrd used to initialize this model.
If no edits were made to this model, the resulting files will attempt to recreate the originals used to initialize this model as closely as possible.
pub fn to_mxmd_model( &self, mxmd: &Mxmd, msrd: &Msrd, ) -> Result<(Mxmd, Msrd), CreateModelError>
Sourcepub fn to_mxmd_model_files(
&self,
mxmd: &Mxmd,
) -> Result<(Mxmd, VertexData, Vec<ExtractedTexture<Mibl, TextureUsage>>), CreateModelError>
pub fn to_mxmd_model_files( &self, mxmd: &Mxmd, ) -> Result<(Mxmd, VertexData, Vec<ExtractedTexture<Mibl, TextureUsage>>), CreateModelError>
Similar to Self::to_mxmd_model but does not compress the new data or update streaming information.
Source§impl ModelRoot
impl ModelRoot
Sourcepub fn from_mxmd_model(
mxmd: &Mxmd,
skel: Option<Skel>,
streaming_data: &StreamingData<'_>,
shader_database: Option<&ShaderDatabase>,
) -> Result<Self, LoadModelError>
pub fn from_mxmd_model( mxmd: &Mxmd, skel: Option<Skel>, streaming_data: &StreamingData<'_>, shader_database: Option<&ShaderDatabase>, ) -> Result<Self, LoadModelError>
Load models from parsed file data for Xenoblade 1 DE, Xenoblade 2, or Xenoblade 3.
Sourcepub fn from_mxmd_model_legacy(
mxmd: &MxmdLegacy,
casmt: Option<Vec<u8>>,
hkt: Option<&Hkt>,
shader_database: Option<&ShaderDatabase>,
) -> Result<Self, LoadModelLegacyError>
pub fn from_mxmd_model_legacy( mxmd: &MxmdLegacy, casmt: Option<Vec<u8>>, hkt: Option<&Hkt>, shader_database: Option<&ShaderDatabase>, ) -> Result<Self, LoadModelLegacyError>
Load models from legacy parsed file data for Xenoblade X.
Trait Implementations§
impl StructuralPartialEq for ModelRoot
Auto Trait Implementations§
impl Freeze for ModelRoot
impl RefUnwindSafe for ModelRoot
impl Send for ModelRoot
impl Sync for ModelRoot
impl Unpin for ModelRoot
impl UnwindSafe for ModelRoot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more