Checking the version used to create a scene

If you can live with the flash of a command prompt window, you can use subprocess.Popen to get the scene file version from printver.

import subprocess

scn = 'C:\\Softimage\\XSI-EXP_3.0\\Data\\XSI_SAMPLES\\Scenes\\dog.scn'
p = subprocess.Popen( 'printver %s' % scn, stdout=subprocess.PIPE )
stdout = p.stdout.readlines()
print stdout[-1].split(':')[1].lstrip().rstrip()
# 3.0.2002.0715

#scn = 'C:\\Softimage\\XSI_7.01_x64\\Data\\XSI_SAMPLES\\Scenes\\ICE\\Particle_Basic_Fire.scn'
# 7.0.2008.0708

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s