B. 脚本命令

From Stellarium

Jump to: navigation, search
命令 参数名称 参数值 说明
audioactionpause play sync【音频】【行为】【暂停、播放、同步】。音频功能仅在 Stellaium 使用音频选项进行编译后方能使用,否则将会在启示终端窗口报错(OSX, Linux) 或将错误写入 stdout.txt 文件(Windows)。错误信息为 ``This executable was compiled without audio support.
 filenameAUDIO_FILENAME【音频】【文件名】【音频文件名】。在 "play"(播放)行为时,指定播放的音频文件。支持多种媒体文件格式,推荐使用 Ogg Vorbis。WAV 格式也可以,但是在脚本快进时,WAV 音频无法同步(这是因为受到 SDL_Mixer 库的功能限制)。
 loopon off【音频】【循环播放】【开、关】。在 "play" 行为时指定是否循环播放音频文件,默认值是 “off”(关)。
 output_rateSAMPLES_PER_SECOND【音频】【输出采样率】【每秒采样率】。如CD音质的采样率是 “44100”。
 pause 【音频】【暂停】。
 play  【音频】【播放】。
 sync  【音频】【同步】。
 volumedecrement increment VOLUME_LEVEL【音频】【音量】【减小、增大、音量级别】。“VOLUME_LEVEL”(音量级别)大于等于 “0” 并小于等于 “1” 。
clearstatenatural【清除】【状态】【自然】关闭雾气效果、所有的名称显示和连线、星空艺术图像。显示恒星、行星、星云。取消天体选定。回复初始视角和观测方向。如果 “state” 的参数值设为 “natural”,则显示大地和大气效果,否则关闭这些显示。
datelocal[[-]YYYY-MM-DD]Thh:mm:ssSet time to a specified date and/or time using current timezone. 'T' is literal.
 utc[-]YYYY-MM-DDThh:mm:ssSet time to a specified date and time in UTC time. 'T' is literal.
 relativeDAYSChange date and time by DAYS (can be fractional).
 loadcurrentSet date to current date.
deselect  Deselects current object selection, including any constellation selection. See select command.
flagatmosphere 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 toggleSet 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
imageactionload dropDrop images when no longer needed to improve performance.
 altitudeALTITUDE_ANGLEFor positioning the center of the image in horizontal coordinates. Zero is at the horizon, 90 is at the zenith.
 azimuthAZIMUTH_ANGLEFor positioning the center of the image in horizontal coordinates. Zero is North, 90 is East.
 coordinate_systemviewport horizontalWhat coordinate system to use to position the image. Must be defined at image load. Can not be changed later. Default is viewport.
 dropnamedrops named image from memory
 durationSECONDSHow long to take to complete the command.
 filenameIMAGE_FILENAMEPath must be relative to script.
 nameIMAGE_NAMEUsed 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.
 alphaALPHA0 is transparent (default), 1 is opaque. ALPHA can be fractional. Note that images are drawn in the order they were loaded.
 scaleSCALEHow 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.
 rotationDEGREESAbsolute rotation, positive is clockwise.
 xposX_POSITIONWhere to draw center of image. 0 is center of viewport, 1 is right edge of viewport.
 yposY_POSITIONWhere to draw center of image. 0 is center of viewport, 1 is top edge of viewport.
landscapeload[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"
meteorszhrZENITH_HOURLY_RATEInteger number
lookdelta_azRADIANSChange the viewing angle by RADIANS (azimuth)
 delta_altRADIANSChange the viewing angle by RADIANS (altitude)
movetolatLATITUDESouth is negative
 lonLONGITUDEWest is negative
 altALTITUDEIn meters
 durationSECONDSHow long to take to effect this change.
scriptactionplay end pause resume record cancelrecordNote that pause toggles playback. If a script plays another script, the first will terminate.
 filenameSCRIPT_FILENAME
select  If no arguments are supplied, deselects current object. (Leaves constellation selection alone.) See deselect command.
 constellationCONSTELLATION_SHORT_NAME3 character abbreviation from constellationship.fab, case insensitive.
 constellation_starHP_NUMBERSelect the constellation which is made up by the specified star
 hpHP_NUMBERInteger Hipparcos catalogue number
 nebulaNEBULA_NAMEName as defined in nebula_textures.fab
 planetPLANET_NAMEName as defined in ssystem.ini
 pointeron 1 off 0Whether to draw the highlighting pointer around the selected object. Default is on.
setatmosphere_fade_durationSECONDSNumber of seconds it takes for atmosphere toggle to complete
 auto_move_durationSECONDSUsed for auto zoom
 constellation_art_fade_durationSECONDSNumber of seconds it takes for constellation art toggle to complete
 constellation_art_intensity0.0 .. 1.0Floating point number between 0 and 1
 home_planetPLANET_NAMEThe planet name comes from the ssystem.ini file. It is case sensitive
 landscape_nameLANDSCAPE_NAMEThe section name from landscape.ini
 max_mag_nebula_nameMAGNITUDEFloating point apparent magnitude value. Only label nebulas brighter than this
 max_mag_star_nameMAGNITUDEFloating point apparent magnitude value. Only label nebulas brighter than this
 milky_way_intensityINTENSITYDecimal number. 1 is normal brightness
 moon_scaleSCALE1 is real size
 nebula_scaleSCALE
 sky_cultureCUTURE_NAMEDirectory name from skycultures.fab
 sky_localeLOCATE_ID3 letter code. eng, fra, etc.
 star_mag_scaleMAG_SCALE
 star_scaleSCALE
 star_twinkle_amountAMOUNT0 is no twinkling
 time_zoneZONESystem dependent
timeraterateSECONDS_PER_SECONDSet simulation time rate.
 pause pause time
 resume resume time after pause
 increment increase time rate
 decrement decrease time rate
waitdurationSECONDSOnly useful in scripts. SECONDS can be fractional.
zoomautoin initial out"initial" returns to configured initial fov and viewing direction
 fovFIELD_OF_VIEWin degrees
 delta_fovDELTA_DEGREES
 durationSECONDSNot used with delta_fov
Personal tools