Page MenuHome

Fix: Launcher: wait for Blender to exit
ClosedPublic

Authored by Jens Ehrhardt (Jens_Eopus) on Jan 21 2022, 3:48 PM.

Details

Summary

Fix: Launcher: wait for Blender to exit
If blender-launcher is called with backgorund command line flag,
wait for the blender process to exit and return its return value


Unity uses Blender in background mode to convert .blend to .fbx
Since Blender 3.0 registers blender-launcher.exe as the default
file handler for .blend files, Unity uses the launcher instead of
Blender itself.
When the blender-launcher.exe exits before the resulting fbx file
is created, Unity fails to import or even worse imports the .fbx
from a previous run.

Diff Detail

Repository
rB Blender

Event Timeline

Jens Ehrhardt (Jens_Eopus) requested review of this revision.Jan 21 2022, 3:48 PM
Jens Ehrhardt (Jens_Eopus) created this revision.
Ray Molenkamp (LazyDodo) accepted this revision.EditedJan 21 2022, 4:00 PM

This was actually in the initial revision of the launcher, but @Brecht Van Lommel (brecht) had a strong preference of exiting early, that being said, I don't mind this middle ground.

if @Brecht Van Lommel (brecht) accepts i'll land this with some minor codestyle edits (they're small enough not to require another round of review)

This revision is now accepted and ready to land.Jan 21 2022, 10:22 PM
Ankit Meel (ankitm) added inline comments.
source/creator/blender_launcher_win32.c
85

backgorund typo

@Ray Molenkamp (LazyDodo) : if this lands today, I can still sneak that into 3.0.1

@Ray Molenkamp (LazyDodo) : if this lands today, I can still sneak that into 3.0.1

Made it just in time! Thanks for the patch @Jens Ehrhardt (Jens_Eopus) !

@Ray Molenkamp (LazyDodo) : if this lands today, I can still sneak that into 3.0.1

Made it just in time! Thanks for the patch @Jens Ehrhardt (Jens_Eopus) !

top!