- Remove
pull_parser::reader
module and items inside.- Trait bounds
R: ParserSource
are now replaced withR: std::io::Read
.
- Trait bounds
- Change type parameters of
pull_parser::any::AnyParser
andpull_parser::v7400::Parser
. - Remove free functions to create parsers, and add inherent methods instead.
- Remove internal dependency to
byteorder
crate.
- Remove
pull_parser::reader
module and items inside.- Trait bounds
R: ParserSource
are now replaced withR: std::io::Read
. - List of removed items:
pull_parser::reader
modulepull_parser::reader::ParserSource
traitpull_parser::reader::PlainSource
typepull_parser::reader::PositionCacheReader
typepull_parser::reader::SeekableSource
type
- Trait bounds
- Change type parameters of
pull_parser::any::AnyParser
andpull_parser::v7400::Parser
.- The parameter type of the parser is simplified. Previously parsers were
{Any,}Parser<{Plain,Seekable}Source<R>>
, but now they are{Any,}Parser<R>
.
- The parameter type of the parser is simplified. Previously parsers were
- Remove free functions to create parsers, and add inherent methods instead.
- List of removed functions and added alternatives:
pull_parser::any::from_reader()
: replaced withpull_parser::any::AnyParser::from_reader()
.pull_parser::any::from_seekable_reader()
: replaced withpull_parser::any::AnyParser::from_seekable_reader()
.pull_parser::v7400::from_reader()
: Replaced withpull_parser::v7400::Parser::from_reader()
.pull_parser::v7400::from_seekable_reader()
: Replaced withpull_parser::v7400::Parser::from_seekable_reader()
.
- List of removed functions and added alternatives:
- Remove internal dependency to
byteorder
crate.
- Add more tree manipulation methods.
- Add more tree manipulation methods.
- The methods below are added:
tree::v7400::Tree::create_node()
tree::v7400::Tree::append()
tree::v7400::Tree::prepend()
tree::v7400::Tree::insert_after()
tree::v7400::Tree::insert_before()
tree::v7400::Tree::detach()
- The methods below are added:
- Add types and methods to traverse nodes in depth-first order.
- Add methods to
Tree
to modify node attributes (not only appending). - Make many (but not all) small methods
#[inline]
. - Make some funcitions
#[must_use]
.
- Add types and methods to traverse nodes in depth-first order.
tree::v7400::DepthFirstTraversed
type is added.tree::v7400::DepthFirstTraverseSubtree
type is added.
- Add methods to
Tree
to modify node attributes (not only appending).tree::v7400::Tree
has now three new methods:get_attribute_mut()
,take_attributes_vec()
, andset_attributes_vec()
.
- Make many (but not all) small methods
#[inline]
. - Make some funcitions
#[must_use]
.
- Bump minimum supported Rust version to 1.56.0.
- Iterator types returned by
tree::v7400::NodeHandle::{children, children_by_name}
now have a name. - All iterator types now have
std::iter::FusedIterator
impl. tree::v7400::NodeHandle::first_child_by_name()
is added.- Now some items on docs.rs have pretty badges indicating the items is only
enabled with some features.
- This won't affect any builds by other users.
cargo doc --all-features
and other commands should still run successfully with stable toolchain.
- This won't affect any builds by other users.
- Bump internal dependencies.
tree::v7400::NodeHandle::first_child_by_name()
is added.node.first_child_by_name(name)
returns the same result asnode.children_by_name(name).next()
.
- Fixed incorrect attribute type value being written by the writer.
- Bump minimum supported Rust version to 1.56.0.
- Iterator types returned by
tree::v7400::NodeHandle::{children, children_by_name}
now have a name.NodeHandle::children()
returnsChildren<'_>
.NodeHandle::children_by_name()
returnsChildrenByName<'_>
.- By this change, now these iterators can be included in other types as a field.
- All iterator types defined by this crate now have
std::iter::FusedIterator
impl.
- Bump minimum supported Rust version to 1.49.
- Bump internal dependencies.
- Minimum supported Rust version is bumped to 1.40.0.
- Add an FBX version field to
any::AnyTree::V7400
variant (372a2f6e0314eed86cc2c493d2e2fc86aa226781). - Add
any::AnyTree::fbx_version()
method (372a2f6e0314eed86cc2c493d2e2fc86aa226781).
- Add an FBX version field to
any::AnyTree::V7400
variant (372a2f6e0314eed86cc2c493d2e2fc86aa226781).- This is mainly used by newly added
any::AnyTree::fbx_version()
, but also useful for users to know FBX version.- For example, when users want to re-export the tree, they might want to know FBX version of the source document.
- This is mainly used by newly added
- Add
any::AnyTree::fbx_version()
method (372a2f6e0314eed86cc2c493d2e2fc86aa226781).- Using this, users can get FBX version of the tree even if the
AnyTree
variant is unknown for users. - By this method, users can emit meaningful error message if the tree is returned as unknown variant.
- Using this, users can get FBX version of the tree even if the
- Use
#[non_exhaustive]
instead of hidden dummy variants for enums (b4c0cf53fcefb2dc13850e09ac1ff15bc57a68e5).- Users won't affected by this internal change.
pull_parser::error::{DataError, OperationError, Warning}
is now nonexhaustive.- This would make some of future changes non-breaking.
- Support parsing nodes with missing or extra node end markers.
- Previously, they are ignored or causing critical errors. Now they are notified as warnings, and users can continue parsing.
- Two new variants
Warning::{ExtraNodeEndMarker, MissingNodeEndMarker}
are added topull_parser::error::Warning
type.- Note that
Warning
have been nonexhaustive since this release.
- Note that
- Deprecated items are removed.
low::FbxHeader::read_fbx_header()
pull_parser::v7400::attribute::DirectAttributeValue
pull_parser::error::{DataError, OperationError, Warning}
is now nonexhaustive (d0651118feabf842f9495da626ccb127090db331).- This would make some of future changes non-breaking.
- Support parsing nodes with missing or extra node end markers
(8c3d8b7f210fe8422784ef86b468e5331bb0c2ee).
- Previously, missing node end markers caused errors, and extra node end markers were silently ignored. Now they are notified as warnings. Users can choose whether to continue or abort processing.
- Two new variants
Warning::{ExtraNodeEndMarker, MissingNodeEndMarker}
are added topull_parser::error::Warning
type.- Note that
Warning
have been nonexhaustive since this release.
- Note that
- Deprecated items are removed (9e38b4217d33ed8bca3f7e8b11d210845a4fa8c1).
low::FbxHeader::read_fbx_header()
pull_parser::v7400::attribute::DirectAttributeValue
- Documents are improved a little.
- Manual tree construction (without using parser) is now supported.
- You can add nodes and attributes manually to the tree at runtime.
- You can describe the tree using
tree_v7400!
macro at compile time.
- FBX binary writer is added.
- Tiny improvements:
low::v7400::AttributeValue
implementsFrom<_>
for some types.- Strict equality check is added for trees, nodes, and attribute values.
tree::v7400::Tree::debug_tree()
is added.
- Now rustc-1.34 or later is required.
- To use
std::convert::{TryFrom, TryInto}
.
- To use
- Manual tree construction support is added (64f70b051c30, 39c4fabad119).
- Methods to add new nodes and attributes are added.
- Complete modification is not yet supported, for example modifying already added attributes or removing nodes.
tree_v7400!
macro is added to construct tree easily. See documentation for detail.
- FBX binary writer is added (e1cb2a232d19, 33d9ac3a589c, d5dc779c0bd4,
6cddca849a4f, 8c84359d2578).
writer::v7400::binary
contains FBX binary writer stuff.- This can be enabled by
writer
feature. write_v7400_binary!
macro is also added. See the documentation for detail.
low::v7400::AttributeValue
implementsFrom<_>
for some types (a54226534a73, 6546d62fd38a).- Primitive types:
bool
,i16
,i32
,i64
,f32
,f64
. - Vector types:
Vec<bool>
,Vec<i32>
,Vec<i64>
,Vec<f32>
,Vec<f64>
,Vec<u8>
. - Slice types:
&[bool]
,&[i32]
,&[i64]
,&[f32]
,&[f64]
,&[u8]
. - Special types:
String
,&str
.
- Primitive types:
- Strict equality check is added for trees, nodes, and attribute values
(8784d7609d8e).
- Trees:
tree::v7400::Tree::strict_eq()
. - Nodes:
tree::v7400::NodeHandle::strict_eq()
. - Attributes:
low::v7400::AttributeValue::strict_eq()
. - These checks compares
f32
andf64
bitwise. This meansNAN == NAN
situation is possible.
- Trees:
tree::v7400::Tree::debug_tree()
is added (4524b4dc4a99).- This returns pretty-printable object of the tree.
- It dumps human-readable tree structure.
- Default
Debug
implementation forTree
is hard to read because it dumps arena and interned string table.
- Now rustc-1.34 or later is required.
- To use
std::convert::TryFrom
. - Strictly, this is a breaking change (for users with rustc-1.33 or below), but not breaking for users with latest rustc.
- Currently, only
writer
module usesTryFrom
. Users not usingwriter
feature won't be affected for now, but they could encounter compile error in future version of fbxcel.
- To use
- Longer lifetime for iterator returned by
tree::v7400::NodeHandle::children_by_name()
.
- Longer lifetime for iterator returned by
tree::v7400::NodeHandle::children_by_name()
(08ab27a7fc23).- Previously, lifetime of the returned iterator should be same as or shorter
than the
NodeHandle
object. This was unnecessary restriction. - Now the restriction is relaxed. The iterator can live longer, and have
the same lifetime as
Tree
object.
- Previously, lifetime of the returned iterator should be same as or shorter
than the
- A bug around
pull_parser::v7400::Parser::skip_current_node()
is fixed.
pull_parser::skip_current_node()
now updates parser status correctly (20f4d82d676a).- Previously, internal state of the parser is not updated correctly after
skip_current_node()
. This can cause parser error for correct FBX file, because the parser cannot track correct end position of the next node. This problem is now fixed. - This was overlooked when 5e8d3fbd97e5 was merged...
- Previously, internal state of the parser is not updated correctly after
- Docs are made more detailed, and some examples are added.
- A bug around
pull_parser::v7400::Parser::skip_current_node()
is fixed.
pull_parser::v7400::Parser::is_used()
is added (f55e385c745e).
low::FbxHeader::read_fbx_header()
is renamed toload()
(62f8af93a701). The old name is deprecated.pull_parser::skip_current_node()
now updates parser status correctly (5e8d3fbd97e5).- Previously the parser status is not updated correctly after
skip_current_node()
. This can cause parser error for correct FBX file, because the parser was not able to determine presence of node end marker. This problem is now fixed.
- Previously the parser status is not updated correctly after
tree::v7400::Loader::load()
now check parser status more precisely (f55e385c745e).- Previously, the check is loose and some of already used parser could be accepted. Now this check is fixed perfectly, and invalid parser is rejected as expected.
low::FbxHeader::read_fbx_header()
is deprecated (62f8af93a701).- Use
low::FbxHeader::load()
instead.
- Use
dom
module is now split to another crate,fbxcel-dom
.- If you want to interpret and render FBX data, use it.
- Object properties are supported.
- Very basic support, but would be useful.
- Huge refactoring around attribute values.
- Many types, modules, and functions are renamed and moved.
{pull_parser,tree}::any
module is added.- They provide mostly version-independent way to read and load the FBX data.
pull_parser::v7400::attribute::VisitAttribute
is changed topull_parser::v7400::attribute::LoadAttribute
.VisitAttributeValue::visit_*
is renamed toLoadAttribute::load_*
.
pull_parser::v7400::attribute::Attributes::visit_*
is renamed toAttributes::load_*
.pull_parser::ParserVersion
is now nonexhaustive.- By this change, it is non-breaking change to add new parser version in future.
- Attributes slice returned by
tree::v7400::NodeHandle::attributes()
now have same lifetime as the tree.- The lifetime was mistakenly set too short in previous implementation, but this is now fixed.
pull_parser::v7400::attribute:DirectAttributeValue
is now deprecated.- It is moved to
low::v7400::AttributeValue
. - Now
DirectAttributeValue
is a type alias tolow::v7400::AttributeValue
. - The type alias will exist for a while, but will be removed in future version.
- It is moved to
dom
module is completely rewritten.- No compatibility with old (0.2.0)
dom
module.
- No compatibility with old (0.2.0)
tree
module is added.- This can be enabled with
tree
feature.
- This can be enabled with
dom
module is completely rewritten.- No compatibility with old (0.2.0)
dom
module.
- No compatibility with old (0.2.0)
tree
module is added.- This can be enabled with
tree
feature. tree::v7400::Tree
manages raw FBX tree data, but do not touch their meanings.
- This can be enabled with
pull_parser::v7400::attribute::DirectAttributeValue::get_{{types}}_or_type()
are added.{{types}}
are:bool
,i16
,i32
,i64
,f32
,f64
,arr_bool
,arr_i32
,arr_i64
,arr_f32
,arr_f64
,string
, andbinary
.- This enables using type info at method chain, for example
let val = attr.get_i64_or_type().map_err(|ty| Error::new("Expected i64 but got {:?}", ty))?;
.
- Syntactic position information for pull parser is supported. Syntactic position contains node path, node index, attribute index, etc. This will make errors and warnings more detailed and useful.
- Quite basic DOM is implemented. This is not yet practically usable.
pull_parser::v7400::Parser::set_warning_handler()
now requires'static + FnMut(Warning, &SyntacticPosition) -> Result<()>
as warning hander (note that&SyntacticPosition
argument is added).- By this change, warning handler can use position information where the warning happened.
low::FbxHeader::read_fbx_header
now takesimpl std::io::Read
instead of a type parameter.
dom
module is added.- This can be enabled by
dom
feature, but this is not yet practically usable.
- This can be enabled by
pull_parser::SyntacticPosition
is added.pull_parser::error::Error::position()
is added.pull_parser::v7400::Parser::skip_current_node()
is added.pull_parser::v7400::attribute::Attributes::iter{,_buffered}
andpull_parser::v7400::attribute::iter
module are added.pull_parser::v7400::attribute::DirectAttributeValue::get_{{types}}()
are added.{{types}}
are:bool
,i16
,i32
,i64
,f32
,f64
,arr_bool
,arr_i32
,arr_i64
,arr_f32
,arr_f64
,string
, andbinary
.
Totally rewritten.