Bug fixed of FBX plugin #42410

Closed
opened 2014-10-27 01:14:40 +01:00 by Mingfen Wang · 13 comments

System Information
Mac OSX 10.9.5, Mac mini 2012 late

Blender Version
Worked: Blender 2.72a

Short description of error
Some 3d models need to turn off pre-rotation and post rotation when importing FBX file.

Exact steps for others to reproduce the error
Import the attached FBX file, you will find that the neck of the giraffe is weird, if you turn off pre_rot and pst_rot, everything is okay.

I have patched the FBX plugin by having added a checkbox of this feature, the patched files are included in the attached file.

I have also modified the length of bones to 1e-3, this makes the models look fine when using 'Stick' armature display mode, the bones show as yellow tiny cubes, which are easy to select and operate on them.

Modifying the length of bones is not necessary, it is not a bug, I just feel that the long bones are terrible looking, at least I can rig and pose on the bones now:-)

bug_report.zip

**System Information** Mac OSX 10.9.5, Mac mini 2012 late **Blender Version** Worked: Blender 2.72a **Short description of error** Some 3d models need to turn off pre-rotation and post rotation when importing FBX file. **Exact steps for others to reproduce the error** Import the attached FBX file, you will find that the neck of the giraffe is weird, if you turn off pre_rot and pst_rot, everything is okay. I have patched the FBX plugin by having added a checkbox of this feature, the patched files are included in the attached file. I have also modified the length of bones to 1e-3, this makes the models look fine when using 'Stick' armature display mode, the bones show as yellow tiny cubes, which are easy to select and operate on them. Modifying the length of bones is not necessary, it is not a bug, I just feel that the long bones are terrible looking, at least I can rig and pose on the bones now:-) [bug_report.zip](https://archive.blender.org/developer/F119844/bug_report.zip)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Mingfen Wang self-assigned this 2014-10-27 01:14:40 +01:00
Author

Added subscriber: @artgolf1000

Added subscriber: @artgolf1000
Author

This comment was removed by @artgolf1000

*This comment was removed by @artgolf1000*
Mingfen Wang removed their assignment 2014-10-27 01:43:42 +01:00
Author

Removed subscriber: @artgolf1000

Removed subscriber: @artgolf1000

Added subscriber: @mont29

Added subscriber: @mont29

Meeeeh… even mooooore option to this poor addon… FBX should never ever have had such a complex transformation system, it's just not manageable. :/ Will check that.

About bones, well, in Blender those are bones, not joints like in many other apps… Anyway, please try addon from a build from our buildbot, bone importing was rather heavily reworked compared to 2.72 release, handles much more cases correctly now.

Meeeeh… even mooooore option to this poor addon… FBX should **never ever** have had such a complex transformation system, it's just not manageable. :/ Will check that. About bones, well, in Blender those are **bones**, not **joints** like in many other apps… Anyway, please try addon from a build from [our buildbot](https://builder.blender.org/download), bone importing was rather heavily reworked compared to 2.72 release, handles much more cases correctly now.
Bastien Montagne self-assigned this 2014-10-27 09:05:28 +01:00

Added subscriber: @artgolf1000

Added subscriber: @artgolf1000

Hmm… The file you attached actually contains modified versions of files from old addon… Current one is rather different, especially since you did not provide patch as .diff file, could you please update your work against latest version (as available in builds from our buildbot)?

Hmm… The file you attached actually contains modified versions of files from old addon… Current one is rather different, especially since you did not provide patch as .diff file, could you please update your work against latest version (as available in builds from [our buildbot](https://builder.blender.org/download))?
Author

Yes, my patch is base on an old version, so I downloaded the latest build, but I find that I can not fix it, for the latest add-on changed a lot, and I am not familiar with python.
The important patches are only two lines, which are in the function of 'blen_read_object_transform_do', I just delete two lines of 'pre_rot' and 'pst_rot' according to the checkbox, here is the code:


  if settings.use_load_pre_post_rotation:
      return (
          lcl_translation *
          rot_ofs *
          rot_piv *
          pre_rot *
          lcl_rot *
          pst_rot *
          rot_piv.inverted() *
          sca_ofs *
          sca_piv *
          lcl_scale *
          sca_piv.inverted()
      )
  else:
      return (
          lcl_translation *
          rot_ofs *
          rot_piv *
          lcl_rot *
          rot_piv.inverted() *
          sca_ofs *
          sca_piv *
          lcl_scale *
          sca_piv.inverted()
      )

Yes, my patch is base on an old version, so I downloaded the latest build, but I find that I can not fix it, for the latest add-on changed a lot, and I am not familiar with python. The important patches are only two lines, which are in the function of 'blen_read_object_transform_do', I just delete two lines of 'pre_rot' and 'pst_rot' according to the checkbox, here is the code: ----------------------------------------------- ``` if settings.use_load_pre_post_rotation: return ( lcl_translation * rot_ofs * rot_piv * pre_rot * lcl_rot * pst_rot * rot_piv.inverted() * sca_ofs * sca_piv * lcl_scale * sca_piv.inverted() ) else: return ( lcl_translation * rot_ofs * rot_piv * lcl_rot * rot_piv.inverted() * sca_ofs * sca_piv * lcl_scale * sca_piv.inverted() ) ``` -----------------------------------------------

Ok, should be able to redo that. :)

Ok, should be able to redo that. :)

This issue was referenced by 0ce975d080

This issue was referenced by 0ce975d0802e18cea5d7ec5e2f0536df886e4a2e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 0ce975d080.

Closed by commit 0ce975d080.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#42410
No description provided.