Skip to content

Commit 974ed5e

Browse files
NightlyBuildsNightlyBuilds
authored andcommitted
Updating lighting build
1 parent b77f889 commit 974ed5e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Scripts/BuildLighting.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def build_lighting( log_file ):
5050
except:
5151
log_file.write('Failed to open map {}\n'.format(map))
5252
log_file.flush()
53+
54+
p4.disconnect()
5355

5456
# Build the lighting
5557
uproject_file = env.get_env_variable( "Game", "uproject_file" )
@@ -59,6 +61,7 @@ def build_lighting( log_file ):
5961
map_list = '+'.join([map + '.umap' for map in map_names])
6062
result = subprocess.run( [ ue4_binaries_dir + 'UE4Editor-Cmd.exe', uproject_file, "-p4", "-submit", "-run=resavepackages" , "-buildlighting", "-quality=Production", "-allowcommandletrendering", '-map=' + map_list ], stdout=log_file )
6163

64+
p4.connect()
6265
# If the lighting build fails
6366
if( result.returncode != 0 ):
6467
p4.run('revert', '-c', 'default', '//...')
@@ -77,7 +80,7 @@ def build_lighting( log_file ):
7780

7881
return True
7982
except P4Exception:
80-
log_file.write('Perforce error encountered')
83+
log_file.write('Perforce error encountered ')
8184
for e in p4.errors:
8285
log_file.write( str(e) )
8386

0 commit comments

Comments
 (0)