Closed funkysandwich closed 1 week ago
Same for Blender 4.1 I hope for a quick fix since Blender files 4.0 and above are not compatible with 3.65 anymore.
Same for Blender 4.0 general release.
+1 Generated FBX for UE import flagged as corrupted. UE: 5.3.1 Blender 4.0.1
The very same file works fine with Blender 3.6.5.
Same issues for me. Blender 4.0/ UE 5.3. Was previously working fine with Blender 3.6
+1 having the same problem here. blender 4.0
same here, blender 4.0.1
Glad to know it isn't my mesh. Almost had a heart attack here. Same to me.
same here, fixed it by exporting the 4.0 project as an fbx and importing it into a 3.5 beta version.
same here, fixed it by exporting the 4.0 project as an fbx and importing it into a 3.5 beta version.
I think it is just the plugin that doesn't work. Exporting a fbx manually and importing it into unreal works
yeah you could export without the plugin but its super slow and annoying
Yes, of course, but why not just open the blend file in 3.6 instead and use send2ue as usual, no reason to export to FBX, or?
The same with me. I had a look into the code and there seem to be some workarounds and fixes on how the 3.x series handled FBX exports. From what I see the original code (3.x) was copied and slightly altered/fixed and the original methods of the fbx exporter were overwritten during export. This for sure messes up the new 4.0 fbx exporter code. I did a quick test and reverted the overwrite and from what I see is that the export now works without any noticable problems so far. Maybe this observation helps to fix this problem.
can you share the fix version ? Thanks
mlubich @.***> 于 2023年12月1日周五 00:30写道:
The same with me. I had a look into the code and there seem to be some workarounds and fixes on how the 3.x series handled FBX exports. From what I see the original code (3.x) was copied and slightly altered/fixed and the original methods of the fbx exporter were overwritten during export. This for sure messes up the new 4.0 fbx exporter code. I did a quick test and reverted the overwrite and from what I see is that the export now works without any noticable problems so far. Maybe this observation helps to fix this problem.
— Reply to this email directly, view it on GitHub https://github.com/EpicGames/BlenderTools/issues/676#issuecomment-1834114399, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBCL6SSPOV763RSGXDH2BTYHCYAVAVCNFSM6AAAAAA6ET5FV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGEYTIMZZHE . You are receiving this because you commented.Message ID: @.***>
I am a bit unsure what you mean. Did you change code in send2ue or in Blender itself?
I am a bit unsure what you mean. Did you change code in send2ue or in Blender itself?
I did change the python code of the send2ue plugin.
The change I did is a crude hack, as it bypasses all the fixes/additions done by the authors of send2ue. There are certainly problems with this approach as I do not know what was fixed in the new blender FBX export code and which send2ue fixes are still needed.
Here is a comment from the io.export method in which the send2ue developers are describing the overall idea:
Note that this function imports the blender FBX addon's module and monkey patches
some functions to fix the scale factor and world origins of the objects, so that they import
nicely into unreal engine.
If you want to experminet yourself you can do the following:
#export_fbx_bin.fbx_animations_do = fbx_animations_do
#export_fbx_bin.fbx_data_armature_elements = fbx_data_armature_elements
#export_fbx_bin.fbx_data_object_elements = fbx_data_object_elements
#export_fbx_bin.fbx_data_bindpose_element = fbx_data_bindpose_element
...
#export_fbx_bin.fbx_animations_do = original_fbx_animations_do
#export_fbx_bin.fbx_data_armature_elements = original_fbx_data_armature_elements
#export_fbx_bin.fbx_data_object_elements = original_fbx_data_object_elements
#export_fbx_bin.fbx_data_bindpose_element = original_fbx_data_bindpose_element
Again, I do not think that this approach is a feasible stable solution. The original authors should have a look at the current blender 4.0 fbx implementation and decide if all any of fixes present in send2ue are still needed.
Ok, cool. thanks.
I guess you dont know whether it was a specific attribute was the culprit, or do you have to turn them all of, or maybe that doesnt matter?
I guess you dont know whether it was a specific attribute was the culprit, or do you have to turn them all of, or maybe that doesnt matter?
No, I do not know. I just deactivated all of them just to see if this makes any difference. I only have one project I am transferring from blender to unreal, so that sample size to catch any problems is quite low :) I do not export any animations or armatures, just plain static meshes.
Here's a proper fix until addon is updated:
the fbx.py file mentioned above is what we need to change
go to line 35, add elem_data_single_char
to the list so it looks like
from io_scene_fbx.fbx_utils import (
FBX_MODELS_VERSION,
FBX_POSE_BIND_VERSION,
FBX_DEFORMER_SKIN_VERSION,
FBX_DEFORMER_CLUSTER_VERSION,
BLENDER_OBJECT_TYPES_MESHLIKE,
units_convertor_iter,
matrix4_to_array,
get_fbx_uuid_from_key,
get_blenderID_name,
get_blender_bindpose_key,
get_blender_anim_stack_key,
get_blender_anim_layer_key,
elem_empty,
elem_data_single_bool,
elem_data_single_int32,
elem_data_single_int64,
elem_data_single_float64,
elem_data_single_string,
elem_data_single_int32_array,
elem_data_single_float64_array,
elem_properties,
elem_props_template_init,
elem_props_template_set,
elem_props_template_finalize,
fbx_name_class,
elem_data_single_char
)
Search for b"Shading"
and replace elem_data_single_bool(model, b"Shading", True)
with elem_data_single_char(model, b"Shading", b"\x01")
That's all!
Here's a proper fix until addon is updated:
the fbx.py file mentioned above is what we need to change
go to line 35, add
elem_data_single_char
to the list so it looks likefrom io_scene_fbx.fbx_utils import ( FBX_MODELS_VERSION, FBX_POSE_BIND_VERSION, FBX_DEFORMER_SKIN_VERSION, FBX_DEFORMER_CLUSTER_VERSION, BLENDER_OBJECT_TYPES_MESHLIKE, units_convertor_iter, matrix4_to_array, get_fbx_uuid_from_key, get_blenderID_name, get_blender_bindpose_key, get_blender_anim_stack_key, get_blender_anim_layer_key, elem_empty, elem_data_single_bool, elem_data_single_int32, elem_data_single_int64, elem_data_single_float64, elem_data_single_string, elem_data_single_int32_array, elem_data_single_float64_array, elem_properties, elem_props_template_init, elem_props_template_set, elem_props_template_finalize, fbx_name_class, elem_data_single_char )
Search for
b"Shading"
and replaceelem_data_single_bool(model, b"Shading", True)
withelem_data_single_char(model, b"Shading", b"\x01")
That's all!
Thanks for the instructions. I just tried it and it worked for me in Blender 4.1 Alpha.
Here's a proper fix until addon is updated:
the fbx.py file mentioned above is what we need to change
go to line 35, add
elem_data_single_char
to the list so it looks likefrom io_scene_fbx.fbx_utils import ( FBX_MODELS_VERSION, FBX_POSE_BIND_VERSION, FBX_DEFORMER_SKIN_VERSION, FBX_DEFORMER_CLUSTER_VERSION, BLENDER_OBJECT_TYPES_MESHLIKE, units_convertor_iter, matrix4_to_array, get_fbx_uuid_from_key, get_blenderID_name, get_blender_bindpose_key, get_blender_anim_stack_key, get_blender_anim_layer_key, elem_empty, elem_data_single_bool, elem_data_single_int32, elem_data_single_int64, elem_data_single_float64, elem_data_single_string, elem_data_single_int32_array, elem_data_single_float64_array, elem_properties, elem_props_template_init, elem_props_template_set, elem_props_template_finalize, fbx_name_class, elem_data_single_char )
Search for
b"Shading"
and replaceelem_data_single_bool(model, b"Shading", True)
withelem_data_single_char(model, b"Shading", b"\x01")
That's all!
I was having the same issue with the fully released version of blender 4.0 and this worked perfectly! Until the Send2UE devs manage to make a fix for this version of blender, this should definetely be the pinned fix. Thanks for figuring this out :)
Im like not getting any error but my exported mesh from blender to unreal is not updated when I press export. Even when I add new object to Export collection it is not exported. Any ide what can be with that?
Well, it isn't working at all in 4.0 if you dont patch the file with the code AveryX01 provided. If you run earlier maybe the python setting isn't turned on, but it it isn't related to 4.0 you would probably be better of making a new thread
Well, it is a different version of Blender, mine is now 4.0.2.
so 9. 12. 2023 o 15:29 Kingfelix23 @.***> napísal(a):
Well, it isn't working at all in 4.0 if you dont patch the file with the code AveryX01 provided. If you run earlier maybe the python setting isn't turned on, but it it isn't related to 4.0 you would probably be better of making a new thread
— Reply to this email directly, view it on GitHub https://github.com/EpicGames/BlenderTools/issues/676#issuecomment-1848425421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR7345EC6PWAE2KIQSJ3VQLYIRYVJAVCNFSM6AAAAAA6ET5FV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGQZDKNBSGE . You are receiving this because you commented.Message ID: @.***>
Strange, it works for me, are you sure you put in the code correctly?
@JoshQuake Have you had any issues with normals? I tried exporting Suzanne and the normals are off on some faces. In this case turning on smooth shading looks correct. In other meshes I've edited sometimes flat works, but smooth does not. I tried the different geometry smoothing options for Send To Unreal, but nothing seems to help.
Suzanne flat has problems https://github.com/EpicGames/BlenderTools/assets/27040/5426664b-9120-4055-870c-157bfe505491
Some of the rounded corners have problems
Rounded cube https://github.com/EpicGames/BlenderTools/assets/27040/d7a388f9-9ed0-4715-aa9b-421c373a3a40
Im like not getting any error but my exported mesh from blender to unreal is not updated when I press export. Even when I add new object to Export collection it is not exported. Any ide what can be with that?
Did you miss the comma when adding elem_data_single_char to the list? Maybe open console and see if there is an error.
fbx_name_class,
elem_data_single_char
@JoshQuake Have you had any issues with normals? I tried exporting Suzanne and the normals are off on some faces. In this case turning on smooth shading looks correct. In other meshes I've edited sometimes flat works, but smooth does not. I tried the different geometry smoothing options for Send To Unreal, but nothing seems to help.
Suzanne flat has problems https://github.com/EpicGames/BlenderTools/assets/27040/5426664b-9120-4055-870c-157bfe505491
Some of the rounded corners have problems
Rounded cube https://github.com/EpicGames/BlenderTools/assets/27040/d7a388f9-9ed0-4715-aa9b-421c373a3a40
I couldn't tell ya. I only went into the newer fbx io plugin to see what values could have changed. Only difference I saw was how Shading True was being set and it solved the crash.
I tried exporting a flat suzanne and rounded cube but I do not get the same result as you.
Blender 4.0.1
ld have changed. Only difference I saw was how Shading True was being set and it solved the crash.
Thanks for double checking for me. I guess something is wrong with my build of Blender. I'll try 4.0.1. Thanks! Edit: Thanks to JoshQuake for telling me I was missing UV info on my character which led to the shading issues.
Here's a proper fix until addon is updated:
the fbx.py file mentioned above is what we need to change
go to line 35, add
elem_data_single_char
to the list so it looks likefrom io_scene_fbx.fbx_utils import ( FBX_MODELS_VERSION, FBX_POSE_BIND_VERSION, FBX_DEFORMER_SKIN_VERSION, FBX_DEFORMER_CLUSTER_VERSION, BLENDER_OBJECT_TYPES_MESHLIKE, units_convertor_iter, matrix4_to_array, get_fbx_uuid_from_key, get_blenderID_name, get_blender_bindpose_key, get_blender_anim_stack_key, get_blender_anim_layer_key, elem_empty, elem_data_single_bool, elem_data_single_int32, elem_data_single_int64, elem_data_single_float64, elem_data_single_string, elem_data_single_int32_array, elem_data_single_float64_array, elem_properties, elem_props_template_init, elem_props_template_set, elem_props_template_finalize, fbx_name_class, elem_data_single_char )
Search for
b"Shading"
and replaceelem_data_single_bool(model, b"Shading", True)
withelem_data_single_char(model, b"Shading", b"\x01")
That's all!
This solved the issue for me in Blender 4.0.1 Thanks!
Here's a proper fix until addon is updated:
the fbx.py file mentioned above is what we need to change
go to line 35, add
elem_data_single_char
to the list so it looks likefrom io_scene_fbx.fbx_utils import ( FBX_MODELS_VERSION, FBX_POSE_BIND_VERSION, FBX_DEFORMER_SKIN_VERSION, FBX_DEFORMER_CLUSTER_VERSION, BLENDER_OBJECT_TYPES_MESHLIKE, units_convertor_iter, matrix4_to_array, get_fbx_uuid_from_key, get_blenderID_name, get_blender_bindpose_key, get_blender_anim_stack_key, get_blender_anim_layer_key, elem_empty, elem_data_single_bool, elem_data_single_int32, elem_data_single_int64, elem_data_single_float64, elem_data_single_string, elem_data_single_int32_array, elem_data_single_float64_array, elem_properties, elem_props_template_init, elem_props_template_set, elem_props_template_finalize, fbx_name_class, elem_data_single_char )
Search for
b"Shading"
and replaceelem_data_single_bool(model, b"Shading", True)
withelem_data_single_char(model, b"Shading", b"\x01")
That's all!
Chiming in to say this also got me up and running with Blender 4.x, thank you!
Here's a proper fix until addon is updated:
the fbx.py file mentioned above is what we need to change
go to line 35, add
elem_data_single_char
to the list so it looks likefrom io_scene_fbx.fbx_utils import ( FBX_MODELS_VERSION, FBX_POSE_BIND_VERSION, FBX_DEFORMER_SKIN_VERSION, FBX_DEFORMER_CLUSTER_VERSION, BLENDER_OBJECT_TYPES_MESHLIKE, units_convertor_iter, matrix4_to_array, get_fbx_uuid_from_key, get_blenderID_name, get_blender_bindpose_key, get_blender_anim_stack_key, get_blender_anim_layer_key, elem_empty, elem_data_single_bool, elem_data_single_int32, elem_data_single_int64, elem_data_single_float64, elem_data_single_string, elem_data_single_int32_array, elem_data_single_float64_array, elem_properties, elem_props_template_init, elem_props_template_set, elem_props_template_finalize, fbx_name_class, elem_data_single_char )
Search for
b"Shading"
and replaceelem_data_single_bool(model, b"Shading", True)
withelem_data_single_char(model, b"Shading", b"\x01")
That's all!
such a godsend!!
Here's a proper fix until addon is updated:
the fbx.py file mentioned above is what we need to change
go to line 35, add
elem_data_single_char
to the list so it looks likefrom io_scene_fbx.fbx_utils import ( FBX_MODELS_VERSION, FBX_POSE_BIND_VERSION, FBX_DEFORMER_SKIN_VERSION, FBX_DEFORMER_CLUSTER_VERSION, BLENDER_OBJECT_TYPES_MESHLIKE, units_convertor_iter, matrix4_to_array, get_fbx_uuid_from_key, get_blenderID_name, get_blender_bindpose_key, get_blender_anim_stack_key, get_blender_anim_layer_key, elem_empty, elem_data_single_bool, elem_data_single_int32, elem_data_single_int64, elem_data_single_float64, elem_data_single_string, elem_data_single_int32_array, elem_data_single_float64_array, elem_properties, elem_props_template_init, elem_props_template_set, elem_props_template_finalize, fbx_name_class, elem_data_single_char )
Search for
b"Shading"
and replaceelem_data_single_bool(model, b"Shading", True)
withelem_data_single_char(model, b"Shading", b"\x01")
That's all!
I can't find b"Shading" it says there is no text called like that, I am in fbx.py
Thanks for the update! This does fix the issue for me.
FYI: For anyone interested - not all steps may be required, but I was just being cautious.
Can confirm, patching and then restarting Blender resolved the issue.
Trid this and got the following error..
(just the last few lines of error)
File "D:\Blender Versions\blender-4.1.0-beta+v41.c6e229d3e470-windows.amd64-release\blender-4.1.0-beta+v41.c6e229d3e470-windows.amd64-release\4.1\python\Lib\re_parser.py", line 850, in _parse
raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 19
Fix worked perfectly. Thank you!
Attaching this because I thought someone would have posted a fixed version in comments, but I didn't see one. Enjoy
Okay the fix works in 4.1 alpha but not on 4.1 beta( throws errror I posted above) .. Still in 4.1 alpha exporting skeletal mesh works fine but exporting animation resulted in the following error..
Python: Traceback (most recent call last): File "C:\Users**\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\operators.py", line 71, in modal raise error File "C:\Users***\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\operators.py", line 61, in modal function(args, kwargs) File "C:\Users**\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\export.py", line 265, in export_animation export_file(properties) File "C:\Users**\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\export.py", line 166, in export_file export_fbx_file(file_path, export_settings) File "C:\Users**\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\export.py", line 83, in export_fbx_file io.fbx.export( File "C:\Users**\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\io\fbx.py", line 552, in export export_fbx_bin.save(self, bpy.context, keywords) File "D:\Blender Versions\blender-4.1.0-alpha+main.2b0448c91d7a-windows.amd64-release\4.1\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3628, in save ret = save_single(operator, context.scene, depsgraph, filepath, kwargs_mod) File "D:\Blender Versions\blender-4.1.0-alpha+main.2b0448c91d7a-windows.amd64-release\4.1\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3496, in save_single scene_data = fbx_data_from_scene(scene, depsgraph, settings) File "D:\Blender Versions\blender-4.1.0-alpha+main.2b0448c91d7a-windows.amd64-release\4.1\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2867, in fbx_data_from_scene animations, animated, frame_start, frame_end = fbx_animations(tmp_scdata) File "D:\Blender Versions\blender-4.1.0-alpha+main.2b0448c91d7a-windows.amd64-release\4.1\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2455, in fbx_animations fbx_animations_do(scene_data, strip, strip.frame_start, strip.frame_end, True, force_keep=True)) File "C:\Users***\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\io\fbx.py", line 160, in fbx_animations_do anim_loc.add_keyframe(real_currframe, loc location_multiple) AttributeError: 'AnimationCurveNodeWrapper' object has no attribute 'add_keyframe'. Did you mean: 'set_keyframes'?
Fix worked perfectly. Thank you!
Attaching this because I thought someone would have posted a fixed version in comments, but I didn't see one. Enjoy
Thank you! I had no idea what to do lol
Hi... where can I find the documentation for these tools? Link dead.
Dunno what happened to all the links, hopefully temporarily bug, but videos are still up:
https://www.youtube.com/playlist?list=PLZlv_N0_O1gZfQaN9qXynWllL7bzX8H3t
Fix worked perfectly. Thank you!
Attaching this because I thought someone would have posted a fixed version in comments, but I didn't see one. Enjoy
Working on Blender 4.0.1, thank you!
Okay the fix works in 4.1 alpha but not on 4.1 beta( throws errror I posted above) .. Still in 4.1 alpha exporting skeletal mesh works fine but exporting animation resulted in the following error..
Python: Traceback (most recent call last): File "C:\Users_\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\operators.py", line 71, in modal raise error File "C:\Users_\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\operators.py", line 61, in modal function(args, **kwargs) File "C:\Users***\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\export.py", line 265, in export_animation exportfile(properties) File "C:\Users*\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\export.py", line 166, in export_file export_fbx_file(file_path, exportsettings) File "C:\Users***\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\export.py", line 83, in export_fbx_file io.fbx.export( File "C:\Users***\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\io\fbx.py", line 552, in export export_fbx_bin.save(self, bpy.context, _keywords) File "D:\Blender Versions\blender-4.1.0-alpha+main.2b0448c91d7a-windows.amd64-release\4.1\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3628, in save ret = save_single(operator, context.scene, depsgraph, filepath, kwargs_mod) File "D:\Blender Versions\blender-4.1.0-alpha+main.2b0448c91d7a-windows.amd64-release\4.1\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3496, in save_single scene_data = fbx_data_from_scene(scene, depsgraph, settings) File "D:\Blender Versions\blender-4.1.0-alpha+main.2b0448c91d7a-windows.amd64-release\4.1\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2867, in fbx_data_from_scene animations, animated, frame_start, frame_end = fbx_animations(tmp_scdata) File "D:\Blender Versions\blender-4.1.0-alpha+main.2b0448c91d7a-windows.amd64-release\4.1\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2455, in fbx_animations fbx_animations_do(scene_data, strip, strip.frame_start, strip.frame_end, True, forcekeep=True)) File "C:\Users***\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\send2ue\core\io\fbx.py", line 160, in fbx_animations_do anim_loc.add_keyframe(real_currframe, loc * location_multiple) AttributeError: 'AnimationCurveNodeWrapper' object has no attribute 'add_keyframe'. Did you mean: 'set_keyframes'?
Found this one is reported in, https://github.com/EpicGamesExt/BlenderTools/issues/696. fixed in https://github.com/EpicGamesExt/BlenderTools/pull/706.
Trid this and got the following error..
(just the last few lines of error)
File "D:\Blender Versions\blender-4.1.0-beta+v41.c6e229d3e470-windows.amd64-release\blender-4.1.0-beta+v41.c6e229d3e470-windows.amd64-release\4.1\python\Lib\re_parser.py", line 850, in _parse
raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 19
@WindMill90 did you ever find a fix for this one? I get the same using Blender 4.1.1 and Unreal 5.4
@akomili This fork is dead. Here's the up to date fork
@akomili This fork is dead. Here's the up to date fork
What does that mean? Did Epic abandon it? Is there any other changes besides fixing the line of code that stopped it from working?
@Kingfelix23 Yep Epic switched the license to MIT at the beginning of this year and abandoned the project, So we (Polyhammer and myself) have taken the mantle in maintaining it.
There are a lot of fixes and some new features for both Send to Unreal and UE to Rigify.
@Kingfelix23 Yep Epic switched the license to MIT at the beginning of this year and abandoned the project, So we (Polyhammer and myself) have taken the mantle in maintaining it.
There are a lot of fixes and some new features for both Send to Unreal and UE to Rigify.
Sounds great. Thanks for that!
Hi. Upon using Push Assets in Blender 4.0 beta, the assets fail to be imported by Unreal, but in Blender 3.6 it works fine. An export using Blender's built in FBX exporter in 4.0 does import. Just not ones from Push Assets.
Snippet from Unreal output log on import
Tested with Blender 4.0.0 Beta, and Send to Unreal 2.4.2