Skip to content

Conversation

@zodiepupper
Copy link
Contributor

@zodiepupper zodiepupper commented Apr 26, 2025

reviving #96059 to fix fbx runtime mesh importing. previously importing would only work properly for meshes while in the editor.

fixes #96029
fixes #96043

should also accommodate document extensions appropriately

lemme know if there is anything further i should do! ^-^

@zodiepupper zodiepupper requested review from a team as code owners April 26, 2025 09:00
@fire fire changed the title fix fbx runtime import not generating meshes properly Fix fbx runtime import not generating meshes properly Apr 26, 2025
@fire
Copy link
Member

fire commented Apr 26, 2025

Need to cite the proper people as Co Authored by. Will need to send you the doc for godot pr and code style

@fire
Copy link
Member

fire commented Apr 26, 2025

Here's the guide to https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html and I would use pre-commit run -a to fix the style changes.

@zodiepupper
Copy link
Contributor Author

zodiepupper commented Apr 26, 2025

Here's the guide to https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html and I would use pre-commit run -a to fix the style changes.

what is this pre-commit thing? i've never heard of it before, i normally do PR cleanup myself.

edit: discussed with ifire over discord. installed pre-commit from my system repos.

Need to cite the proper people as Co Authored by. Will need to send you the doc for godot pr and code style

how should i do that, the docs you links doesn't seem to describe it, unless i'm just not seeing it which is totally possible.

edit: discussed with ifire over discord for this too, adding them now. was genuinely not aware of this lol

@zodiepupper zodiepupper force-pushed the fbx-runtime-fixing branch 2 times, most recently from 0f78683 to b803919 Compare April 26, 2025 20:46
@Repiteo Repiteo modified the milestones: 4.x, 4.5 Apr 26, 2025
@zodiepupper zodiepupper force-pushed the fbx-runtime-fixing branch 3 times, most recently from 5f3f22e to 1935c73 Compare April 26, 2025 23:39
@fire fire requested a review from a team April 27, 2025 00:39
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: @lyuma reviewer

@Repiteo Repiteo requested a review from lyuma April 27, 2025 00:51
Copy link
Contributor

@lyuma lyuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I approve of re-enabling extension support for FBXDocument and exposing register/unregister extensions.

The code should be changed to use the existing GLTFDocumentExtensionConvertImporterMesh class, given that the API is already based on GLTFDocumentExtension. Then we can delete FBXDocumentExtensionConvertImporterMesh and reduce duplicated code.

The only difference I can see between FBXDocumentExtensionConvertImporterMesh and the original GLTFDocumentExtensionConvertImporterMesh code is that it is not copying the visible property, perhaps because the visible property may have been added very recently.

@zodiepupper
Copy link
Contributor Author

Overall I approve of re-enabling extension support for FBXDocument and exposing register/unregister extensions.

The code should be changed to use the existing GLTFDocumentExtensionConvertImporterMesh class, given that the API is already based on GLTFDocumentExtension. Then we can delete FBXDocumentExtensionConvertImporterMesh and reduce duplicated code.

The only difference I can see between FBXDocumentExtensionConvertImporterMesh and the original GLTFDocumentExtensionConvertImporterMesh code is that it is not copying the visible property, perhaps because the visible property may have been added very recently.

i made the change and tested it, it works exactly as well as before but actually maybe slightly faster.

you stated that the code is not copying the visible property. did you mean that the GLTFDocumentExtensionConvertImporterMesh doesn't use visible or that the new FBXDocumentExtensionConvertImporterMesh doesn't? when i looked through the code for GLTFDocumentExtensionConvertImporterMesh it seemed to be grabbing the visible value, from a quick glance

@fire fire requested a review from lyuma April 27, 2025 16:40
@fire
Copy link
Member

fire commented Apr 27, 2025

Can you squash into one commit so it's finalized?

@zodiepupper
Copy link
Contributor Author

zodiepupper commented Apr 27, 2025

should i squash the commits? i added more commits to keep the file history incase the change suggested by lyuma was more involved. so it's probably not necessary for it to be more than 1 commit

@zodiepupper
Copy link
Contributor Author

yeah, i'll squash commits. ur message didn't load before i left my comment

Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: K. S. Ernest (iFire) Lee <[email protected]>
Co-authored-by: Naming-things-is-hard-btw <[email protected]>
Copy link
Contributor

@lyuma lyuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Visible was only missing in the fbx version. It should be fine now.

@Repiteo Repiteo merged commit 9ad1623 into godotengine:master Apr 28, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Apr 28, 2025

Thanks! Congratulations on your first merged contribution! 🎉

@fire
Copy link
Member

fire commented May 30, 2025

@Calinou As per rocketchat discussion, I agree that it is cherry pickable into stable godot engine. It'll need testing for your use in the demo projects but the fbx importer has been static for a while now.

@zodiepupper
Copy link
Contributor Author

zodiepupper commented May 30, 2025

hasn't this already been merged and closed, @fire ?

@fire
Copy link
Member

fire commented May 30, 2025

@Calinou wants to cherry pick into 4.4 godot engine

@lyuma lyuma added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release topic:import topic:3d

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UFBX runtime loader not working UFBX importer doesn't work in-game [Godot 4.3]

5 participants