()
Check if environment conditions allows to run script without errors
Check if environment conditions allows to run script without errors
Check if environment conditions allows to run script without errors
def checkConditions():
    '''
    Check if environment conditions allows to run script without errors
    '''
    if not SHOP_VRAY:  # If user select anything
        print '>> Nothing selected! Select SHOP network!'
        return 0
    elif SHOP_VRAY[0].type().name() != 'shopnet':  # If user select SHOP
        print '>> Wrong selection type. Select SHOP network!'
        return 0
    elif hou.node('/obj/{0}/'.format(nameSHOP_RED.format(SHOP_VRAY[0]))):  # If there is no RED target SHOP network
        print '>> Redshift SHOP already exists!'
        return 0
def checkConditions ( ) : if not SHOP_VRAY : # If user select anything print '>> Nothing selected! Select SHOP network!' return 0 elif SHOP_VRAY [ 0 ] . type ( ) . name ( ) != 'shopnet' : # If user select SHOP print '>> Wrong selection type. Select SHOP network!' return 0 elif hou . node ( '/obj/{0}/' . format ( nameSHOP_RED . format ( SHOP_VRAY [ 0 ] ) ) ) : # If there is no RED target SHOP network print '>> Redshift SHOP already exists!' return 0