Amazon VERSION 2.0V1 Podręcznik Użytkownika Strona 41

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 264
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 40
41
2. Navigate to the directory where you installed Katana.
3. Enter:
./katana --shell
Querying Launch Mode
To query the current Katana launch mode, call QtGui.qApp.type() while in Script or Interactive mode. This returns
an int, with value 1 if running in UI mode, and 0 if running in a headless mode.
The following script queries type() and prints the current launch mode:
from Katana import QtGui
if QtGui.qApp.type() == 1:
print( "Running in UI mode" )
elif QtGui.qApp.type() == 0:
print( "Running in headless mode" )
else:
print( "Error" )
While in Batch mode, the KATANA_BATCH_MODE environment variable is set. To retrieve this from AttributeScripts,
use the getEnv() syntax.
6 KATANA LAUNCH MODES |
Przeglądanie stron 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 263 264

Komentarze do niniejszej Instrukcji

Brak uwag