20tab / UnrealEnginePython

Embed Python in Unreal Engine 4
MIT License
2.74k stars 743 forks source link

Problem with FbxImportUI #94

Closed sinokgr closed 7 years ago

sinokgr commented 7 years ago

Hi there,

I think that the FbxImportUI is not working properly. I have an FBX file with two boxes. When I import using the Unreal GUI, I can specify if I want to "CombineMeshes" or not and depending on my settings it will import one combined or two unique assets from this single FBX file. When I do that with Python, it imports fine, but it ignores the python settings and it uses the latest settings the user used. Bellow you can see a code sample I tried and doesn't work.

import unreal_engine as ue
from unreal_engine.classes import FbxImportUI, PyFbxFactory

fbx_import_ui = ue.new_object(FbxImportUI)
fbx_import_ui.set_property('bCombineMeshes', False)
ue.set_fbx_import_option(fbx_import_ui)
ue.import_asset(r"C:\Users\n.moutafis\Desktop\TwoBoxes.FBX", "/Game/FBX", PyFbxFactory)
rdeioris commented 7 years ago

This has been fixed in latest releases, check here for an example: https://github.com/20tab/UnrealEnginePython/blob/master/examples/kaiju_builder.py#L20