Skip to content

A library to import XNALara (.xps/.mesh/.mesh.ascii) files

Notifications You must be signed in to change notification settings

crystalboxes/xpsimport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xpsimport

A rust library for parsing XPS/XnaLara meshes. This repository is used for making XNALaraUnity to work. Supports both binary and ASCII formats.

Usage

use xpsimport::loader;  
use xpsimport::bone_naming;  
fn main() {  
  if let Ok(model) = loader::open("mesh.xps",   
   bone_naming::BoneNaming::Default, true, true) {  
    for mesh in model.meshes {  
      println!("{}", mesh.name.to_str().unwrap());  
    }  
  }  
}

A C interface is provided along with cmake config to be easily integrated with your cpp project. Use this cmake function:

target_link_xpsimport_library(target_name)

C API usage:

#include  <stdio.h>
#include  <xpsimport.h>

int  main() {
  XPSData *mdl =  xps_load_model("C:/test/carl.mesh");
  int error =  xps_get_error(mdl);
  const  char* mesh_name =  xps_get_mesh_name(mdl, 0);
  printf("%s", mesh_name);
  printf("a%d", error);
  return  0;
}

A full info on available API functions is provided in xpsimport.h

License

This project is licensed under the MIT License - see the LICENSE file for details

References

XPS by core-design XNALaraMesh by johnzero7

About

A library to import XNALara (.xps/.mesh/.mesh.ascii) files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published