Coder Social home page Coder Social logo

fbx_direct's Introduction

fbx_direct, a low-level FBX parser for Rust

DEPRECATED. Use fbxcel instead.

fbx_direct is an FBX library for Rust programming language. It is heavily inspired by Java Streaming API for XML (StAX) and xml-rs.

This library currently contains event reader for Binary FBX and event writer for ASCII/Binary FBX like xml-rs. ASCII FBX reader is not yet supported.

This library supports FBX 7.4 or later.

TODO

reader
  • ✓ Binary FBX parser

  • ❏ ASCII FBX parser

writer
  • ✓ Binary FBX writer

  • ✓ ASCII FBX writer

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Release Notes

0.6.4

New feature and improvements
Bump dependencies

byteorder 0.9 → 0.10, env_logger 0.5.10 → 0.6

Rewrite in Rust edition 2018

Applied cargo fix and fixed clippy lints.

0.6.3

New feature and improvements
Bump many dependencies

#2, thanks @VictorKoenders

0.6.2

No interface changes.

0.6.1

New feature and improvements
Bump byteorder crate version

0.5 → 0.6

0.6.0

Changes and deprecations
Changed interface of common::OwnedProperty::into_*()

Their return types are changed from Option<Foo> to Result<Foo, OwnedProperty>. Now they return Err(self) on conversion failure.

0.5.1

Fixes
Invalid left-brace '{' emission of FBX ascii writer

Sometimes '{' is missing in output data. Now this is fixed.

0.5.0

Changes and deprecations
writer::Error::DataTooLarge variant is added

When a data size (number of elements, byte offset, byte size, etc.) is too large for the format of writing file, this error will be emitted.

New feature and improvements
Support FBX 7.5

From FBX 7.5.0, specification of binary format changed a little. Now, binary reader/writer supports it. Of course, FBX 7.4 is also supported.

0.4.0

Changes and deprecations
Relicenced under MIT and Apache-2.0

See Issue #1.

Changed interface of common::{OwnedProperty,Property}::{get,into}_binary()

Now their type is fn get_binary(&self, from_string: bool) → Option<Cow<[u8]>> and fn into_binary(&self, from_string: bool) → Option<Vec<u8>>. Now the function tries to convert string to binary when from_string is true, and doesn’t try when false.

0.3.0

New feature and improvements
ASCII FBX writer became available

Note that some feature (such as ascii representation of node property of boolean vector) is unconfirmed and might be wrong.

writer::EmitterConfig::fbx_version member variable is added

This is used to specify FBX version to export. Default value is None. When None, it is automatically decided by writer if necessary. When it cannot be automatically decided, error will be emitted.

Changes and deprecations
writer::Error::InvalidOption variant is added

When writer is configured with invalid/inconsistent option or inconsistent writer event (e.g. event specifying different version as writer config) is given, this error will be emitted.

0.2.2

New feature and improvements
common::OwnedProperty::into_{bool,i16,i32,i64,f32,f64,vec_bool,vec_i32,vec_i64,vec_f32,vec_f64,string,binary} is added

get_foo converts value safely but not consuming self. into_foo converts value safely consuming self. When both can be used, into_foo is preferred because it is more efficient.

0.2.1

New feature and improvements
common::OwnedProperty::get_{bool,i16,i32,i64,f32,f64,vec_bool,vec_i32,vec_i64,vec_f32,vec_f64,string,binary} is added

get_foo converts value safely but not consuming self. Note that it cannot be used to conversion with loss of information (such as i64 to i32 or f32 to i64), but conversion between f32 and f64 is exceptionally allowed.

0.2.0

  • Binary FBX writer became available.

  • Major changes.

fbx_direct's People

Contributors

lo48576 avatar victorkoenders avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fbx_direct's Issues

Relicense under dual MIT/Apache-2.0

This issue was automatically generated. Feel free to close without ceremony if
you do not agree with re-licensing or if it is not possible for other reasons.
Respond to @cmr with any questions or concerns, or pop over to
#rust-offtopic on IRC to discuss.

You're receiving this because someone (perhaps the project maintainer)
published a crates.io package with the license as "MIT" xor "Apache-2.0" and
the repository field pointing here.

TL;DR the Rust ecosystem is largely Apache-2.0. Being available under that
license is good for interoperation. The MIT license as an add-on can be nice
for GPLv2 projects to use your code.

Why?

The MIT license requires reproducing countless copies of the same copyright
header with different names in the copyright field, for every MIT library in
use. The Apache license does not have this drawback. However, this is not the
primary motivation for me creating these issues. The Apache license also has
protections from patent trolls and an explicit contribution licensing clause.
However, the Apache license is incompatible with GPLv2. This is why Rust is
dual-licensed as MIT/Apache (the "primary" license being Apache, MIT only for
GPLv2 compat), and doing so would be wise for this project. This also makes
this crate suitable for inclusion and unrestricted sharing in the Rust
standard distribution and other projects using dual MIT/Apache, such as my
personal ulterior motive, the Robigalia project.

Some ask, "Does this really apply to binary redistributions? Does MIT really
require reproducing the whole thing?" I'm not a lawyer, and I can't give legal
advice, but some Google Android apps include open source attributions using
this interpretation. Others also agree with
it
.
But, again, the copyright notice redistribution is not the primary motivation
for the dual-licensing. It's stronger protections to licensees and better
interoperation with the wider Rust ecosystem.

How?

To do this, get explicit approval from each contributor of copyrightable work
(as not all contributions qualify for copyright, due to not being a "creative
work", e.g. a typo fix) and then add the following to your README:

## License

Licensed under either of

 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.

and in your license headers, if you have them, use the following boilerplate
(based on that used in Rust):

// Copyright 2016 fbx_direct Developers
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

It's commonly asked whether license headers are required. I'm not comfortable
making an official recommendation either way, but the Apache license
recommends it in their appendix on how to use the license.

Be sure to add the relevant LICENSE-{MIT,APACHE} files. You can copy these
from the Rust repo for a plain-text
version.

And don't forget to update the license metadata in your Cargo.toml to:

license = "MIT OR Apache-2.0"

I'll be going through projects which agree to be relicensed and have approval
by the necessary contributors and doing this changes, so feel free to leave
the heavy lifting to me!

Contributor checkoff

To agree to relicensing, comment with :

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

Or, if you're a contributor, you can check the box in this repo next to your
name. My scripts will pick this exact phrase up and check your checkbox, but
I'll come through and manually review this issue later as well.

  • @l1048576

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.