вторник, 29 декабря 2015 г.

Типа лаунчер.

Почему-то не удается менять разрешение, да и остальные параметры почему-то не работают. Надо думать. Но можно выбирать в окне или в полноэкранном режиме будет запущено.

P.S. ежу понятно, что все эти параметры для запуска не в питоне, а в командной оболочки оси. А вот как бы их туда засунуть...

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import subprocess

pathToPlayer = '/home/denis8424/blender-2.75-linux-glibc211-i686/blenderplayer'
arguments = '-f 1920 1080 32 60 -g show_profile = 0'
gameName = '/home/denis8424/bge/mipmap.blend'
x = subprocess.Popen([pathToPlayer, arguments, gameName])

Про параметры из самого блендерплейера:


usage:   /home/denis8424/blender-2.75-linux-glibc211-i686/blenderplayer [--options] filename.blend

Available options are: [-w [w h l t]] [-f [fw fh fb ff]] [-g gamengineoptions] [-s stereomode] [-m aasamples]
Optional parameters must be passed in order.
Default values are set in the blend file.

  -h: Prints this command summary

  -w: display in a window
       --Optional parameters--
       w = window width
       h = window height
       l = window left coordinate
       t = window top coordinate
       Note: To define 'w' or 'h', both must be used.Also, to define 'l' or 't', all four parameters must be used.
       Example: -w   or  -w 500 300  or  -w 500 300 0 0

  -f: start game in fullscreen mode
       --Optional parameters--
       fw = fullscreen mode pixel width    (use 0 to detect automatically)
       fh = fullscreen mode pixel height   (use 0 to detect automatically)
       fb = fullscreen mode bits per pixel (default unless set in the blend file: 32)
       ff = fullscreen mode frequency      (default unless set in the blend file: 60)
       Note: To define 'fw'' or 'fh'', both must be used.
       Example: -f  or  -f 1024 768  or  -f 0 0 16  or  -f 1024 728 16 30

  -s: start player in stereoscopy mode (requires 3D capable hardware)
       stereomode: nostereo         (default unless stereo is set in the blend file)
                   anaglyph         (Red-Blue glasses)
                   sidebyside       (Left Right)
                   syncdoubling     (Above Below)
                   3dtvtopbottom    (Squashed Top-Bottom for passive glasses)
                   interlace        (Interlace horizontally)
                   vinterlace       (Vertical interlace for autostereo display)
                   hwpageflip       (Quad buffered shutter glasses)
       Example: -s sidebyside  or  -s vinterlace

  -D: start player in dome mode
       --Optional parameters--
       angle    = field of view in degrees
       tilt     = tilt angle in degrees
       warpdata = a file to use for warping the image (absolute path)
       mode: fisheye                (Fisheye)
             truncatedfront         (Front-Truncated)
             truncatedrear          (Rear-Truncated)
             cubemap                (Cube Map)
             sphericalpanoramic     (Spherical Panoramic)
       Example: -D  or  -D mode cubemap

  -m: maximum anti-aliasing (eg. 2,4,8,16)

  -i: parent window's ID

  -d: turn debugging on

  -g: game engine options:

       Name                       Default      Description
       ------------------------------------------------------------------------
       fixedtime                      0         "Enable all frames"
       nomipmap                       0         Disable mipmaps
       show_framerate                 0         Show the frame rate
       show_properties                0         Show debug properties
       show_profile                   0         Show profiling information
       blender_material               0         Enable material settings
       ignore_deprecation_warnings    1         Ignore deprecation warnings

  - : all arguments after this are ignored, allowing python to access them from sys.argv

example: /home/denis8424/blender-2.75-linux-glibc211-i686/blenderplayer -w 320 200 10 10 -g noaudio /home/user/filename.blend
example: /home/denis8424/blender-2.75-linux-glibc211-i686/blenderplayer -g show_framerate = 0 /home/user/filename.blend
example: /home/denis8424/blender-2.75-linux-glibc211-i686/blenderplausage:   /home/denis8424/blender-2.75-linux-glibc211-i686/blenderplayer [--options] filename.blend

Комментариев нет:

Отправить комментарий