Giter Site home page Giter Site logo

fbxsharp's Introduction

FbxSharp Build Status NuGet

A pure C# library for loading FBX files

Description

FbxSharp was deliberately patterned after Autodesk’s FBX SDK, though written entirely in C# rather than C++. In general, the classes of FbxSharp match corresponding ones in the SDK, with the difference of not having the “Fbx” prefix on the name of the class. But of course, there are plenty of special cases. ;) Anyways, if you’re familiar with using the SDK, you should be able to figure out FbxSharp without any difficulty.

FbxSharp doesn't handle binary files yet, so you have to convert them to ascii. Also, it's only been only tested against file format version 2013.3, so convert to that while you're at it.

There's an example of how to use the library here: https://github.com/izrik/ChamberLib.FbxSharp/blob/master/FbxModelImporter.cs#L41

Future work will go towards implementing the rest of the api, implementing other versions of the api, and supporting additional file formats.

SDK Interface Versions Implemented:

  • 2020.0.1
  • 2019.5
  • 2019.2
  • 2019.0
  • 2018.1.1
  • 2018.0
  • 2017.1
  • 2017.0
  • 2016.1.2
  • 2016.1
  • 2016
  • 2015
  • 2014.2.1
  • 2014.1
  • 2013.3

File Versions Supported:

[ ] Version ID x.y SDK version(s) Notes
  • [ ]|7700|7.7|2020, 2019.5|

  • [ ]|7600|7.6|

  • [ ]|7500|7.5|2016.1.2 through 2019.2|

  • [ ]|7400|7.4|2014, 2015

  • [X]|7300|7.3|2013.3

  • [ ]|7200|7.2|

  • [ ]|7100|7.1|

  • [ ]|7099|||Compatible with 7.1, and taken as such

  • [ ]|7000|||Compatible with 7.1, and taken as such

  • [ ]|6100|6.1|

  • [ ]|6000|6.0|

  • [ ]|5800|5.8|

  • [ ]|5000|5.0|

  • [ ]|4050|4.5|

  • [ ]|4001|4.01|

  • [ ]|4000|4.0|

  • [ ]|3001|3.01|

  • [ ]|3000|3.0|

  • [ ]|2001|2.01|

  • [ ]|2000|2.0|

  • Ascii

  • Binary

fbxsharp's People

Contributors

giuliorm avatar izrik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fbxsharp's Issues

Contribution guidelines

CONTRIBUTORS.md or CONTRIBUTING.md file with general guidelines for development. Should include necessary steps to get a dev machine ready to work (i.e. install .NET/mono; nuget and nunit command-line programs). Should include instructions for building the code. Should include checklist to be completed before releases are cut.

Travis release failure - FbxPrint not in build output

Travis builds the FbxSharpBuild.sln solution. The release.sh script expects the FbxPrint.exe tool to be present. However, the FbxPrint project file is not included in the solution, so it doesn't get built, so nuget can't package it up when releasing.

Numbers parsing

Number.cs fails on string input: "0.000000000000000".
It says, that the "The string cannot be interpreted as a snumber" and throws ArgumentException, but there is actually a number in given string. Following lines in Number.cs:

public struct Number
    {
        public Number(string str)
        {
            if (string.IsNullOrWhiteSpace(str)) throw new ArgumentNullException("s");

            StringRepresentation = str;

            double d;
            if (double.TryParse(str, out d))
                AsDouble = d;
            else
                AsDouble = null;

            long l;
            if (long.TryParse(str, out l))
                AsLong = l;
            else
                AsLong = null;

            if (!AsLong.HasValue && !AsDouble.HasValue)
            {
                throw new ArgumentException("The string cannot be interpreted as a snumber", "str");
            }
        }

Load binary files

FbxSharp currently can only load ascii files. This means that a binary file must be converted to ascii before it can be opened. Some fbx exporters only output binary files. In order to better support those cases, FbxSharp should be able to load binary files as well.

Parameterize FbxVisitor

Collector uses FbxVisitor to traverse the object graph. This works well enough, but we have to store the collected objects in an instance field. That makes re-using a Collector cumbersome. If we could pass additional parameters to the Visit and Accept* methods, we wouldn't need the instance field.

FbxExporter Wrapper

I noticed the FbxExporter wrapper class is missing from this project, unless I'm mistaken. Are there plans to include this in future commits?

InvalidOperationException on Object's empty values

Given FBX Object

Model: "Model::Camera Switcher", "CameraSwitcher" {
		Version: 232
		MultiLayer: 0
		MultiTake: 1
		CameraIndexName:
	}

Parser.cs fails with InvalidOperationException (method ReadObject())on the line with CameraIndexName: , because the value is missing.
In this case should the FBX be considered invalid or the behavior of the parser is invalid and should somehow be corrected?

Test DisconnectAllSrcObject<T> and DisconnectAllDstObject<T> failure modes

what are the failure modes?
if a single src/dst object fails to be disconnected, that fails the whole thing, right?
but if a single src/dst object fails to be disconnected, does that stop the process of disconnecting objects after it?
if so, what is the order in which the objects are considered?

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.