irajsb / UE4_Assimp

Assimp mesh importer for Unreal Engine
MIT License
136 stars 29 forks source link

Fixes for 5.1 "red nodes of death" #27

Closed sfjohnston closed 1 year ago

sfjohnston commented 1 year ago

On 5.1, the nodes would read into a file red and refreshing nodes did not work. Changing the loading to "PreDefault" rather than "Default" seems to do the trick. (Also fixed a braces placement issue which was needed for the linux section.)

irajsb commented 1 year ago

I could not reproduce the bugs. If the missing function was import scenes async it was removed recently because scene importing was fast enough and it didn't needed to be async(for now ).

sfjohnston commented 1 year ago

The issue in the pull request was not about async scene import.

On MacOS and Linux with UE5.1, all the nodes in a blueprint would be "red" when the editor was opened. Performing a "refresh all nodes" partially fixes the problem, but some connections have the wrong type at that point. I compared this plugin to another that doesn't have the issue, and the difference was the "PreDefault" vs. "Default" setting. When I switched the load setting to "PreDefault" the issue went away.

If you're seeing my latest push with three additional changes, you will see that I've made another bug-fix, and a change for clarity.

Bugfix: Instead of using FColor, which maps from sRGB to linear color space, I'm returning the base color created with FLinearColor. This passes the correct colors and no longer needs the *100.

Clarity Change: I was confused that "GetAllMeshes" behaves differently in AiScene and AiNode. It makes sense now, but I've changed the name to "GetNodeMeshes" in AiNode for clarity and symmetry with other calls like "GetNodeName" and "GetNodeTransform." (I'm tempted to similarly change GetParentNode to GetNodeParent and GetChildNodes to GetNodeChildren).

The third change is updating the Assimp submodule to the latest version, which has some bug fixes to quiet down compiler warnings on macOS.

Thank you for accepting these changes!

sfjohnston commented 1 year ago

Thank you! I've added a comment to fully explain the latest changes.

On Fri, Jan 6, 2023 at 8:23 AM iraj mohtasham @.***> wrote:

Merged #27 https://github.com/irajsb/UE4_Assimp/pull/27 into main.

— Reply to this email directly, view it on GitHub https://github.com/irajsb/UE4_Assimp/pull/27#event-8170578792, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNVAYWIK6RVLPWUZHNJLU3WRBBH3ANCNFSM6AAAAAATMMD42Y . You are receiving this because you authored the thread.Message ID: @.***>