Skip to content

Commit 773c740

Browse files
committed
Updated turntable assets and scripts for 4.21/4.22
1 parent a75434a commit 773c740

File tree

18 files changed

+85
-13
lines changed

18 files changed

+85
-13
lines changed

hooks/tk-multi-publish2/tk-maya/basic/publish_turntable.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -397,19 +397,22 @@ def publish(self, settings, item):
397397
if " " in unreal_project_path:
398398
unreal_project_path = '"{}"'.format(unreal_project_path)
399399

400-
script_args = []
401-
400+
# Set the script arguments in the environment variables
402401
# The FBX to import into Unreal
403-
script_args.append(fbx_output_path)
404-
402+
os.environ['UNREAL_SG_FBX_OUTPUT_PATH'] = fbx_output_path
403+
405404
# The Unreal content browser folder where the asset will be imported into
406-
script_args.append(unreal_content_browser_path)
405+
os.environ['UNREAL_SG_CONTENT_BROWSER_PATH'] = unreal_content_browser_path
407406

408407
# The Unreal turntable map to duplicate where the asset will be instantiated into
409-
script_args.append(turntable_map_path)
408+
os.environ['UNREAL_SG_MAP_PATH'] = turntable_map_path
409+
410+
self._unreal_execute_script(unreal_exec_path, unreal_project_path, script_path)
411+
412+
del os.environ['UNREAL_SG_FBX_OUTPUT_PATH']
413+
del os.environ['UNREAL_SG_CONTENT_BROWSER_PATH']
414+
del os.environ['UNREAL_SG_MAP_PATH']
410415

411-
self._unreal_execute_script(unreal_exec_path, unreal_project_path, script_path, script_args)
412-
413416
# =======================
414417
# 4. Render the turntable to movie.
415418
# Output the movie to the publish path
@@ -539,12 +542,12 @@ def _maya_export_fbx(self, fbx_output_path):
539542

540543
return True
541544

542-
def _unreal_execute_script(self, unreal_exec_path, unreal_project_path, script_path, script_args):
545+
def _unreal_execute_script(self, unreal_exec_path, unreal_project_path, script_path):
543546
command_args = []
544547
command_args.append(unreal_exec_path) # Unreal executable path
545548
command_args.append(unreal_project_path) # Unreal project
546549

547-
command_args.append('-ExecutePythonScript="{} {}"'.format(script_path, " ".join(script_args)))
550+
command_args.append('-ExecutePythonScript="{}"'.format(script_path))
548551
self.logger.info("Executing script in Unreal with arguments: {}".format(command_args))
549552

550553
print "COMMAND ARGS: %s" % (command_args)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[URL]
2+
3+
[/Script/HardwareTargeting.HardwareTargetingSettings]
4+
TargetedHardwareClass=Desktop
5+
AppliedTargetedHardwareClass=Desktop
6+
DefaultGraphicsPerformance=Maximum
7+
AppliedDefaultGraphicsPerformance=Maximum
8+
9+
[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
10+
bSupportsPortraitOrientation=False
11+
bSupportsUpsideDownOrientation=False
12+
bSupportsLandscapeLeftOrientation=True
13+
PreferredLandscapeOrientation=LandscapeLeft
14+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[/Script/EngineSettings.GeneralProjectSettings]
2+
ProjectID=B6599CB54F66B6CFD93DC3A95CB55C3D
628 KB
Binary file not shown.
1.08 MB
Binary file not shown.
69.7 KB
Binary file not shown.
20.5 KB
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"FileVersion": 3,
3+
"EngineAssociation": "4.21",
4+
"Category": "",
5+
"Description": "",
6+
"Enterprise": true,
7+
"Plugins": [
8+
{
9+
"Name": "PythonScriptPlugin",
10+
"Enabled": true
11+
}
12+
]
13+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+

0 commit comments

Comments
 (0)