@@ -61,7 +61,20 @@ def prepare_launch(self, exec_path, args, file_to_open=None):
61
61
62
62
:returns: A :class:`LaunchInformation` instance.
63
63
"""
64
+ # TODO: Get the startup project from settings somewhere, for now hardcoded
65
+ # Otherwise, leave it empty and the project selection window will appear
66
+ # (the command-line arguments are forwarded to the new instance of Unreal Editor)
67
+ unreal_project = ""
68
+ args = args + unreal_project
64
69
required_env = {}
70
+ # Creating a QApplication in Unreal on Mac crashes it, so disable the
71
+ # SG TK integration for now, just run the executable with its args. This
72
+ # allows to launch Unreal from tk-desktop or submit turntable renders
73
+ # from Maya to Unreal, without the integration crashing Unreal.
74
+ if sys .platform == "darwin" :
75
+ self .logger .warning ("SG TK Unreal integration is not available on Mac." )
76
+ return LaunchInformation (exec_path , args , required_env )
77
+
65
78
# Usually DCCs have an environment variable for plugins that need to be loaded.
66
79
# Here we're adding ourselves to that list. We add ourselves to the existing one
67
80
# in fact so we play nice with the current environment.
@@ -76,12 +89,6 @@ def prepare_launch(self, exec_path, args, file_to_open=None):
76
89
# Signals which engine instance from the environment is going to be used.
77
90
required_env ["SHOTGUN_ENGINE" ] = self .engine_name
78
91
79
- # TODO: Get the startup project from settings somewhere, for now hardcoded
80
- # Otherwise, leave it empty and the project selection window will appear
81
- # (the command-line arguments are forwarded to the new instance of Unreal Editor)
82
- unreal_project = ""
83
- args = args + unreal_project
84
-
85
92
# Set the bootstrap location in the environment variable that will be used by the Unreal Shotgun startup script
86
93
bootstrap_script = os .path .join (self .disk_location , "plugins" , "basic" , "bootstrap.py" )
87
94
required_env ["UE_SHOTGUN_BOOTSTRAP" ] = bootstrap_script
0 commit comments