@@ -988,7 +988,14 @@ def publish(self, settings, item):
988
988
# The FBX will be exported to a temp folder
989
989
# Another folder can be specified as long as the name has no spaces
990
990
# Spaces are not allowed in command line Unreal Python args
991
- temp_folder = tempfile .mkdtemp (suffix = "temp_unreal_shotgun" )
991
+
992
+ # Set a base temp dir on Windows to avoid having
993
+ # the user name in the temp path which can include
994
+ # "." e.g. firstname.name and makes UE crashes
995
+ base_temp_dir = None
996
+ if sys .platform == "win32" :
997
+ base_temp_dir = r"C:\Temp"
998
+ temp_folder = tempfile .mkdtemp (suffix = "temp_unreal_shotgun" , dir = base_temp_dir )
992
999
# Store the temp folder path on the item for cleanup in finalize
993
1000
item .local_properties ["temp_folder" ] = temp_folder
994
1001
fbx_folder = temp_folder
@@ -1043,7 +1050,7 @@ def publish(self, settings, item):
1043
1050
# Use the unreal_setup_turntable to do this in Unreal
1044
1051
self .logger .info ("Setting up Unreal turntable project..." )
1045
1052
# Copy the Unreal project in a temp location so we can modify it
1046
- temp_dir = tempfile .mkdtemp ()
1053
+ temp_dir = tempfile .mkdtemp (dir = base_temp_dir )
1047
1054
project_path , project_file = os .path .split (unreal_project_path )
1048
1055
project_folder = os .path .basename (project_path )
1049
1056
temp_project_dir = os .path .join (temp_dir , project_folder )
@@ -1591,12 +1598,31 @@ def evaluate_unreal_project_path(self, unreal_project_path_template, unreal_engi
1591
1598
)
1592
1599
)
1593
1600
1601
+ def _copy_to_publish (self , settings , item ):
1602
+ """
1603
+ Override base implementation to do nothing
1604
+ since we're not copying a file but rendering
1605
+ directly to the publish location.
1606
+ """
1607
+ pass
1608
+
1609
+ def _copy_local_to_publish (self , settings , item ):
1610
+ """
1611
+ Override base implementation to do nothing
1612
+ since we're not copying a file but rendering
1613
+ directly to the publish location.
1614
+ """
1615
+ pass
1616
+
1594
1617
def _copy_work_to_publish (self , settings , item ):
1595
1618
"""
1596
- Override base implementation to do nothing.
1619
+ Override base implementation to do nothing
1620
+ since we're not copying a file but rendering
1621
+ directly to the publish location.
1597
1622
"""
1598
1623
pass
1599
1624
1625
+
1600
1626
def _short_version (version ):
1601
1627
"""
1602
1628
Return a short major.minor version for the given version.
@@ -1608,7 +1634,7 @@ def _short_version(version):
1608
1634
"""
1609
1635
parts = version .split ("." , 2 )
1610
1636
if len (parts ) > 2 :
1611
- return "." .join (parts [:2 ])
1637
+ return "." .join (parts [:2 ])
1612
1638
return version
1613
1639
1614
1640
0 commit comments