xavier150 / Blender-For-UnrealEngine-Addons

I have created this addons for export asset from Blender to Unreal Engine 4
https://www.xavierloux.com/
GNU General Public License v3.0
2.02k stars 249 forks source link

Noob - not importing #138

Closed maxymedia closed 9 months ago

maxymedia commented 2 years ago

Firstly, thanks for all the work that has gone into this - once I get it working I can see saving me a heap of time.

Have watched the video a hundred times but can't seem to get it working

Importing camera to Unreal

Problem - when I copy the code from Blender into the Output Cmd and paste it. Press enter and nothing happens

Cmd: unreal_engine.py_exec(r"D:\Projects\Maxys\musicvideo\Brett20211020\ExportedFbx\ImportSequencerScript.py")

observant2 commented 2 years ago

Isn't the camera a regular asset and you need to use "Copy import script (Assets)" instead of "Copy import script (Sequencer)"? I've never imported a camera, but the Camera type is listed below "Asset types to export", so I'd try the other script.

If I'm wrong also take a look at the scripting plugins, maybe you need to enable the sequencer?

grafik

maxymedia commented 2 years ago

Thank you for the quick reply.

I've checked plugins etc and have all what I don't have is the #The script must be used in Unreal Engine Editor with UnrealEnginePython : https://github.com/20tab/UnrealEnginePython

Just put together a quick screen capture -

https://youtu.be/xQ4hbPE8dYA

xavier150 commented 2 years ago

Hey @maxymedia , In the video you try to export "Camera_Transform" that just a empty not a camera. You need export "Camera.001" image

maxymedia commented 2 years ago

Thank you - sorry I still didn't get it to work.

What I'm attempting to do is convert camera position data

https://youtu.be/Kq70_eKoKdw into Unreal Engine.

I understand the best way to do that is through Blender and your plugin.

I've been following this tutorial https://www.youtube.com/watch?v=v38O-9KTqx4&t=731s

xavier150 commented 1 year ago

Hello @maxymedia You still have issue, you can send me the file, I will look about

GeneralProtectionFault commented 9 months ago

So I think this might be an appropriate place to put this. I tried this for the first time. Basically testing with pulling a DAZ character into Blender w/ Diffeomorphic and exporting that character. I could understand it not working, but it seems like Unreal doesn't even execute the script. If I hit enter after pasting it in, I get this error if I look at Unreal's output log:

LogPython: Error: SyntaxError: invalid syntax (, line 1) LogPython: Error: py "C:\Users\someuser\Art\Characters\ExportedFbx\ImportAssetScript.py" LogPython: Error: ^

EDIT: Sorry this is on me, the script isn't even there. So I'm not sure what generates it. I tried creating a template called Default, looking at the "missing paths" "issue"--but I don't see anything populate as far as generating the script. Might be because I'm using the preview version/Blender 4, though.

EDIT 2: I see it now, under Export Process, not Export Presets :-P. So, for some reason, I had to click back and forth a couple times before the asset showed up as 1 that would be exported.

Just generally, that Output Log button in Unreal could help if an error is getting thrown. Another interesting thing is Unreal seems to have a "Cmd" console and a "Python" console too. You still have to select "Cmd" because of the "py ...etc..." in what gets copied, I believe.