Age | Commit message (Collapse) | Author |
|
Please update scripts when you do such changes...
|
|
This follows naming convention agreed on in T56648.
|
|
|
|
Differential Revision: https://developer.blender.org/D3746
|
|
Python dictionaries are now ordered by definition, so no need to add
extra thingy here anymore to keep our well-ordered FBX structure.
|
|
Getting textures to work was a bit tricky, since we basically have no
more texture IDs in modern shaders (they are mere nodes).
Modified specular conversion to be quadratic (between FBX Phong exponent
to Pricipled specular factor).
Also fixed several issues in both importers and exporters.
And cleaned up ugly usage of 'mat' short name for materials in exporter
(mat is reserved for matrix in Blneder code in general, 'ma' is short
for material).
|
|
Using new ShaderWrapper from nodes_shader_utils.
Note that porting is not exact same as in 2.7x (which was using
cycles_shader_compat wrapper). New one does not support as many
features, and not in the same exact way (since it's based on Principled
BSDF), but goal here is to have soon a matching nodal material support
in the exporter...
|
|
That's now useless in 2.8, we always 'use cycles' materials. :p
|
|
That happened to work because our FBX object wrappers tend to get
created frist with real data-blocks (and the key of a real and COW
datablock would be the same)... But that definitively wasn't healthy
behavior!
|
|
Now exporting duplis and animation shall work, at least in basic cases
(still have to check more complex ones).
|
|
Default cube scene exports and imports ok (besides missing features like
nodal material handling). Anything else is either known broken, or yet
to be tested. :P
Note that I raised main number of addon version, so that we can keep
track of smaller fixes that can be done in both 2.7x and 2.8 versions of
the addon.
|
|
|
|
Requested in T54050, usually would not add new stuff to FBX but this
looked like totally needed for compo needs...
|
|
Inverse Coefficients decay method was added later, never made it to FBX
exporter.
Note that this is very limited approxiamtion/simplification here, we
cannot really export this correctly.
To be backported to 2.79a.
|
|
Now we offer choices to apply everything in transform, store everyting
in FBX scale, or mix both solutions (taking custom export scale and unit
scale into account here).
This change a bit default behavior, and hopefully will allow to find at
least one options working correctly with a given 'other tool' importer.
This may address T51704 and T50159.
|
|
|
|
This is the 'proxy case', only fixable one for now (linked object have un-editable animdata.action,
so we cannot export animations for them for now).
Issue was simply that armature modifier of linked mesh object still 'points' to linked armature
object, and not to its local proxy. Fix is luckily easy (for once)!
|
|
Note that it will export all sampled values - even for actually non-animated channels,
not really possible to avoid that without a hell lot more of code, and this rea is
convoluted enough right now.
|
|
By default, Blender uses a 'Null' one (rouglhly equivalent to our Empty),
but now user can also choose a 'Root' or even plain "LimbNode".
This seems to be necessary to hack around some Unity bug (see T47325).
WARNING: the 'LimbNode' option *does not* import back correctly in Blender.
Use it in pure export-only cases.
|
|
Can be handy sometimes, especialy with files which should not be animated and yet contain animdata...
|
|
Object.is_duplicator, much cleaner solution).
|
|
Previous 'simplifying' code was not handling correctly micro-fluctuations around zero
(caused by ugly float precision issues). Rewrote it more or less completely,
new code is simpler and only based on relative difference (by default, it
keys each time the diff is above 1e-4, and above 1e-4 * magnitude_of_values).
Might produce more keys in some cases, but at least 'noise' shall never be
exported again.
|
|
User request (see T45438).
|
|
error.
Looks like our absolute max diff in animation simplification process was a bit too low,
raised it from 1e-6 to 1e-5, fixes the issue in reported file at least.
|
|
|
|
|
|
In theory, Blender's animations start at frame 1, while FBX ones start at t0,
but looks like users need tweaking ability here too! ;)
|
|
armature case.
Note that, since I do not have any skinned zero-aligned bones FBX file at hands, I do not
know whether this option breaks skinning or not (hard to predict, we are playing with
at least four different matrices/transforms here)... Time will say.
|
|
So, it appears some importers (at least UE4) do not use UnitScaleFactor defined by FBX,
which is assumed to be a way to say 'this FBX file uses units n times default FBX unit'
(default FBX unit being centimeter - afaik, at least I saw some FBX from Max with a
UnitScaleFactor of 2.54 - inches).
Hence, we have to add yet another stupid option to apply that 'unit scaling' to objects
instead (as part of global scaling)... Hurra.
|
|
Man... this scaling issue becomes ridiculous!
Tried to fix it again also regarding (what is supposed to be) FBX scale/units handling.
Since we store Blender's unit system (with 1BU == 1m in case of none) as the UnitScaleFactor
element, we actually *do not* have to also scale objects themselves... In theory.
Since I have to wait hours here to get my UE4 repo updated and rebuild the monster,
comitting this now, we'll see later for FBXSDK behavior.
|
|
|
|
still failing.
|
|
mesh on import.
Issue here is that FBX assigns materials by objects, while in Blender it is by default assigned
to meshes (obdata). This becomes critical with tons of objects using the same mesh (as generated
e.g. by exporting from Blender's dupliobjects).
We may add an option later to assign materials to objects too, but meh... We already have tons
of options in FBX. :|
Also, added some timing/steps reporting in console, helps seeing io process going on,
and spotting stupid issues like this one!
|
|
Well, not exactly a fix, since the buggy behavior from FBXSDK side makes no sense to me.
So it's rather a hack to make that stupid piece of junk happy - now you can (optionally,
but ON by default) force exporting anim keys for all bones of an armature.
Should be safe for 2.74, just adds a new option, cannot see how it could break existing stuff.
|
|
180 degree rotation of meshes.
Issue found, investigated and fixed by ib_rod (Rod Boyd), thanks a bunch!
And again, a special mention to the "quality" of FBX doc (even on official API level)...
|
|
|
|
|
|
when working with linked libraries.
Now take libname (lib namespace) into account when generating ID's name or key...
|
|
This matrix is finally really local to the parent, no more only to the parent object.
Only working with master rBfb7ff31315a1 and later.
Also, fixed some missing matrix copying...
|
|
|
|
|
|
is 'ARMATURE'!
|
|
Just use 'new' inverted_safe() everywhere we are not 100% sure the matrix is invertible...
|
|
rotation to get valid result.
Yet another big breakthrough in FBX fantastic transformation handling! And yet another
hacking parameter to get things imported better.
Anyway, many thanks to artgolf1000 (Mingfen Wang) for finding that hack!
|
|
This time, it was exporter that did not support bone parenting of mere objects.
Also fixes a more general bug about parenting - matrix_parent_inverse
was not taken into account at all for child objects!
|
|
work).
Will remove experimental one soon. Keeping old 6.1 exporter active for now, though.
Notes:
* Not 100% happy with how complex code is now... Rather sure though refactor would
take a huge amount of time, not worth it for now.
* New code handles things like armature & animation import much much better than previous one,
so definitively worth it.
* New code also fixes some real bugs (like Blender-side of T42135).
* Did a few cosmetic changes on the run, nothing serious.
This should make FBX work complete, aside from a few nice TODOs that I'll tackle in comming weeks,
in addition to ongoing bugbusting.
Many thanks to Jens for his work on armature mess! :D
|
|
a_list instead of a bool?!
|
|
not exported correctly.
Now also check modifiers stack.
|
|
|
|
|