B. 脚本命令

From Stellarium Wiki
Revision as of 15:59, 10 August 2007 by Liuchunbin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
命令 参数名称 参数值 说明
audio action pause play sync 【音频】【行为】【暂停、播放、同步】。音频功能仅在 Stellaium 使用音频选项进行编译后方能使用,否则将会在启示终端窗口报错(OSX, Linux) 或将错误写入 stdout.txt 文件(Windows)。错误信息为 ``This executable was compiled without audio support.
  filename AUDIO_FILENAME 【音频】【文件名】【音频文件名】。在 "play"(播放)行为时,指定播放的音频文件。支持多种媒体文件格式,推荐使用 Ogg Vorbis。WAV 格式也可以,但是在脚本快进时,WAV 音频无法同步(这是因为受到 SDL_Mixer 库的功能限制)。
  loop on off 【音频】【循环播放】【开、关】。在 "play" 行为时指定是否循环播放音频文件,默认值是 “off”(关)。
  output_rate SAMPLES_PER_SECOND 【音频】【输出采样率】【每秒采样率】。如CD音质的采样率是 “44100”。
  pause   【音频】【暂停】。
  play   【音频】【播放】。
  sync   【音频】【同步】。
  volume decrement increment VOLUME_LEVEL 【音频】【音量】【减小、增大、音量级别】。“VOLUME_LEVEL”(音量级别)大于等于 “0” 并小于等于 “1” 。
clear state natural 【清除】【状态】【自然】关闭雾气效果、所有的名称显示和连线、星空艺术图像。显示恒星、行星、星云。取消天体选定。回复初始视角和观测方向。如果 “state” 的参数值设为 “natural”,则显示大地和大气效果,否则关闭这些显示。
date local [[-]YYYY-MM-DD]Thh:mm:ss Set time to a specified date and/or time using current timezone. 'T' is literal.
  utc [-]YYYY-MM-DDThh:mm:ss Set time to a specified date and time in UTC time. 'T' is literal.
  relative DAYS Change date and time by DAYS (can be fractional).
  load current Set date to current date.
deselect   Deselects current object selection, including any constellation selection. See select command.
flag atmosphere azimuthal_grid

bright_nebulae

cardinal_points

chart

constellation_art

constellation_boundaries

constellation_drawing

constellation_names

constellation_pick

ecliptic_line

enable_move_keys

enable_tui_menu

enable_zoom_keys

equator_line

equatorial_grid

fog

gravity_labels

help

infos

moon_scaled

landscape

landscape_sets_location

manual_zoom

menu

meridian_line

milky_way

nebulae

nebula_names

night

object_trails

planets

planet_names

planet_orbits

point_star

script_gui_debug

show_appname

show_date

show_fov

show_fps

show_gravity_ui

show_script_bar

show_selected_object_info

show_time

show_topbar

show_tui_datetime

show_tui_short_obj_info

star_names

star_twinkle

stars

track_object

on 1 off 0 toggle Set rendering flags. One argument name per command allowed currently. track_object is only useful while an object is selected. The following flags are key user settings and are not accessible from scripts: enable_move_keys enable_move_mouse enable_tui_menu enable_zoom_keys gravity_labels help horizon infos menu show_appname show_date show_fov show_fps show_gravity_ui show_time show_topbar utc_time
image action load drop Drop images when no longer needed to improve performance.
  altitude ALTITUDE_ANGLE For positioning the center of the image in horizontal coordinates. Zero is at the horizon, 90 is at the zenith.
  azimuth AZIMUTH_ANGLE For positioning the center of the image in horizontal coordinates. Zero is North, 90 is East.
  coordinate_system viewport horizontal What coordinate system to use to position the image. Must be defined at image load. Can not be changed later. Default is viewport.
  drop name drops named image from memory
  duration SECONDS How long to take to complete the command.
  filename IMAGE_FILENAME Path must be relative to script.
  name IMAGE_NAME Used to refer to the image in later calls to manipulate the image. Images must be in PNG format. If images do not have dimensions that are powers of 2 (128, 256, etc.) they are re-sized when loaded to meet this requirement.
  alpha ALPHA 0 is transparent (default), 1 is opaque. ALPHA can be fractional. Note that images are drawn in the order they were loaded.
  scale SCALE How large to draw the image. In viewport coordinates, at 1 the image is scaled to fit maximized in the viewport. In horizontal coordinates, this defines the maximum angular width of the image in degrees.
  rotation DEGREES Absolute rotation, positive is clockwise.
  xpos X_POSITION Where to draw center of image. 0 is center of viewport, 1 is right edge of viewport.
  ypos Y_POSITION Where to draw center of image. 0 is center of viewport, 1 is top edge of viewport.
landscape load [variable] Load a landscape. Arguments have same names and possible values as in a landscape.ini file except that texture file names need to be specified in full including the path relative to the script. Also add argument "action load"
meteors zhr ZENITH_HOURLY_RATE Integer number
look delta_az RADIANS Change the viewing angle by RADIANS (azimuth)
  delta_alt RADIANS Change the viewing angle by RADIANS (altitude)
moveto lat LATITUDE South is negative
  lon LONGITUDE West is negative
  alt ALTITUDE In meters
  duration SECONDS How long to take to effect this change.
script action play end pause resume record cancelrecord Note that pause toggles playback. If a script plays another script, the first will terminate.
  filename SCRIPT_FILENAME
select   If no arguments are supplied, deselects current object. (Leaves constellation selection alone.) See deselect command.
  constellation CONSTELLATION_SHORT_NAME 3 character abbreviation from constellationship.fab, case insensitive.
  constellation_star HP_NUMBER Select the constellation which is made up by the specified star
  hp HP_NUMBER Integer Hipparcos catalogue number
  nebula NEBULA_NAME Name as defined in nebula_textures.fab
  planet PLANET_NAME Name as defined in ssystem.ini
  pointer on 1 off 0 Whether to draw the highlighting pointer around the selected object. Default is on.
set atmosphere_fade_duration SECONDS Number of seconds it takes for atmosphere toggle to complete
  auto_move_duration SECONDS Used for auto zoom
  constellation_art_fade_duration SECONDS Number of seconds it takes for constellation art toggle to complete
  constellation_art_intensity 0.0 .. 1.0 Floating point number between 0 and 1
  home_planet PLANET_NAME The planet name comes from the ssystem.ini file. It is case sensitive
  landscape_name LANDSCAPE_NAME The section name from landscape.ini
  max_mag_nebula_name MAGNITUDE Floating point apparent magnitude value. Only label nebulas brighter than this
  max_mag_star_name MAGNITUDE Floating point apparent magnitude value. Only label nebulas brighter than this
  milky_way_intensity INTENSITY Decimal number. 1 is normal brightness
  moon_scale SCALE 1 is real size
  nebula_scale SCALE
  sky_culture CUTURE_NAME Directory name from skycultures.fab
  sky_locale LOCATE_ID 3 letter code. eng, fra, etc.
  star_mag_scale MAG_SCALE
  star_scale SCALE
  star_twinkle_amount AMOUNT 0 is no twinkling
  time_zone ZONE System dependent
timerate rate SECONDS_PER_SECOND Set simulation time rate.
  pause   pause time
  resume   resume time after pause
  increment   increase time rate
  decrement   decrease time rate
wait duration SECONDS Only useful in scripts. SECONDS can be fractional.
zoom auto in initial out "initial" returns to configured initial fov and viewing direction
  fov FIELD_OF_VIEW in degrees
  delta_fov DELTA_DEGREES
  duration SECONDS Not used with delta_fov
Personal tools
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox