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
2k stars 247 forks source link

UE 5.1 Crashes when pasting via the "Copy Regular Cameras" #168

Closed vexe closed 1 year ago

vexe commented 1 year ago

Hi there hope you had nice holidays!

Updated our project to UE 5.1 and I noticed that the Copy Regular Cameras doesn't work anymore, UE just crashes with:

(I'm running Plugin version 0.3.1, Blender 3.1)

LoginId:e695ad9d4aa14e30ae8e8b9af301b374
EpicAccountId:fd2dee20360242c0a3207cde2972f96d

Assertion failed: FPackageName::IsValidObjectPath(ObjectClass) [File:D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorObject.cpp] [Line: 489]

UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_LevelEditor
UnrealEditor_LevelEditor
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_UnrealEd
UnrealEditor_LevelEditor
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
user32
user32
InkObj
atlthunk
user32
user32
UnrealEditor_ApplicationCore
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

A fix would be appreciated, thanks a lot!

xavier150 commented 1 year ago

Hello @vexe, Thanks for the report! I fixed this issue for the next update. You can try the last dev branch here: https://github.com/xavier150/Blender-For-UnrealEngine-Addons#download-and-installation-from-dev-branch

I will close this issue after the update release.

vexe commented 1 year ago

Wow thanks for the rapid response xavier, will try it out and let you know!

vexe commented 1 year ago

Hi, it still seems to be crashing? Same line number and error.

I double checked that the clipboard contains the newly updated paths from your commit, and it seems correct

Begin Map
   Begin Level
      Begin Actor Class=/Script/Engine.CameraActor Name=Cam_0 Archetype=/Script/Engine.CameraActor'/Script/Engine.Default__CameraActor'
         Begin Object Class=/Script/Engine.SceneComponent Name="SceneComponent" Archetype=SceneComponent'/Script/Engine.Default__CameraActor:SceneComponent'
         End Object
         Begin Object Class=/Script/Engine.CameraComponent Name="CameraComponent" Archetype=CameraComponent'/Script/Engine.Default__CameraActor:CameraComponent'
         End Object
         Begin Object Name="SceneComponent"
            RelativeLocation=(X=-1063.3642578125,Y=-1315.0750732421875,Z=1827.56689453125)
            RelativeRotation=(Pitch=-32.96010236827203,Yaw=57.1998939024191,Roll=-9.868610979604427e-05)
            RelativeScale3D=(X=1.0,Y=1.0000001192092896,Z=1.0000001192092896)
         End Object
         Begin Object Name="CameraComponent"
            Filmback=(SensorWidth=18.0,SensorHeight=13.5, SensorAspectRatio=1.3333333333333333)
            CurrentAperture=2.799999952316284)
            CurrentFocalLength=19.300561904907227)
            CurrentFocusDistance=1000.0)
            CurrentFocusDistance=1000.0)
            FieldOfView=50.0000002530119)
            AspectRatio=1.3333333333333333)
         End Object
         CameraComponent="CameraComponent"
         SceneComponent="SceneComponent"
         RootComponent="SceneComponent"
         ActorLabel="Cam_0"
      End Actor
   End Level
Begin Surface
End Surface
End Object

Is there some quotes missing somewhere? I'm not familiar with Unreal's paste format

vexe commented 1 year ago

The "CurrentFocusDistance" is repeated twice, not that it matters for this but just to let you know.

vexe commented 1 year ago

OK sorry my mistake, it does work. For some reason blender added the 0.4.0 version as a separate plugin, I had to disable the old one and enable the new one.

xavier150 commented 1 year ago

Okay, no worry thanks ^^