예제 #1
0
def runHou(app,
           local=True,
           plug_rs=False,
           plug_mops=False,
           plug_qlib=False,
           plug_gdev=False,
           plug_aelib=False,
           plug_feathers=False):
    if local:
        useLocalHoudini()
    setHoudiniEnv()
    if plug_rs:
        setRedshiftEnv()
    if plug_mops:
        setMopsEnv()
    if plug_qlib:
        setQlibEnv()
    if plug_gdev:
        setGameDevEnv()
    if plug_aelib:
        setAeLib()
    if plug_feathers:
        setFeatherTools()

    args = ' '.join(sys.argv[1:])
    cmd = env['HB'] + '/%s %s' % (app, args)
    print 'Starting', cmd
    print la_utils.runCmd(cmd, env)
예제 #2
0
def runMaya(app, local=False):
    if local:
        useLocalMaya()
    setMayaEnv()

    args = ' '.join(sys.argv[1:])
    cmd = '%s %s' % (app, args)
    print 'Starting', cmd
    print la_utils.runCmd(cmd, env)
예제 #3
0
def la_getImageSize(image):
    import json

    cmd = ffprobe
    cmd += ' -v quiet'
    cmd += ' -print_format json'
    cmd += ' -show_streams'
    cmd += ' %s' % (image)

    cmd_return = la_utils.runCmd(cmd)
    jsn_return = json.loads(cmd_return)
    width = jsn_return['streams'][0]['width']
    height = jsn_return['streams'][0]['height']
    dim = [int(width), int(height)]
    return dim
예제 #4
0
                if not os.path.exists(new_folder):
                    os.makedirs(new_folder)
                cmd = ffmpeg + ' -y '  #-hide_banner -loglevel panic -threads 8'
                cmd += ' -gamma 2.2'
                cmd += ' -r 50'
                cmd += ' -i %s' % old_name
                cmd += ' -pix_fmt yuv420p'
                cmd += ' -c:v libx264'
                cmd += ' -crf 23'
                # cmd += ' -vf scale -1:240:flags=bicubic'
                # cmd += ' -vf scale=-2:240'
                cmd += ' -vf scale=-2:720'
                cmd += ' %s' % new_name
                cmd = cmd.replace('\\', '/')
                # print cmd
                print 'Converting %s' % old_name,
                la_utils.runCmd(cmd)
                print 'DONE'
# Scaling algorithms
# fast_bilinear
# bilinear
# bicubic
# experimental
# neighbor
# area
# bicublin
# gauss
# sinc
# lanczos
# spline
예제 #5
0
path = str(settings['location'][opsys])
blender = path + '/blender'

print 'Starting luma remote blender.'
print 'Running from %s.' % path

# Set environment #############################################################
env = dict()
env['PATH'] = os.environ['PATH']
env['PATH'] += os.pathsep + 'X:/_studiotools/software/ffmpeg/bin' + os.pathsep
env['TMP'] = '/tmp'
env['TEMP'] = '/tmp'
env['LA_ROOT'] = os.environ['LA_ROOT']
env['LA_VENV'] = os.environ['LA_VENV']
env['LA_BRANCH'] = os.environ['LA_BRANCH']
if opsys is 'win':
    env['SystemRoot'] = 'C:/Windows'
    env['TMP'] = 'C:/tmp'
    env['TEMP'] = 'C:/tmp'


def setBlenderEnv():
    pass


args = ' '.join(sys.argv[1:])
cmd = blender + ' ' + args
cmd = cmd.replace('\\', '/')
print cmd
la_utils.runCmd(cmd, env)