Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/build_systems/cmake.txt82
-rw-r--r--doc/license/bf-members.txt100
-rw-r--r--doc/manpage/blender.124
-rw-r--r--doc/python_api/examples/bpy.props.5.py89
-rw-r--r--doc/python_api/examples/bpy.types.AddonPreferences.1.py72
-rw-r--r--doc/python_api/examples/bpy.types.NodeTree.py23
-rw-r--r--doc/python_api/examples/bpy.types.UIList.py90
-rw-r--r--doc/python_api/rst/bge.events.rst4
-rw-r--r--doc/python_api/rst/bge.logic.rst18
-rw-r--r--doc/python_api/rst/bge.types.rst5261
-rw-r--r--doc/python_api/rst/bge_types/bge.types.BL_ActionActuator.rst78
-rw-r--r--doc/python_api/rst/bge_types/bge.types.BL_ArmatureActuator.rst61
-rw-r--r--doc/python_api/rst/bge_types/bge.types.BL_ArmatureBone.rst105
-rw-r--r--doc/python_api/rst/bge_types/bge.types.BL_ArmatureChannel.rst278
-rw-r--r--doc/python_api/rst/bge_types/bge.types.BL_ArmatureConstraint.rst129
-rw-r--r--doc/python_api/rst/bge_types/bge.types.BL_ArmatureObject.rst34
-rw-r--r--doc/python_api/rst/bge_types/bge.types.BL_Shader.rst220
-rw-r--r--doc/python_api/rst/bge_types/bge.types.BL_ShapeActionActuator.rst72
-rw-r--r--doc/python_api/rst/bge_types/bge.types.CListValue.rst72
-rw-r--r--doc/python_api/rst/bge_types/bge.types.CPropValue.rst11
-rw-r--r--doc/python_api/rst/bge_types/bge.types.CValue.rst17
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_ArmatureSensor.rst36
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst77
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_Camera.rst284
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_CameraActuator.rst47
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst45
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_ConstraintActuator.rst78
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst18
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_FontObject.rst12
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_GameActuator.rst23
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst839
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_IpoActuator.rst65
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_LibLoadStatus.rst45
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_LightObject.rst90
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_MeshProxy.rst134
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst66
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_NavMeshObject.rst47
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_NearSensor.rst23
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_NetworkMessageActuator.rst35
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_NetworkMessageSensor.rst38
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_ObjectActuator.rst129
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_ParentActuator.rst38
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_PolyProxy.rst139
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_PolygonMaterial.rst250
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_RadarSensor.rst44
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_RaySensor.rst72
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_SCA_AddObjectActuator.rst55
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_SCA_DynamicActuator.rst29
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_SCA_EndObjectActuator.rst13
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_SCA_ReplaceMeshActuator.rst89
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_Scene.rst172
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_SceneActuator.rst49
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_SoundActuator.rst115
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_StateActuator.rst29
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_SteeringActuator.rst71
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_TouchSensor.rst41
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst39
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_VehicleWrapper.rst161
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_VertexProxy.rst209
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_VisibilityActuator.rst29
-rw-r--r--doc/python_api/rst/bge_types/bge.types.PyObjectPlus.rst21
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_2DFilterActuator.rst49
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_ANDController.rst13
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_ActuatorSensor.rst19
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_AlwaysSensor.rst11
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_DelaySensor.rst39
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_IActuator.rst11
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_IController.rst55
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_ILogicBrick.rst29
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_IObject.rst11
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_ISensor.rst95
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_JoystickSensor.rst133
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_KeyboardSensor.rst64
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_MouseSensor.rst39
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_NANDController.rst13
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_NORController.rst13
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_ORController.rst13
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_PropertyActuator.rst29
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_PropertySensor.rst41
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst48
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_PythonJoystick.rst75
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst37
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_PythonMouse.rst35
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst127
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_RandomSensor.rst23
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_XNORController.rst13
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_XORController.rst13
-rw-r--r--doc/python_api/rst/info_tutorial_addon.rst18
-rw-r--r--doc/python_api/rst_from_bmesh_opdefines.py50
-rw-r--r--doc/python_api/sphinx_doc_gen.py43
-rwxr-xr-xdoc/python_api/sphinx_doc_gen.sh8
-rw-r--r--doc/python_api/sphinx_doc_gen_monkeypatch.py47
92 files changed, 6427 insertions, 5423 deletions
diff --git a/doc/build_systems/cmake.txt b/doc/build_systems/cmake.txt
index b7a6bd9871e..c46978df2fa 100644
--- a/doc/build_systems/cmake.txt
+++ b/doc/build_systems/cmake.txt
@@ -7,12 +7,9 @@
1. Introduction
2. Obtaining CMake
- 3. Obtaining Dependencies
- 4. Deciding on a Build Environment
- 5. Configuring the build for the first time
- 6. Configuring the build after SVN updates
- 7. Specify alternate Python library versions and locations
-
+ 3. Building Blender
+ 4. Generic Setup
+ 5. Configuring the build after SVN updates
1. Introduction
---------------
@@ -28,36 +25,17 @@
The website also contains some documentation on CMake usage but I found
the man page alone pretty helpful.
- 3. Obtaining Dependencies
- -------------------------
-
- Check from the page
- http://www.blender.org/cms/Getting_Dependencies.135.0.html that you
- have all dependencies needed for building Blender. Note that for
- windows many of these dependencies already come in the lib/windows
- module from SVN.
-
- 4. Deciding on a Build Environment
- ----------------------------------
-
- To build Blender with the CMake scripts you first need to decide which
- build environment you feel comfortable with. This decision will also be
- influenced by the platform you are developing on. The current implementation
- have been successfully used to generate build files for the following
- environments:
+ 3. Building Blender
+ -------------------
- 1. Microsoft Visual Studio 2008. There is a free version available
- at http://http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
+ Building Blender requires obtaining a compiler, library dependencies,
+ and correct setup depending on the system. For details on how to set
+ up a build on various operating systems, see the wiki documentation:
- 2. Xcode on Mac OSX
+ http://wiki.blender.org/index.php/Dev:Doc/Building_Blender
- 3. Unix Makefiles (On Linux and Mac OSX): CMake actually creates make
- files which generates nicely color coded output and a percentage
- progress indicator.
-
-
- 5. Configuring the build for the first time
- -------------------------------------------
+ 4. Generic Setup
+ ----------------
CMake allows one to generate the build project files and binary objects
outside the source tree which can be pretty handy in working and experimenting
@@ -113,42 +91,14 @@
It is also possible to use the commandline of 'cmake' to override certain
of these settings.
- 6. Configuring the build after SVN updates
+ 5. Configuring the build after SVN updates
------------------------------------------
The $BLENDERBUILD directory maintains a file called CMakeCache.txt which
remembers the initial run's settings for subsequent generation runs. After
- every SVN update it may be a good idea to rerun the generation before building
- Blender again. Just rerun the original 'cmake' run to do this, the settings
- will be remembered. For the example above the following will do after every
- 'svn up':
-
- % cmake -G Xcode $BLENDERSOURCE
-
- 7. Specify alternate Python library versions and locations
- ----------------------------------------------------------
-
- The commandline can be used to override detected/default settings, e.g:
-
- On Unix:
- cmake -D PYTHON_LIBRARY=/usr/local/lib/python3.2/config/libpython3.2.so -D PYTHON_INCLUDE_DIR=/usr/local/include/python3.2 ../blender
- On Macs:
- cmake -D PYTHON_INCLUDE_DIRS=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 -G Xcode ../blender
-
- Mote that this should only be needed once per build directory generation because it will keep the overrides in CMakeCache.txt for subsequent runs.
-
-
-
- To be continued...
-
- TODO's
- ------
-
- 1. Get CMake to create proper distribution directories for the various platforms
- like scons does.
- 2. Investigate the viability of using CPack to package installs automatically.
- 3. Refine this document and write detailed developer's document.
- 4. Make sure all options (ffmpeg, openexr, quicktime) has proper CMake support
- on the various platforms.
+ SVN updates that contain changes to the build system, rebuilding Blender will
+ automatically invoke CMake to regenerate the CMakeCache.txt and other files
+ as needed.
/Jacques Beaurain (jbinto)
+
diff --git a/doc/license/bf-members.txt b/doc/license/bf-members.txt
index 41aad8b7264..d2f71a56ad5 100644
--- a/doc/license/bf-members.txt
+++ b/doc/license/bf-members.txt
@@ -35,7 +35,7 @@ Eric Van Hensbergen
Christian Reichlin
brian moore
Anthony Walker
-Carsten Hšfer
+Carsten Höfer
Raymond Fordham
David Megginson
Jason Schmidt
@@ -78,7 +78,7 @@ Ken Payne
DEBEUX Sylvain
Douglas Philips
Lai Che Hung
-Johan Bolmsjš
+Johan Bolmsjö
Aaron Mitchell
Teinye Horsfall
Martin Marbach
@@ -98,7 +98,7 @@ lukas schroeder
Dan Lyke
Mark Thorpe
A.D. Arul Nirai Selvan
-Herbert Pštzl
+Herbert Pötzl
Andy Payne
LAFFITTE Benoit (KenjForce)
James Ertle
@@ -148,7 +148,7 @@ Kendall Dugger
Brice Due
Simon Vogl
Bernd Koestler
-clŽment CORDIER
+clément CORDIER
CreationAnimation.com
Pete Carss
HERSEN Antoine
@@ -197,9 +197,9 @@ cadic jean-yves
Ralf Pietersz
KAZY
serge Jadot
-HervŽ LOUINET
+Hervé LOUINET
Tom Houtman
-Magnus Kššhler
+Magnus Kööhler
Martin Sinnaeve
Kevin Yank
Tomoichi Iriyama
@@ -221,12 +221,12 @@ Gianluigi Belli
Naoki Abe
NOTTE Jean-Pierre
Jack Way
-Bjšrn Westlin
+Björn Westlin
Mitch Magee
wizoptic
Jake Edge
David Hoover
-Xabier Go–i
+Xabier Goñi
Daniel Fort
Erik Noteboom
Pavel Vostatek
@@ -234,7 +234,7 @@ Javier Belanche Alonso
Jeffrey Blank
Nathan Ryan
Peter Wrangell
-Josef Sie§
+Josef Sieß
Timm Krumnack
Steve Martin
Shigeru Matsumoto
@@ -261,7 +261,7 @@ Colin Foster
Sascha Adler
Stuart Duncan
Brendon Smith
-SŽbastien COLLETTE
+Sébastien COLLETTE
Clemens Auer
Kay Fricke
Fabian Fagerholm
@@ -282,7 +282,7 @@ STEMax
Jeff Cox
Trevor Ratliff
Matt Henley
-Franois VALETTE
+François VALETTE
Rob Saunders
Mike Luethi
Rami Aubourg-Kaires
@@ -290,9 +290,9 @@ Matthew Thomas
Allan Jacobsen
Adam Lowe
David Hostetler
-Lo•c Vigneras
+Loïc Vigneras
Dan Reiland
-Pedro D’az del Arco
+Pedro Díaz del Arco
Pierre Beyssac
Chris Davey
YOSHIAKI Nishino
@@ -385,7 +385,7 @@ Kiernan Holland
Holger Malessa
Masanori Okuda
Andrea Maracci
-Kai-Peter BŠckman
+Kai-Peter Bäckman
Gregg Patton
Luis M Ibarra
Julian Green
@@ -394,7 +394,7 @@ Mark Winkelman
Ebbe L. Nielsen
Carlos Orozco
magnetHead
-KrŸckel Oliver
+Krückel Oliver
Thomas Ingham
Wes Devauld
Uwe Steinmann
@@ -417,7 +417,7 @@ Steve Mackay
NDNWarrior
Christopher Gray
Darius Clarke (Socinian)
-Jean-SŽbastien SEVESTRE
+Jean-Sébastien SEVESTRE
Douglas Fellows
Craig Symons
Quincin Gonjon
@@ -447,7 +447,7 @@ Markus Q. Roberts
Christoher Bartak
Peter Truog
Eric Dynowski
-Philipp GŸhring
+Philipp Gühring
Pierre-Yves RANNO
Jason Nollan (Cluh)
Launay Jean-Claude
@@ -465,7 +465,7 @@ TROJANI Cedric
David Polston
Patrick Mullen
Tetsuya Okuno
-Bodo JŠger
+Bodo Jäger
Leon Brooks
Cedric Adjih
Michael L. Fisher
@@ -521,7 +521,7 @@ Vincent Stoessel
Adrian Virnig
Chris Dixon
Travis Cole
-MŒrten MŒrtensson
+MÃ¥rten MÃ¥rtensson
Evan Scott
Mark Coletti
Ken Burke
@@ -541,7 +541,7 @@ Iain Russell
Thomas Bleicher
Anthony Zishka
Jefferson Dubrule
-Esa PiirilŠ
+Esa Piirilä
Bill Thiede
William Anderson
Alexander Kittel
@@ -561,7 +561,7 @@ John DiLauro
John Miller
Frederic Crozat
Matt Welland
-Paul CalcŽ
+Paul Calcé
Joe Prochilo
Justin Shafer
Joe Croft
@@ -571,7 +571,7 @@ Alain Gallo
Phuoc Ngo
Krabat
Derek Harmison
-SŽbastien Devine
+Sébastien Devine
Kenneth P. Stox
Wade Felde
Kai Groshert
@@ -603,7 +603,7 @@ Martin Forisch
Guillermina Manon
Randal D. Adams
Kevin Reagh (kevin3D)
-Wolfgang KŸhn
+Wolfgang Kühn
BEAUSOLEIL Arnaud
Stan Jakubek
Klaus Brand
@@ -628,7 +628,7 @@ Samuel Seay
Mike Schaudies
Robert Sherwood
Fernando Villalon Panzano
-Jšrg Roschke
+Jörg Roschke
Carl Symons
Peter Pichler
Alan Heckart
@@ -714,7 +714,7 @@ Rau, Bernhard
Stephen Uithoven
Ken Beyer
Matjaz Jakopec
-Eckhard M. JŠger
+Eckhard M. Jäger
Mike Siebach
John Harger
Justin W. Carper
@@ -747,7 +747,7 @@ Karl Bartel
Ralph Howes
Matthew J. Stott
Omar Priego
-ke Westerstršm
+Åke Westerström
Imago Viva
James E Hill
Rune Myrland
@@ -785,7 +785,7 @@ Claude Bilat
Mario Palomo
Neipi
Grethus Bode
-Jan MŸller
+Jan Müller
Mark Pearson
Stanislav Osicka
DataCare Solutions AG
@@ -804,9 +804,9 @@ Aaron Bredon
Hideki Suzuki
josef radinger
Robert Friemer
-Jšrg Zastrau
+Jörg Zastrau
Burton Bicksler
-Kimmo Mšsš
+Kimmo Mösö
Robert F Johnson
Mark Johnson
Avi Bercovich
@@ -821,21 +821,21 @@ Duffaud
Marco Ardito
Simon Suter
Tobias Huelsdau
-Winfried EnglŠnder
+Winfried Engländer
Stephen Groundwater
Joel Ray Holveck
Mag. Tibor Rudas
Hartmut Wolf
Douglas Jones
brett hartshorn
-Beat MŠgert
+Beat Mägert
Javon Prince
bri
James Klicman
Harvey Fong
jeroen v.d. Meulen
Wim Vandersmissen
-Carlos Moreno Rodr’guez
+Carlos Moreno Rodríguez
Trausti Kristjansson
Larry Snyder
olivier
@@ -887,7 +887,7 @@ Fred Roberts
Njin-Zu Chen
GUILLON Marc
Felix Klock
-Ernesto Salas Rodr’guez
+Ernesto Salas Rodríguez
Pavel Roskin
Jaap
Stefan Maass
@@ -911,7 +911,7 @@ delerue
Dirk Behrens
Doc Holiday
Wouter Kerkhoven
-Andreas BŸttner
+Andreas Büttner
James Black
Nicholas Ward
David Oberbeck
@@ -940,7 +940,7 @@ Ian Whitworth
Ruud H.G. van Tol
Pierre Lo Cicero
Srinivas Digumarty
-digitalvelocity¨
+digitalvelocity®
Alan J Booth
Tony OBrien
Douglas Toltzman
@@ -957,12 +957,12 @@ Craig Spitzer
Jeffrey Van Ness
Lucas Vergnettes
Wolfgang Michaelis
-Luis JimŽnez Linares
+Luis Jiménez Linares
Julian Eden
Ms Lilo von Hanffstengel
Kurt B. Kaiser
Mark Ping
-CombŽe
+Combée
Diego Matho
MELIN Philippe
Damian Sobieralski
@@ -1028,7 +1028,7 @@ evolutie
Stephane Portha
Robert Gentner
David B. Camhy
-RenŽ Foucart
+René Foucart
Coyok Drio
Mark Ng
klein michael
@@ -1094,14 +1094,14 @@ Stuart MacKinnon
Dietrich Dietz - the IMaGiNation project (IMGN)
Tina Hirsch
John R Thorp
-FrŽdŽric Bouvier
+Frédéric Bouvier
LINETTE
Felix Rabe
Chay Adamou
nick harron
stephen john ford
Kino
-Daniel Sjšlie
+Daniel Sjölie
Matthias Derer
Alain VALLETON
Kervin Pierre
@@ -1142,13 +1142,13 @@ Satoshi Yamasaki
Rolf-Dieter Klein
J. Deetman
Helge Walter
-Roland StrŒlberg
+Roland Strålberg
Nicolas Morenas (Caronte)
Simon Clarke
Maigrot Michel
Rod Robinson
Kevin Cozens
-Germ‡n Alonso (taz)
+Germán Alonso (taz)
Martin Stegeman
Henrik Jordfald Olsen
Mitchell Skinner
@@ -1157,7 +1157,7 @@ Spiridon G. Kontarakis
Bas Denissen
Loic Dachary
Michael Rutter
-Thorsten SchlŸter
+Thorsten Schlüter
hijothema
Andreas Hauser
Holger Haase
@@ -1232,9 +1232,9 @@ Starr Kline
John Lullie
Chiffi Cosimo
Morgan McMillian
-Stefan HŸbner
+Stefan Hübner
Loic de MONTAIGNAC
-AndrŽs Castillo
+Andrés Castillo
Francesco Anselmo
Ingo Guenther
James C. Davis, Jr.
@@ -1314,7 +1314,7 @@ Luke Titley
marinus meijers
Henry Kaminski
Alistair Riddoch
-Daniel NŸmm
+Daniel Nümm
Matthew Meadows
Bjoern Paschen
Paul Fredrickson
@@ -1325,7 +1325,7 @@ Thomas Muldowney
Cheyenne Cloud, LLC
Helmut A. Goettl
Martin A. Boegelund
-Beno”t Cousson
+Benoît Cousson
Scott Brooks
Ferlet Patrice
Aaron Porterfield
@@ -1335,13 +1335,13 @@ Rui Paulo Sanguinheira Diogo
Jason Saville
Active-Websight GbR
Bryon Roche
-Gustavo Mu–oz
+Gustavo Muñoz
Christopher Gillanders
Phil Frost Tate
Gilles Gonon
Kay
James C. Franklin
-Luis Enrique Caama–o Navas
+Luis Enrique Caamaño Navas
Alexander "estartu" Felder
Marc Ledermann
vrijschrift.org
@@ -1371,7 +1371,7 @@ Maurizio Sibaud
Ron Bolger
Nathan Parton
Andrew Fry
-VINCENT StŽphane
+VINCENT Stéphane
Yan Yan
Justin L Graham
Wade Beasley
diff --git a/doc/manpage/blender.1 b/doc/manpage/blender.1
index 2addb60c5f7..9cefe7a2b24 100644
--- a/doc/manpage/blender.1
+++ b/doc/manpage/blender.1
@@ -1,4 +1,4 @@
-.TH "BLENDER" "1" "December 04, 2012" "Blender Blender 2\&.65"
+.TH "BLENDER" "1" "February 14, 2013" "Blender Blender 2\&.66"
.SH NAME
blender \- a 3D modelling and rendering package
@@ -15,7 +15,7 @@ Use Blender to create TV commercials, to make technical visualizations, business
http://www.blender.org
.SH OPTIONS
-Blender 2.65
+Blender 2.66
Usage: blender [args ...] [file] [args ...]
.br
.SS "Render Options:"
@@ -218,6 +218,12 @@ Turn debugging on
Enable floating point exceptions
.br
+.TP
+.B \-\-disable\-crash\-handler
+.br
+Disable the crash handler
+.br
+
.IP
.TP
@@ -301,7 +307,13 @@ Disable automatic python script execution (pydrivers & startup scripts)
.TP
.B \-P or \-\-python <filename>
.br
-Run the given Python script (filename or Blender Text)
+Run the given Python script file
+.br
+
+.TP
+.B \-\-python\-text <name>
+.br
+Run the given Python script text block
.br
.TP
@@ -398,6 +410,12 @@ Register .blend extension, then exit (Windows only)
Silently register .blend extension, then exit (Windows only)
.br
+.TP
+.B \-\-no\-native\-pixels
+.br
+Do not use native pixel size, for high resolution displays (MacBook 'Retina')
+.br
+
.SS "Argument Parsing:"
arguments must be separated by white space. eg
diff --git a/doc/python_api/examples/bpy.props.5.py b/doc/python_api/examples/bpy.props.5.py
new file mode 100644
index 00000000000..1f61e33c30f
--- /dev/null
+++ b/doc/python_api/examples/bpy.props.5.py
@@ -0,0 +1,89 @@
+"""
+Get/Set Example
+++++++++++++++
+
+Get/Set functions can be used for boolean, int, float, string and enum properties.
+If these callbacks are defined the property will not be stored in the ID properties
+automatically, instead the get/set functions will be called when the property is
+read or written from the API.
+"""
+
+import bpy
+
+
+# Simple property reading/writing from ID properties.
+# This is what the RNA would do internally.
+def get_float(self):
+ return self["testprop"]
+
+
+def set_float(self, value):
+ self["testprop"] = value
+
+bpy.types.Scene.test_float = bpy.props.FloatProperty(get=get_float, set=set_float)
+
+
+# Read-only string property, returns the current date
+def get_date(self):
+ import datetime
+ return str(datetime.datetime.now())
+
+bpy.types.Scene.test_date = bpy.props.StringProperty(get=get_date)
+
+
+# Boolean array. Set function stores a single boolean value, returned as the second component.
+# Array getters must return a list or tuple
+# Array size must match the property vector size exactly
+def get_array(self):
+ return (True, self["somebool"])
+
+
+def set_array(self, values):
+ self["somebool"] = values[0] and values[1]
+
+bpy.types.Scene.test_array = bpy.props.BoolVectorProperty(size=2, get=get_array, set=set_array)
+
+
+# Enum property.
+# Note: the getter/setter callback must use integer identifiers!
+test_items = [
+ ("RED", "Red", "", 1),
+ ("GREEN", "Red", "", 2),
+ ("BLUE", "Red", "", 3),
+ ("YELLOW", "Red", "", 4),
+ ]
+
+
+def get_enum(self):
+ import random
+ return random.randint(1, 4)
+
+
+def set_enum(self, value):
+ print("setting value", value)
+
+bpy.types.Scene.test_enum = bpy.props.EnumProperty(items=test_items, get=get_enum, set=set_enum)
+
+
+# Testing
+
+scene = bpy.context.scene
+
+scene.test_float = 12.34
+print(scene.test_float)
+
+scene.test_array = (True, False)
+print([x for x in scene.test_array])
+
+#scene.test_date = "blah" # this would fail, property is read-only
+print(scene.test_date)
+
+scene.test_enum = 'BLUE'
+print(scene.test_enum)
+
+
+# >>> 12.34000015258789
+# >>> [True, False]
+# >>> 2013-01-05 16:33:52.135340
+# >>> setting value 3
+# >>> GREEN
diff --git a/doc/python_api/examples/bpy.types.AddonPreferences.1.py b/doc/python_api/examples/bpy.types.AddonPreferences.1.py
new file mode 100644
index 00000000000..73f90acb3fa
--- /dev/null
+++ b/doc/python_api/examples/bpy.types.AddonPreferences.1.py
@@ -0,0 +1,72 @@
+bl_info = {
+ "name": "Example Addon Preferences",
+ "author": "Your Name Here",
+ "version": (1, 0),
+ "blender": (2, 65, 0),
+ "location": "SpaceBar Search -> Addon Preferences Example",
+ "description": "Example Addon",
+ "warning": "",
+ "wiki_url": "",
+ "tracker_url": "",
+ "category": "Object"}
+
+
+import bpy
+from bpy.types import Operator, AddonPreferences
+from bpy.props import StringProperty, IntProperty, BoolProperty
+
+
+class ExampleAddonPreferences(AddonPreferences):
+ # this must match the addon name, use '__package__'
+ # when defining this in a submodule of a python package.
+ bl_idname = __name__
+
+ filepath = StringProperty(
+ name="Example File Path",
+ subtype='FILE_PATH',
+ )
+ number = IntProperty(
+ name="Example Number",
+ default=4,
+ )
+ boolean = BoolProperty(
+ name="Example Boolean",
+ default=False,
+ )
+
+ def draw(self, context):
+ layout = self.layout
+ layout.label(text="This is a preferences view for our addon")
+ layout.prop(self, "filepath")
+ layout.prop(self, "number")
+ layout.prop(self, "boolean")
+
+
+class OBJECT_OT_addon_prefs_example(Operator):
+ """Display example preferences"""
+ bl_idname = "object.addon_prefs_example"
+ bl_label = "Addon Preferences Example"
+ bl_options = {'REGISTER', 'UNDO'}
+
+ def execute(self, context):
+ user_preferences = context.user_preferences
+ addon_prefs = user_preferences.addons[__name__].preferences
+
+ info = ("Path: %s, Number: %d, Boolean %r" %
+ (addon_prefs.filepath, addon_prefs.number, addon_prefs.boolean))
+
+ self.report({'INFO'}, info)
+ print(info)
+
+ return {'FINISHED'}
+
+
+# Registration
+def register():
+ bpy.utils.register_class(OBJECT_OT_addon_prefs_example)
+ bpy.utils.register_class(ExampleAddonPreferences)
+
+
+def unregister():
+ bpy.utils.unregister_class(OBJECT_OT_addon_prefs_example)
+ bpy.utils.unregister_class(ExampleAddonPreferences)
diff --git a/doc/python_api/examples/bpy.types.NodeTree.py b/doc/python_api/examples/bpy.types.NodeTree.py
new file mode 100644
index 00000000000..401b3a01ae0
--- /dev/null
+++ b/doc/python_api/examples/bpy.types.NodeTree.py
@@ -0,0 +1,23 @@
+"""
+Poll Function
++++++++++++++++
+The :class:`NodeTree.poll` function determines if a node tree is visible
+in the given context (similar to how :class:`Panel.poll`
+and :class:`Menu.poll` define visibility). If it returns False,
+the node tree type will not be selectable in the node editor.
+
+A typical condition for shader nodes would be to check the active render engine
+of the scene and only show nodes of the renderer they are designed for.
+"""
+import bpy
+
+
+class CyclesNodeTree(bpy.types.NodeTree):
+ """ This operator is only visible when Cycles is the selected render engine"""
+ bl_label = "Cycles Node Tree"
+
+ @classmethod
+ def poll(cls, context):
+ return context.scene.render.engine == 'CYCLES'
+
+bpy.utils.register_class(CyclesNodeTree)
diff --git a/doc/python_api/examples/bpy.types.UIList.py b/doc/python_api/examples/bpy.types.UIList.py
new file mode 100644
index 00000000000..0f4ae0703cc
--- /dev/null
+++ b/doc/python_api/examples/bpy.types.UIList.py
@@ -0,0 +1,90 @@
+"""
+Basic UIList Example
++++++++++++++++++++
+This script is the UIList subclass used to show material slots, with a bunch of additional commentaries.
+
+Notice the name of the class, this naming convention is similar as the one for panels or menus.
+
+.. note::
+
+ UIList subclasses must be registered for blender to use them.
+"""
+import bpy
+
+
+class MATERIAL_UL_matslots_example(bpy.types.UIList):
+ # The draw_item function is called for each item of the collection that is visible in the list.
+ # data is the RNA object containing the collection,
+ # item is the current drawn item of the collection,
+ # icon is the "computed" icon for the item (as an integer, because some objects like materials or textures
+ # have custom icons ID, which are not available as enum items).
+ # active_data is the RNA object containing the active property for the collection (i.e. integer pointing to the
+ # active item of the collection).
+ # active_propname is the name of the active property (use 'getattr(active_data, active_propname)').
+ # index is index of the current item in the collection.
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
+ ob = data
+ slot = item
+ ma = slot.material
+ # draw_item must handle the three layout types... Usually 'DEFAULT' and 'COMPACT' can share the same code.
+ if self.layout_type in {'DEFAULT', 'COMPACT'}:
+ # You should always start your row layout by a label (icon + text), this will also make the row easily
+ # selectable in the list!
+ # We use icon_value of label, as our given icon is an integer value, not an enum ID.
+ # Note "data" names should never be translated!
+ layout.label(text=ma.name if ma else "", translate=False, icon_value=icon)
+ # And now we can add other UI stuff...
+ # Here, we add nodes info if this material uses (old!) shading nodes.
+ if ma and not context.scene.render.use_shading_nodes:
+ manode = ma.active_node_material
+ if manode:
+ # The static method UILayout.icon returns the integer value of the icon ID "computed" for the given
+ # RNA object.
+ layout.label(text="Node %s" % manode.name, translate=False, icon_value=layout.icon(manode))
+ elif ma.use_nodes:
+ layout.label(text="Node <none>", translate=False)
+ else:
+ layout.label(text="")
+ # 'GRID' layout type should be as compact as possible (typically a single icon!).
+ elif self.layout_type in {'GRID'}:
+ layout.alignment = 'CENTER'
+ layout.label(text="", icon_value=icon)
+
+
+# And now we can use this list everywhere in Blender. Here is a small example panel.
+class UIListPanelExample(bpy.types.Panel):
+ """Creates a Panel in the Object properties window"""
+ bl_label = "UIList Panel"
+ bl_idname = "OBJECT_PT_ui_list_example"
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "object"
+
+ def draw(self, context):
+ layout = self.layout
+
+ obj = context.object
+
+ # template_list now takes two new args.
+ # The first one is the identifier of the registered UIList to use (if you want only the default list,
+ # with no custom draw code, use "UI_UL_list").
+ layout.template_list("MATERIAL_UL_matslots_example", "", obj, "material_slots", obj, "active_material_index")
+
+ # The second one can usually be left as an empty string. It's an additional ID used to distinguish lists in case you
+ # use the same list several times in a given area.
+ layout.template_list("MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
+ obj, "active_material_index", type='COMPACT')
+
+
+def register():
+ bpy.utils.register_class(MATERIAL_UL_matslots_example)
+ bpy.utils.register_class(UIListPanelExample)
+
+
+def unregister():
+ bpy.utils.unregister_class(MATERIAL_UL_matslots_example)
+ bpy.utils.unregister_class(UIListPanelExample)
+
+
+if __name__ == "__main__":
+ register()
diff --git a/doc/python_api/rst/bge.events.rst b/doc/python_api/rst/bge.events.rst
index 074e928f0d8..2238faea242 100644
--- a/doc/python_api/rst/bge.events.rst
+++ b/doc/python_api/rst/bge.events.rst
@@ -69,7 +69,7 @@ Functions
Return the string name of a key event. Will raise a ValueError error if its invalid.
- :arg event: key event from bge.keys or the keyboard sensor.
+ :arg event: key event constant from :mod:`bge.events` or the keyboard sensor.
:type event: int
:rtype: string
@@ -78,7 +78,7 @@ Functions
Return the string name of a key event. Returns an empty string if the event cant be represented as a character.
:type event: int
- :arg event: key event from :mod:`bge.keys` or the keyboard sensor.
+ :arg event: key event constant from :mod:`bge.events` or the keyboard sensor.
:type shift: bool
:arg shift: set to true if shift is held.
:rtype: string
diff --git a/doc/python_api/rst/bge.logic.rst b/doc/python_api/rst/bge.logic.rst
index 7d20aa31a36..4dd0614700e 100644
--- a/doc/python_api/rst/bge.logic.rst
+++ b/doc/python_api/rst/bge.logic.rst
@@ -125,6 +125,10 @@ Variables
The current mouse wrapped in an :class:`~bge.types.SCA_PythonMouse` object.
+.. data:: joysticks
+
+ A list of attached :class:`~bge.types.SCA_PythonJoystick`s. The list size is the maximum number of supported joysticks. If no joystick is available for a given slot, the slot is set to None.
+
*****************
General functions
*****************
@@ -172,7 +176,7 @@ General functions
Restarts the current game by reloading the .blend file (the last saved version, not what is currently running).
-.. function:: LibLoad(blend, type, data, load_actions=False, verbose=False, load_scripts=True)
+.. function:: LibLoad(blend, type, data, load_actions=False, verbose=False, load_scripts=True, async=False)
Converts the all of the datablocks of the given type from the given blend.
@@ -187,7 +191,13 @@ General functions
:arg verbose: Whether or not to print debugging information (e.g., "SceneName: Scene")
:type verbose: bool
:arg load_scripts: Whether or not to load text datablocks as well (can be disabled for some extra security)
- :type load_scripts: bool
+ :type load_scripts: bool
+ :arg async: Whether or not to do the loading asynchronously (in another thread). Only the "Scene" type is currently supported for this feature.
+ :type async: bool
+
+ :rtype: :class:`bge.types.KX_LibLoadStatus`
+
+ .. note:: Asynchronously loaded libraries will not be available immediately after LibLoad() returns. Use the returned KX_LibLoadStatus to figure out when the libraries are ready.
.. function:: LibNew(name, type, data)
@@ -388,6 +398,10 @@ Utility functions
.. function:: PrintMemInfo()
Prints engine statistics into the console
+
+.. function:: getProfileInfo()
+
+ Returns a Python dictionary that contains the same information as the on screen profiler. The keys are the profiler categories and the values are tuples with the first element being time taken (in ms) and the second element being the percentage of total time.
*********
Constants
diff --git a/doc/python_api/rst/bge.types.rst b/doc/python_api/rst/bge.types.rst
index 8cf9ccb794c..f24cc3f998c 100644
--- a/doc/python_api/rst/bge.types.rst
+++ b/doc/python_api/rst/bge.types.rst
@@ -31,5263 +31,8 @@ a :class:`SCA_PythonController` logic brick.
Types
*****
-.. class:: PyObjectPlus
+.. toctree::
+ :glob:
- PyObjectPlus base class of most other types in the Game Engine.
+ bge.types.*
- .. attribute:: invalid
-
- Test if the object has been freed by the game engine and is no longer valid.
-
- Normally this is not a problem but when storing game engine data in the GameLogic module,
- KX_Scenes or other KX_GameObjects its possible to hold a reference to invalid data.
- Calling an attribute or method on an invalid object will raise a SystemError.
-
- The invalid attribute allows testing for this case without exception handling.
-
- :type: boolean
-
-.. class:: CValue(PyObjectPlus)
-
- This class is a basis for other classes.
-
- .. attribute:: name
-
- The name of this CValue derived object (read-only).
-
- :type: string
-
-.. class:: CPropValue(CValue)
-
- This class has no python functions
-
-.. class:: SCA_ILogicBrick(CValue)
-
- Base class for all logic bricks.
-
- .. attribute:: executePriority
-
- This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first).
-
- :type: executePriority: int
-
- .. attribute:: owner
-
- The game object this logic brick is attached to (read-only).
-
- :type: :class:`KX_GameObject` or None in exceptional cases.
-
- .. attribute:: name
-
- The name of this logic brick (read-only).
-
- :type: string
-
-.. class:: SCA_PythonKeyboard(PyObjectPlus)
-
- The current keyboard.
-
- .. attribute:: events
-
- A dictionary containing the status of each keyboard event or key. (read-only).
-
- :type: dictionary {:ref:`keycode<keyboard-keys>`::ref:`status<input-status>`, ...}
-
- .. attribute:: active_events
-
- A dictionary containing the status of only the active keyboard events or keys. (read-only).
-
- :type: dictionary {:ref:`keycode<keyboard-keys>`::ref:`status<input-status>`, ...}
-
-
- .. function:: getClipboard()
-
- Gets the clipboard text.
-
- :rtype: string
-
- .. function:: setClipboard(text)
-
- Sets the clipboard text.
-
- :arg text: New clipboard text
- :type text: string
-
-.. class:: SCA_PythonMouse(PyObjectPlus)
-
- The current mouse.
-
- .. attribute:: events
-
- a dictionary containing the status of each mouse event. (read-only).
-
- :type: dictionary {:ref:`keycode<mouse-keys>`::ref:`status<input-status>`, ...}
-
- .. attribute:: active_events
-
- a dictionary containing the status of only the active mouse events. (read-only).
-
- :type: dictionary {:ref:`keycode<mouse-keys>`::ref:`status<input-status>`, ...}
-
- .. attribute:: position
-
- The normalized x and y position of the mouse cursor.
-
- :type: list [x, y]
-
- .. attribute:: visible
-
- The visibility of the mouse cursor.
-
- :type: boolean
-
-.. class:: SCA_IObject(CValue)
-
- This class has no python functions
-
-.. class:: SCA_ISensor(SCA_ILogicBrick)
-
- Base class for all sensor logic bricks.
-
- .. attribute:: usePosPulseMode
-
- Flag to turn positive pulse mode on and off.
-
- :type: boolean
-
- .. attribute:: useNegPulseMode
-
- Flag to turn negative pulse mode on and off.
-
- :type: boolean
-
- .. attribute:: frequency
-
- The frequency for pulse mode sensors.
-
- :type: integer
-
- .. attribute:: level
-
- level Option whether to detect level or edge transition when entering a state.
- It makes a difference only in case of logic state transition (state actuator).
- A level detector will immediately generate a pulse, negative or positive
- depending on the sensor condition, as soon as the state is activated.
- A edge detector will wait for a state change before generating a pulse.
- note: mutually exclusive with :data:`tap`, enabling will disable :data:`tap`.
-
- :type: boolean
-
- .. attribute:: tap
-
- When enabled only sensors that are just activated will send a positive event,
- after this they will be detected as negative by the controllers.
- This will make a key thats held act as if its only tapped for an instant.
- note: mutually exclusive with :data:`level`, enabling will disable :data:`level`.
-
- :type: boolean
-
- .. attribute:: invert
-
- Flag to set if this sensor activates on positive or negative events.
-
- :type: boolean
-
- .. attribute:: triggered
-
- True if this sensor brick is in a positive state. (read-only).
-
- :type: boolean
-
- .. attribute:: positive
-
- True if this sensor brick is in a positive state. (read-only).
-
- :type: boolean
-
- .. attribute:: pos_ticks
-
- The number of ticks since the last positive pulse (read-only).
-
- :type: int
-
- .. attribute:: neg_ticks
-
- The number of ticks since the last negative pulse (read-only).
-
- :type: int
-
- .. attribute:: status
-
- The status of the sensor (read-only): can be one of :ref:`these constants<sensor-status>`.
-
- :type: int
-
- .. note::
-
- This convenient attribute combines the values of triggered and positive attributes.
-
- .. method:: reset()
-
- Reset sensor internal state, effect depends on the type of sensor and settings.
-
- The sensor is put in its initial state as if it was just activated.
-
-.. class:: SCA_IController(SCA_ILogicBrick)
-
- Base class for all controller logic bricks.
-
- .. attribute:: state
-
- The controllers state bitmask. This can be used with the GameObject's state to test if the controller is active.
-
- :type: int bitmask
-
- .. attribute:: sensors
-
- A list of sensors linked to this controller.
-
- :type: sequence supporting index/string lookups and iteration.
-
- .. note::
-
- The sensors are not necessarily owned by the same object.
-
- .. note::
-
- When objects are instanced in dupligroups links may be lost from objects outside the dupligroup.
-
- .. attribute:: actuators
-
- A list of actuators linked to this controller.
-
- :type: sequence supporting index/string lookups and iteration.
-
- .. note::
-
- The sensors are not necessarily owned by the same object.
-
- .. note::
-
- When objects are instanced in dupligroups links may be lost from objects outside the dupligroup.
-
- .. attribute:: useHighPriority
-
- When set the controller executes always before all other controllers that dont have this set.
-
- :type: boolen
-
- .. note::
-
- Order of execution between high priority controllers is not guaranteed.
-
-.. class:: SCA_IActuator(SCA_ILogicBrick)
-
- Base class for all actuator logic bricks.
-
-.. class:: BL_ActionActuator(SCA_IActuator)
-
- Action Actuators apply an action to an actor.
-
- .. attribute:: action
-
- The name of the action to set as the current action.
-
- :type: string
-
- .. attribute:: frameStart
-
- Specifies the starting frame of the animation.
-
- :type: float
-
- .. attribute:: frameEnd
-
- Specifies the ending frame of the animation.
-
- :type: float
-
- .. attribute:: blendIn
-
- Specifies the number of frames of animation to generate when making transitions between actions.
-
- :type: float
-
- .. attribute:: priority
-
- Sets the priority of this actuator. Actuators will lower priority numbers will override actuators with higher numbers.
-
- :type: integer
-
- .. attribute:: frame
-
- Sets the current frame for the animation.
-
- :type: float
-
- .. attribute:: propName
-
- Sets the property to be used in FromProp playback mode.
-
- :type: string
-
- .. attribute:: blendTime
-
- Sets the internal frame timer. This property must be in the range from 0.0 to blendIn.
-
- :type: float
-
- .. attribute:: mode
-
- The operation mode of the actuator. Can be one of :ref:`these constants<action-actuator>`.
-
- :type: integer
-
- .. attribute:: useContinue
-
- The actions continue option, True or False. When True, the action will always play from where last left off,
- otherwise negative events to this actuator will reset it to its start frame.
-
- :type: boolean
-
- .. attribute:: framePropName
-
- The name of the property that is set to the current frame number.
-
- :type: string
-
-.. class:: BL_Shader(PyObjectPlus)
-
- BL_Shader GLSL shaders.
-
- TODO - Description
-
- .. method:: setUniformfv(name, fList)
-
- Set a uniform with a list of float values
-
- :arg name: the uniform name
- :type name: string
- :arg fList: a list (2, 3 or 4 elements) of float values
- :type fList: list[float]
-
- .. method:: delSource()
-
- Clear the shader. Use this method before the source is changed with :data:`setSource`.
-
- .. method:: getFragmentProg()
-
- Returns the fragment program.
-
- :return: The fragment program.
- :rtype: string
-
- .. method:: getVertexProg()
-
- Get the vertex program.
-
- :return: The vertex program.
- :rtype: string
-
- .. method:: isValid()
-
- Check if the shader is valid.
-
- :return: True if the shader is valid
- :rtype: boolean
-
- .. method:: setAttrib(enum)
-
- Set attribute location. (The parameter is ignored a.t.m. and the value of "tangent" is always used.)
-
- :arg enum: attribute location value
- :type enum: integer
-
- .. method:: setNumberOfPasses( max_pass )
-
- Set the maximum number of passes. Not used a.t.m.
-
- :arg max_pass: the maximum number of passes
- :type max_pass: integer
-
- .. method:: setSampler(name, index)
-
- Set uniform texture sample index.
-
- :arg name: Uniform name
- :type name: string
- :arg index: Texture sample index.
- :type index: integer
-
- .. method:: setSource(vertexProgram, fragmentProgram)
-
- Set the vertex and fragment programs
-
- :arg vertexProgram: Vertex program
- :type vertexProgram: string
- :arg fragmentProgram: Fragment program
- :type fragmentProgram: string
-
- .. method:: setUniform1f(name, fx)
-
- Set a uniform with 1 float value.
-
- :arg name: the uniform name
- :type name: string
- :arg fx: Uniform value
- :type fx: float
-
- .. method:: setUniform1i(name, ix)
-
- Set a uniform with an integer value.
-
- :arg name: the uniform name
- :type name: string
- :arg ix: the uniform value
- :type ix: integer
-
- .. method:: setUniform2f(name, fx, fy)
-
- Set a uniform with 2 float values
-
- :arg name: the uniform name
- :type name: string
- :arg fx: first float value
- :type fx: float
-
- :arg fy: second float value
- :type fy: float
-
- .. method:: setUniform2i(name, ix, iy)
-
- Set a uniform with 2 integer values
-
- :arg name: the uniform name
- :type name: string
- :arg ix: first integer value
- :type ix: integer
- :arg iy: second integer value
- :type iy: integer
-
- .. method:: setUniform3f(name, fx, fy, fz)
-
- Set a uniform with 3 float values.
-
- :arg name: the uniform name
- :type name: string
- :arg fx: first float value
- :type fx: float
- :arg fy: second float value
- :type fy: float
- :arg fz: third float value
- :type fz: float
-
- .. method:: setUniform3i(name, ix, iy, iz)
-
- Set a uniform with 3 integer values
-
- :arg name: the uniform name
- :type name: string
- :arg ix: first integer value
- :type ix: integer
- :arg iy: second integer value
- :type iy: integer
- :arg iz: third integer value
- :type iz: integer
-
- .. method:: setUniform4f(name, fx, fy, fz, fw)
-
- Set a uniform with 4 float values.
-
- :arg name: the uniform name
- :type name: string
- :arg fx: first float value
- :type fx: float
- :arg fy: second float value
- :type fy: float
- :arg fz: third float value
- :type fz: float
- :arg fw: fourth float value
- :type fw: float
-
- .. method:: setUniform4i(name, ix, iy, iz, iw)
-
- Set a uniform with 4 integer values
-
- :arg name: the uniform name
- :type name: string
- :arg ix: first integer value
- :type ix: integer
- :arg iy: second integer value
- :type iy: integer
- :arg iz: third integer value
- :type iz: integer
- :arg iw: fourth integer value
- :type iw: integer
-
- .. method:: setUniformDef(name, type)
-
- Define a new uniform
-
- :arg name: the uniform name
- :type name: string
- :arg type: uniform type
- :type type: UNI_NONE, UNI_INT, UNI_FLOAT, UNI_INT2, UNI_FLOAT2, UNI_INT3, UNI_FLOAT3, UNI_INT4, UNI_FLOAT4, UNI_MAT3, UNI_MAT4, UNI_MAX
-
- .. method:: setUniformMatrix3(name, mat, transpose)
-
- Set a uniform with a 3x3 matrix value
-
- :arg name: the uniform name
- :type name: string
- :arg mat: A 3x3 matrix [[f, f, f], [f, f, f], [f, f, f]]
- :type mat: 3x3 matrix
- :arg transpose: set to True to transpose the matrix
- :type transpose: boolean
-
- .. method:: setUniformMatrix4(name, mat, transpose)
-
- Set a uniform with a 4x4 matrix value
-
- :arg name: the uniform name
- :type name: string
- :arg mat: A 4x4 matrix [[f, f, f, f], [f, f, f, f], [f, f, f, f], [f, f, f, f]]
- :type mat: 4x4 matrix
- :arg transpose: set to True to transpose the matrix
- :type transpose: boolean
-
- .. method:: setUniformiv(name, iList)
-
- Set a uniform with a list of integer values
-
- :arg name: the uniform name
- :type name: string
- :arg iList: a list (2, 3 or 4 elements) of integer values
- :type iList: list[integer]
-
- .. method:: validate()
-
- Validate the shader object.
-
-.. class:: BL_ShapeActionActuator(SCA_IActuator)
-
- ShapeAction Actuators apply an shape action to an mesh object.
-
- .. attribute:: action
-
- The name of the action to set as the current shape action.
-
- :type: string
-
- .. attribute:: frameStart
-
- Specifies the starting frame of the shape animation.
-
- :type: float
-
- .. attribute:: frameEnd
-
- Specifies the ending frame of the shape animation.
-
- :type: float
-
- .. attribute:: blendIn
-
- Specifies the number of frames of animation to generate when making transitions between actions.
-
- :type: float
-
- .. attribute:: priority
-
- Sets the priority of this actuator. Actuators will lower priority numbers will override actuators with higher numbers.
-
- :type: integer
-
- .. attribute:: frame
-
- Sets the current frame for the animation.
-
- :type: float
-
- .. attribute:: propName
-
- Sets the property to be used in FromProp playback mode.
-
- :type: string
-
- .. attribute:: blendTime
-
- Sets the internal frame timer. This property must be in the range from 0.0 to blendin.
-
- :type: float
-
- .. attribute:: mode
-
- The operation mode of the actuator. Can be one of :ref:`these constants<shape-action-actuator>`.
-
- :type: integer
-
- .. attribute:: framePropName
-
- The name of the property that is set to the current frame number.
-
- :type: string
-
-
-.. class:: KX_SteeringActuator(SCA_IActuator)
-
- Steering Actuator for navigation.
-
- .. attribute:: behavior
-
- The steering behavior to use.
-
- :type: one of :ref:`these constants <logic-steering-actuator>`
-
- .. attribute:: velocity
-
- Velocity magnitude
-
- :type: float
-
- .. attribute:: acceleration
-
- Max acceleration
-
- :type: float
-
- .. attribute:: turnspeed
-
- Max turn speed
-
- :type: float
-
- .. attribute:: distance
-
- Relax distance
-
- :type: float
-
- .. attribute:: target
-
- Target object
-
- :type: :class:`KX_GameObject`
-
- .. attribute:: navmesh
-
- Navigation mesh
-
- :type: :class:`KX_GameObject`
-
- .. attribute:: selfterminated
-
- Terminate when target is reached
-
- :type: boolean
-
- .. attribute:: enableVisualization
-
- Enable debug visualization
-
- :type: boolean
-
- .. attribute:: pathUpdatePeriod
-
- Path update period
-
- :type: int
-
-.. class:: CListValue(CPropValue)
-
- This is a list like object used in the game engine internally that behaves similar to a python list in most ways.
-
- As well as the normal index lookup (``val= clist[i]``), CListValue supports string lookups (``val= scene.objects["Cube"]``)
-
- Other operations such as ``len(clist)``, ``list(clist)``, ``clist[0:10]`` are also supported.
-
- .. method:: append(val)
-
- Add an item to the list (like pythons append)
-
- .. warning::
-
- Appending values to the list can cause crashes when the list is used internally by the game engine.
-
- .. method:: count(val)
-
- Count the number of instances of a value in the list.
-
- :return: number of instances
- :rtype: integer
-
- .. method:: index(val)
-
- Return the index of a value in the list.
-
- :return: The index of the value in the list.
- :rtype: integer
-
- .. method:: reverse()
-
- Reverse the order of the list.
-
- .. method:: get(key, default=None)
-
- Return the value matching key, or the default value if its not found.
-
- :return: The key value or a default.
-
- .. method:: from_id(id)
-
- This is a funtion especially for the game engine to return a value with a spesific id.
-
- Since object names are not always unique, the id of an object can be used to get an object from the CValueList.
-
- Example:
-
- .. code-block:: python
-
- myObID=id(gameObject)
- ob= scene.objects.from_id(myObID)
-
- Where ``myObID`` is an int or long from the id function.
-
- This has the advantage that you can store the id in places you could not store a gameObject.
-
- .. warning::
-
- The id is derived from a memory location and will be different each time the game engine starts.
-
- .. warning::
-
- The id can't be stored as an integer in game object properties, as those only have a limited range that the id may not be contained in. Instead an id can be stored as a string game property and converted back to an integer for use in from_id lookups.
-
-.. class:: KX_BlenderMaterial(PyObjectPlus)
-
- KX_BlenderMaterial
-
- .. attribute:: shader
-
- The materials shader.
-
- :type: :class:`BL_Shader`
-
- .. attribute:: blending
-
- Ints used for pixel blending, (src, dst), matching the setBlending method.
-
- :type: (integer, integer)
-
- .. attribute:: material_index
-
- The material's index.
-
- :type: integer
-
- .. method:: getShader()
-
- Returns the material's shader.
-
- :return: the material's shader
- :rtype: :class:`BL_Shader`
-
- .. method:: setBlending(src, dest)
-
- Set the pixel color arithmetic functions.
-
- :arg src: Specifies how the red, green, blue, and alpha source blending factors are computed.
- :type src: Value in...
-
- * GL_ZERO,
- * GL_ONE,
- * GL_SRC_COLOR,
- * GL_ONE_MINUS_SRC_COLOR,
- * GL_DST_COLOR,
- * GL_ONE_MINUS_DST_COLOR,
- * GL_SRC_ALPHA,
- * GL_ONE_MINUS_SRC_ALPHA,
- * GL_DST_ALPHA,
- * GL_ONE_MINUS_DST_ALPHA,
- * GL_SRC_ALPHA_SATURATE
-
- :arg dest: Specifies how the red, green, blue, and alpha destination blending factors are computed.
- :type dest: Value in...
-
- * GL_ZERO
- * GL_ONE
- * GL_SRC_COLOR
- * GL_ONE_MINUS_SRC_COLOR
- * GL_DST_COLOR
- * GL_ONE_MINUS_DST_COLOR
- * GL_SRC_ALPHA
- * GL_ONE_MINUS_SRC_ALPHA
- * GL_DST_ALPHA
- * GL_ONE_MINUS_DST_ALPHA
- * GL_SRC_ALPHA_SATURATE
-
- .. method:: getMaterialIndex()
-
- Returns the material's index.
-
- :return: the material's index
- :rtype: integer
-
-.. class:: KX_CameraActuator(SCA_IActuator)
-
- Applies changes to a camera.
-
- .. attribute:: damping
-
- strength of of the camera following movement.
-
- :type: float
-
- .. attribute:: axis
-
- The camera axis (0, 1, 2) for positive ``XYZ``, (3, 4, 5) for negative ``XYZ``.
-
- :type: int
-
- .. attribute:: min
-
- minimum distance to the target object maintained by the actuator.
-
- :type: float
-
- .. attribute:: max
-
- maximum distance to stay from the target object.
-
- :type: float
-
- .. attribute:: height
-
- height to stay above the target object.
-
- :type: float
-
- .. attribute:: object
-
- the object this actuator tracks.
-
- :type: :class:`KX_GameObject` or None
-
-.. class:: KX_ConstraintActuator(SCA_IActuator)
-
- A constraint actuator limits the position, rotation, distance or orientation of an object.
-
- .. attribute:: damp
-
- Time constant of the constraint expressed in frame (not use by Force field constraint).
-
- :type: integer
-
- .. attribute:: rotDamp
-
- Time constant for the rotation expressed in frame (only for the distance constraint), 0 = use damp for rotation as well.
-
- :type: integer
-
- .. attribute:: direction
-
- The reference direction in world coordinate for the orientation constraint.
-
- :type: 3-tuple of float: (x, y, z)
-
- .. attribute:: option
-
- Binary combination of :ref:`these constants <constraint-actuator-option>`
-
- :type: integer
-
- .. attribute:: time
-
- activation time of the actuator. The actuator disables itself after this many frame. If set to 0, the actuator is not limited in time.
-
- :type: integer
-
- .. attribute:: propName
-
- the name of the property or material for the ray detection of the distance constraint.
-
- :type: string
-
- .. attribute:: min
-
- The lower bound of the constraint. For the rotation and orientation constraint, it represents radiant.
-
- :type: float
-
- .. attribute:: distance
-
- the target distance of the distance constraint.
-
- :type: float
-
- .. attribute:: max
-
- the upper bound of the constraint. For rotation and orientation constraints, it represents radiant.
-
- :type: float
-
- .. attribute:: rayLength
-
- the length of the ray of the distance constraint.
-
- :type: float
-
- .. attribute:: limit
-
- type of constraint. Use one of the :ref:`these constants <constraint-actuator-limit>`
-
- :type: integer.
-
-
-.. class:: KX_ConstraintWrapper(PyObjectPlus)
-
- KX_ConstraintWrapper
-
- .. method:: getConstraintId(val)
-
- Returns the contraint's ID
-
- :return: the constraint's ID
- :rtype: integer
-
-.. class:: KX_GameActuator(SCA_IActuator)
-
- The game actuator loads a new .blend file, restarts the current .blend file or quits the game.
-
- .. attribute:: fileName
-
- the new .blend file to load.
-
- :type: string
-
- .. attribute:: mode
-
- The mode of this actuator. Can be on of :ref:`these constants <game-actuator>`
-
- :type: Int
-
-.. class:: KX_GameObject(SCA_IObject)
-
- All game objects are derived from this class.
-
- Properties assigned to game objects are accessible as attributes of this class.
-
- .. note::
-
- Calling ANY method or attribute on an object that has been removed from a scene will raise a SystemError,
- if an object may have been removed since last accessing it use the :data:`invalid` attribute to check.
-
- KX_GameObject can be subclassed to extend functionality. For example:
-
- .. code-block:: python
-
- import bge
-
- class CustomGameObject(bge.types.KX_GameObject):
- RATE = 0.05
-
- def __init__(self, old_owner):
- # "old_owner" can just be ignored. At this point, "self" is
- # already the object in the scene, and "old_owner" has been
- # destroyed.
-
- # New attributes can be defined - but we could also use a game
- # property, like "self['rate']".
- self.rate = CustomGameObject.RATE
-
- def update(self):
- self.worldPosition.z += self.rate
-
- # switch direction
- if self.worldPosition.z > 1.0:
- self.rate = -CustomGameObject.RATE
- elif self.worldPosition.z < 0.0:
- self.rate = CustomGameObject.RATE
-
- # Called first
- def mutate(cont):
- old_object = cont.owner
- mutated_object = CustomGameObject(cont.owner)
-
- # After calling the constructor above, references to the old object
- # should not be used.
- assert(old_object is not mutated_object)
- assert(old_object.invalid)
- assert(mutated_object is cont.owner)
-
- # Called later - note we are now working with the mutated object.
- def update(cont):
- cont.owner.update()
-
- When subclassing objects other than empties and meshes, the specific type
- should be used - e.g. inherit from :class:`BL_ArmatureObject` when the object
- to mutate is an armature.
-
- .. attribute:: name
-
- The object's name. (read-only).
-
- :type: string
-
- .. attribute:: mass
-
- The object's mass
-
- :type: float
-
- .. note::
-
- The object must have a physics controller for the mass to be applied, otherwise the mass value will be returned as 0.0.
-
- .. attribute:: linVelocityMin
-
- Enforces the object keeps moving at a minimum velocity.
-
- :type: float
-
- .. note::
-
- Applies to dynamic and rigid body objects only.
-
- .. note::
-
- A value of 0.0 disables this option.
-
- .. note::
-
- While objects are stationary the minimum velocity will not be applied.
-
- .. attribute:: linVelocityMax
-
- Clamp the maximum linear velocity to prevent objects moving beyond a set speed.
-
- :type: float
-
- .. note::
-
- Applies to dynamic and rigid body objects only.
-
- .. note::
-
- A value of 0.0 disables this option (rather then setting it stationary).
-
- .. attribute:: localInertia
-
- the object's inertia vector in local coordinates. Read only.
-
- :type: list [ix, iy, iz]
-
- .. attribute:: parent
-
- The object's parent object. (read-only).
-
- :type: :class:`KX_GameObject` or None
-
- .. attribute:: groupMembers
-
- Returns the list of group members if the object is a group object, otherwise None is returned.
-
- :type: :class:`CListValue` of :class:`KX_GameObject` or None
-
- .. attribute:: groupObject
-
- Returns the group object that the object belongs to or None if the object is not part of a group.
-
- :type: :class:`KX_GameObject` or None
-
- .. attribute:: scene
-
- The object's scene. (read-only).
-
- :type: :class:`KX_Scene` or None
-
- .. attribute:: visible
-
- visibility flag.
-
- :type: boolean
-
- .. note::
-
- Game logic will still run for invisible objects.
-
- .. attribute:: color
-
- The object color of the object. [r, g, b, a]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: occlusion
-
- occlusion capability flag.
-
- :type: boolean
-
- .. attribute:: position
-
- The object's position. [x, y, z] On write: local position, on read: world position
-
- .. deprecated:: use :data:`localPosition` and :data:`worldPosition`.
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: orientation
-
- The object's orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector. On write: local orientation, on read: world orientation
-
- .. deprecated:: use :data:`localOrientation` and :data:`worldOrientation`.
-
- :type: :class:`mathutils.Matrix`
-
- .. attribute:: scaling
-
- The object's scaling factor. [sx, sy, sz] On write: local scaling, on read: world scaling
-
- .. deprecated:: use :data:`localScale` and :data:`worldScale`.
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: localOrientation
-
- The object's local orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector.
-
- :type: :class:`mathutils.Matrix`
-
- .. attribute:: worldOrientation
-
- The object's world orientation. 3x3 Matrix.
-
- :type: :class:`mathutils.Matrix`
-
- .. attribute:: localScale
-
- The object's local scaling factor. [sx, sy, sz]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: worldScale
-
- The object's world scaling factor. [sx, sy, sz]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: localPosition
-
- The object's local position. [x, y, z]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: worldPosition
-
- The object's world position. [x, y, z]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: localTransform
-
- The object's local space transform matrix. 4x4 Matrix.
-
- :type: :class:`mathutils.Matrix`
-
- .. attribute:: worldTransform
-
- The object's world space transform matrix. 4x4 Matrix.
-
- :type: :class:`mathutils.Matrix`
-
- .. attribute:: localLinearVelocity
-
- The object's local linear velocity. [x, y, z]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: worldLinearVelocity
-
- The object's world linear velocity. [x, y, z]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: localAngularVelocity
-
- The object's local angular velocity. [x, y, z]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: worldAngularVelocity
-
- The object's world angular velocity. [x, y, z]
-
- :type: :class:`mathutils.Vector`
-
- .. attribute:: timeOffset
-
- adjust the slowparent delay at runtime.
-
- :type: float
-
- .. attribute:: state
-
- the game object's state bitmask, using the first 30 bits, one bit must always be set.
-
- :type: int
-
- .. attribute:: meshes
-
- a list meshes for this object.
-
- :type: list of :class:`KX_MeshProxy`
-
- .. note::
-
- Most objects use only 1 mesh.
-
- .. note::
-
- Changes to this list will not update the KX_GameObject.
-
- .. attribute:: sensors
-
- a sequence of :class:`SCA_ISensor` objects with string/index lookups and iterator support.
-
- :type: list
-
- .. note::
-
- This attribute is experemental and may be removed (but probably wont be).
-
- .. note::
-
- Changes to this list will not update the KX_GameObject.
-
- .. attribute:: controllers
-
- a sequence of :class:`SCA_IController` objects with string/index lookups and iterator support.
-
- :type: list of :class:`SCA_ISensor`
-
- .. note::
-
- This attribute is experemental and may be removed (but probably wont be).
-
- .. note::
-
- Changes to this list will not update the KX_GameObject.
-
- .. attribute:: actuators
-
- a list of :class:`SCA_IActuator` with string/index lookups and iterator support.
-
- :type: list
-
- .. note::
-
- This attribute is experemental and may be removed (but probably wont be).
-
- .. note::
-
- Changes to this list will not update the KX_GameObject.
-
- .. attribute:: attrDict
-
- get the objects internal python attribute dictionary for direct (faster) access.
-
- :type: dict
-
- .. attribute:: children
-
- direct children of this object, (read-only).
-
- :type: :class:`CListValue` of :class:`KX_GameObject`'s
-
- .. attribute:: childrenRecursive
-
- all children of this object including childrens children, (read-only).
-
- :type: :class:`CListValue` of :class:`KX_GameObject`'s
-
- .. attribute:: life
-
- The number of seconds until the object ends, assumes 50fps.
- (when added with an add object actuator), (read-only).
-
- :type: float
-
- .. method:: endObject()
-
- Delete this object, can be used in place of the EndObject Actuator.
-
- The actual removal of the object from the scene is delayed.
-
- .. method:: replaceMesh(mesh, useDisplayMesh=True, usePhysicsMesh=False)
-
- Replace the mesh of this object with a new mesh. This works the same was as the actuator.
-
- :arg mesh: mesh to replace or the meshes name.
- :type mesh: :class:`MeshProxy` or string
- :arg useDisplayMesh: when enabled the display mesh will be replaced (optional argument).
- :type useDisplayMesh: boolean
- :arg usePhysicsMesh: when enabled the physics mesh will be replaced (optional argument).
- :type usePhysicsMesh: boolean
-
- .. method:: setVisible(visible, recursive)
-
- Sets the game object's visible flag.
-
- :arg visible: the visible state to set.
- :type visible: boolean
- :arg recursive: optional argument to set all childrens visibility flag too.
- :type recursive: boolean
-
- .. method:: setOcclusion(occlusion, recursive)
-
- Sets the game object's occlusion capability.
-
- :arg occlusion: the state to set the occlusion to.
- :type occlusion: boolean
- :arg recursive: optional argument to set all childrens occlusion flag too.
- :type recursive: boolean
-
- .. method:: alignAxisToVect(vect, axis=2, factor=1.0)
-
- Aligns any of the game object's axis along the given vector.
-
-
- :arg vect: a vector to align the axis.
- :type vect: 3D vector
- :arg axis: The axis you want to align
-
- * 0: X axis
- * 1: Y axis
- * 2: Z axis
-
- :type axis: integer
- :arg factor: Only rotate a feaction of the distance to the target vector (0.0 - 1.0)
- :type factor: float
-
- .. method:: getAxisVect(vect)
-
- Returns the axis vector rotates by the objects worldspace orientation.
- This is the equivalent of multiplying the vector by the orientation matrix.
-
- :arg vect: a vector to align the axis.
- :type vect: 3D Vector
- :return: The vector in relation to the objects rotation.
- :rtype: 3d vector.
-
- .. method:: applyMovement(movement, local=False)
-
- Sets the game object's movement.
-
- :arg movement: movement vector.
- :type movement: 3D Vector
- :arg local:
- * False: you get the "global" movement ie: relative to world orientation.
- * True: you get the "local" movement ie: relative to object orientation.
- :arg local: boolean
-
- .. method:: applyRotation(rotation, local=False)
-
- Sets the game object's rotation.
-
- :arg rotation: rotation vector.
- :type rotation: 3D Vector
- :arg local:
- * False: you get the "global" rotation ie: relative to world orientation.
- * True: you get the "local" rotation ie: relative to object orientation.
- :arg local: boolean
-
- .. method:: applyForce(force, local=False)
-
- Sets the game object's force.
-
- This requires a dynamic object.
-
- :arg force: force vector.
- :type force: 3D Vector
- :arg local:
- * False: you get the "global" force ie: relative to world orientation.
- * True: you get the "local" force ie: relative to object orientation.
- :type local: boolean
-
- .. method:: applyTorque(torque, local=False)
-
- Sets the game object's torque.
-
- This requires a dynamic object.
-
- :arg torque: torque vector.
- :type torque: 3D Vector
- :arg local:
- * False: you get the "global" torque ie: relative to world orientation.
- * True: you get the "local" torque ie: relative to object orientation.
- :type local: boolean
-
- .. method:: getLinearVelocity(local=False)
-
- Gets the game object's linear velocity.
-
- This method returns the game object's velocity through it's centre of mass, ie no angular velocity component.
-
- :arg local:
- * False: you get the "global" velocity ie: relative to world orientation.
- * True: you get the "local" velocity ie: relative to object orientation.
- :type local: boolean
- :return: the object's linear velocity.
- :rtype: list [vx, vy, vz]
-
- .. method:: setLinearVelocity(velocity, local=False)
-
- Sets the game object's linear velocity.
-
- This method sets game object's velocity through it's centre of mass,
- ie no angular velocity component.
-
- This requires a dynamic object.
-
- :arg velocity: linear velocity vector.
- :type velocity: 3D Vector
- :arg local:
- * False: you get the "global" velocity ie: relative to world orientation.
- * True: you get the "local" velocity ie: relative to object orientation.
- :type local: boolean
-
- .. method:: getAngularVelocity(local=False)
-
- Gets the game object's angular velocity.
-
- :arg local:
- * False: you get the "global" velocity ie: relative to world orientation.
- * True: you get the "local" velocity ie: relative to object orientation.
- :type local: boolean
- :return: the object's angular velocity.
- :rtype: list [vx, vy, vz]
-
- .. method:: setAngularVelocity(velocity, local=False)
-
- Sets the game object's angular velocity.
-
- This requires a dynamic object.
-
- :arg velocity: angular velocity vector.
- :type velocity: boolean
- :arg local:
- * False: you get the "global" velocity ie: relative to world orientation.
- * True: you get the "local" velocity ie: relative to object orientation.
-
- .. method:: getVelocity(point=(0, 0, 0))
-
- Gets the game object's velocity at the specified point.
-
- Gets the game object's velocity at the specified point, including angular
- components.
-
- :arg point: optional point to return the velocity for, in local coordinates.
- :type point: 3D Vector
- :return: the velocity at the specified point.
- :rtype: list [vx, vy, vz]
-
- .. method:: getReactionForce()
-
- Gets the game object's reaction force.
-
- The reaction force is the force applied to this object over the last simulation timestep.
- This also includes impulses, eg from collisions.
-
- :return: the reaction force of this object.
- :rtype: list [fx, fy, fz]
-
- .. note::
-
- This is not implimented at the moment.
-
- .. method:: applyImpulse(point, impulse)
-
- Applies an impulse to the game object.
-
- This will apply the specified impulse to the game object at the specified point.
- If point != position, applyImpulse will also change the object's angular momentum.
- Otherwise, only linear momentum will change.
-
- :arg point: the point to apply the impulse to (in world coordinates)
- :type point: the point to apply the impulse to (in world coordinates)
-
- .. method:: suspendDynamics()
-
- Suspends physics for this object.
-
- .. method:: restoreDynamics()
-
- Resumes physics for this object.
-
- .. note::
-
- The objects linear velocity will be applied from when the dynamics were suspended.
-
- .. method:: enableRigidBody()
-
- Enables rigid body physics for this object.
-
- Rigid body physics allows the object to roll on collisions.
-
- .. method:: disableRigidBody()
-
- Disables rigid body physics for this object.
-
- .. method:: setParent(parent, compound=True, ghost=True)
-
- Sets this object's parent.
- Control the shape status with the optional compound and ghost parameters:
-
- In that case you can control if it should be ghost or not:
-
- :arg parent: new parent object.
- :type parent: :class:`KX_GameObject`
- :arg compound: whether the shape should be added to the parent compound shape.
-
- * True: the object shape should be added to the parent compound shape.
- * False: the object should keep its individual shape.
-
- :type compound: boolean
- :arg ghost: whether the object should be ghost while parented.
-
- * True: if the object should be made ghost while parented.
- * False: if the object should be solid while parented.
-
- :type ghost: boolean
-
- .. note::
-
- If the object type is sensor, it stays ghost regardless of ghost parameter
-
- .. method:: removeParent()
-
- Removes this objects parent.
-
- .. method:: getPhysicsId()
-
- Returns the user data object associated with this game object's physics controller.
-
- .. method:: getPropertyNames()
-
- Gets a list of all property names.
-
- :return: All property names for this object.
- :rtype: list
-
- .. method:: getDistanceTo(other)
-
- :arg other: a point or another :class:`KX_GameObject` to measure the distance to.
- :type other: :class:`KX_GameObject` or list [x, y, z]
- :return: distance to another object or point.
- :rtype: float
-
- .. method:: getVectTo(other)
-
- Returns the vector and the distance to another object or point.
- The vector is normalized unless the distance is 0, in which a zero length vector is returned.
-
- :arg other: a point or another :class:`KX_GameObject` to get the vector and distance to.
- :type other: :class:`KX_GameObject` or list [x, y, z]
- :return: (distance, globalVector(3), localVector(3))
- :rtype: 3-tuple (float, 3-tuple (x, y, z), 3-tuple (x, y, z))
-
- .. method:: rayCastTo(other, dist, prop)
-
- Look towards another point/object and find first object hit within dist that matches prop.
-
- The ray is always casted from the center of the object, ignoring the object itself.
- The ray is casted towards the center of another object or an explicit [x, y, z] point.
- Use rayCast() if you need to retrieve the hit point
-
- :arg other: [x, y, z] or object towards which the ray is casted
- :type other: :class:`KX_GameObject` or 3-tuple
- :arg dist: max distance to look (can be negative => look behind); 0 or omitted => detect up to other
- :type dist: float
- :arg prop: property name that object must have; can be omitted => detect any object
- :type prop: string
- :return: the first object hit or None if no object or object does not match prop
- :rtype: :class:`KX_GameObject`
-
- .. method:: rayCast(objto, objfrom, dist, prop, face, xray, poly)
-
- Look from a point/object to another point/object and find first object hit within dist that matches prop.
- if poly is 0, returns a 3-tuple with object reference, hit point and hit normal or (None, None, None) if no hit.
- if poly is 1, returns a 4-tuple with in addition a :class:`KX_PolyProxy` as 4th element.
- if poly is 2, returns a 5-tuple with in addition a 2D vector with the UV mapping of the hit point as 5th element.
-
- .. code-block:: python
-
- # shoot along the axis gun-gunAim (gunAim should be collision-free)
- obj, point, normal = gun.rayCast(gunAim, None, 50)
- if obj:
- # do something
- pass
-
- The face paremeter determines the orientation of the normal.
-
- * 0 => hit normal is always oriented towards the ray origin (as if you casted the ray from outside)
- * 1 => hit normal is the real face normal (only for mesh object, otherwise face has no effect)
-
- The ray has X-Ray capability if xray parameter is 1, otherwise the first object hit (other than self object) stops the ray.
- The prop and xray parameters interact as follow.
-
- * prop off, xray off: return closest hit or no hit if there is no object on the full extend of the ray.
- * prop off, xray on : idem.
- * prop on, xray off: return closest hit if it matches prop, no hit otherwise.
- * prop on, xray on : return closest hit matching prop or no hit if there is no object matching prop on the full extend of the ray.
-
- The :class:`KX_PolyProxy` 4th element of the return tuple when poly=1 allows to retrieve information on the polygon hit by the ray.
- If there is no hit or the hit object is not a static mesh, None is returned as 4th element.
-
- The ray ignores collision-free objects and faces that dont have the collision flag enabled, you can however use ghost objects.
-
- :arg objto: [x, y, z] or object to which the ray is casted
- :type objto: :class:`KX_GameObject` or 3-tuple
- :arg objfrom: [x, y, z] or object from which the ray is casted; None or omitted => use self object center
- :type objfrom: :class:`KX_GameObject` or 3-tuple or None
- :arg dist: max distance to look (can be negative => look behind); 0 or omitted => detect up to to
- :type dist: float
- :arg prop: property name that object must have; can be omitted or "" => detect any object
- :type prop: string
- :arg face: normal option: 1=>return face normal; 0 or omitted => normal is oriented towards origin
- :type face: integer
- :arg xray: X-ray option: 1=>skip objects that don't match prop; 0 or omitted => stop on first object
- :type xray: integer
- :arg poly: polygon option: 0, 1 or 2 to return a 3-, 4- or 5-tuple with information on the face hit.
-
- * 0 or omitted: return value is a 3-tuple (object, hitpoint, hitnormal) or (None, None, None) if no hit
- * 1: return value is a 4-tuple and the 4th element is a :class:`KX_PolyProxy` or None if no hit or the object doesn't use a mesh collision shape.
- * 2: return value is a 5-tuple and the 5th element is a 2-tuple (u, v) with the UV mapping of the hit point or None if no hit, or the object doesn't use a mesh collision shape, or doesn't have a UV mapping.
-
- :type poly: integer
- :return: (object, hitpoint, hitnormal) or (object, hitpoint, hitnormal, polygon) or (object, hitpoint, hitnormal, polygon, hituv).
-
- * object, hitpoint and hitnormal are None if no hit.
- * polygon is valid only if the object is valid and is a static object, a dynamic object using mesh collision shape or a soft body object, otherwise it is None
- * hituv is valid only if polygon is valid and the object has a UV mapping, otherwise it is None
-
- :rtype:
-
- * 3-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz))
- * or 4-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`)
- * or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`, 2-tuple (u, v))
-
- .. note::
-
- The ray ignores the object on which the method is called. It is casted from/to object center or explicit [x, y, z] points.
-
- .. method:: setCollisionMargin(margin)
-
- Set the objects collision margin.
-
- :arg margin: the collision margin distance in blender units.
- :type margin: float
-
- .. note::
-
- If this object has no physics controller (a physics ID of zero), this function will raise RuntimeError.
-
- .. method:: sendMessage(subject, body="", to="")
-
- Sends a message.
-
- :arg subject: The subject of the message
- :type subject: string
- :arg body: The body of the message (optional)
- :type body: string
- :arg to: The name of the object to send the message to (optional)
- :type to: string
-
- .. method:: reinstancePhysicsMesh(gameObject, meshObject)
-
- Updates the physics system with the changed mesh.
-
- If no arguments are given the physics mesh will be re-created from the first mesh assigned to the game object.
-
- :arg gameObject: optional argument, set the physics shape from this gameObjets mesh.
- :type gameObject: string, :class:`KX_GameObject` or None
- :arg meshObject: optional argument, set the physics shape from this mesh.
- :type meshObject: string, :class:`MeshProxy` or None
-
- :return: True if reinstance succeeded, False if it failed.
- :rtype: boolean
-
- .. note::
-
- If this object has instances the other instances will be updated too.
-
- .. note::
-
- The gameObject argument has an advantage that it can convert from a mesh with modifiers applied (such as subsurf).
-
- .. warning::
-
- Only triangle mesh type objects are supported currently (not convex hull)
-
- .. warning::
-
- If the object is a part of a combound object it will fail (parent or child)
-
- .. warning::
-
- Rebuilding the physics mesh can be slow, running many times per second will give a performance hit.
-
- .. method:: get(key, default=None)
-
- Return the value matching key, or the default value if its not found.
- :return: The key value or a default.
-
- .. method:: playAction(name, start_frame, end_frame, layer=0, priority=0, blendin=0, play_mode=ACT_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0)
-
- Plays an action.
-
- :arg name: the name of the action
- :type name: string
- :arg start: the start frame of the action
- :type start: float
- :arg end: the end frame of the action
- :type end: float
- :arg layer: the layer the action will play in (actions in different layers are added/blended together)
- :type layer: integer
- :arg priority: only play this action if there isn't an action currently playing in this layer with a higher (lower number) priority
- :type priority: integer
- :arg blendin: the amount of blending between this animation and the previous one on this layer
- :type blendin: float
- :arg play_mode: the play mode
- :type play_mode: one of :ref:`these constants <gameobject-playaction-mode>`
- :arg layer_weight: how much of the previous layer to use for blending (0 = add)
- :type layer_weight: float
- :arg ipo_flags: flags for the old IPO behaviors (force, etc)
- :type ipo_flags: int bitfield
- :arg speed: the playback speed of the action as a factor (1.0 = normal speed, 2.0 = 2x speed, etc)
- :type speed: float
-
- .. method:: stopAction(layer=0)
-
- Stop playing the action on the given layer.
-
- :arg layer: The layer to stop playing.
- :type layer: integer
-
- .. method:: getActionFrame(layer=0)
-
- Gets the current frame of the action playing in the supplied layer.
-
- :arg layer: The layer that you want to get the frame from.
- :type layer: integer
-
- :return: The current frame of the action
- :rtype: float
-
- .. method:: setActionFrame(frame, layer=0)
-
- Set the current frame of the action playing in the supplied layer.
-
- :arg layer: The layer where you want to set the frame
- :type layer: integer
- :arg frame: The frame to set the action to
- :type frame: float
-
- .. method:: isPlayingAction(layer=0)
-
- Checks to see if there is an action playing in the given layer.
-
- :arg layer: The layer to check for a playing action.
- :type layer: integer
-
- :return: Whether or not the action is playing
- :rtype: boolean
-
-.. class:: KX_IpoActuator(SCA_IActuator)
-
- IPO actuator activates an animation.
-
- .. attribute:: frameStart
-
- Start frame.
-
- :type: float
-
- .. attribute:: frameEnd
-
- End frame.
-
- :type: float
-
- .. attribute:: propName
-
- Use this property to define the Ipo position.
-
- :type: string
-
- .. attribute:: framePropName
-
- Assign this property this action current frame number.
-
- :type: string
-
- .. attribute:: mode
-
- Play mode for the ipo. Can be on of :ref:`these constants <ipo-actuator>`
-
- :type: integer
-
- .. attribute:: useIpoAsForce
-
- Apply Ipo as a global or local force depending on the local option (dynamic objects only).
-
- :type: boolean
-
- .. attribute:: useIpoAdd
-
- Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag.
-
- :type: boolean
-
- .. attribute:: useIpoLocal
-
- Let the ipo acts in local coordinates, used in Force and Add mode.
-
- :type: boolean
-
- .. attribute:: useChildren
-
- Update IPO on all children Objects as well.
-
- :type: boolean
-
-.. class:: KX_LightObject(KX_GameObject)
-
- A Light object.
-
- .. code-block:: python
-
- # Turn on a red alert light.
- import bge
-
- co = bge.logic.getCurrentController()
- light = co.owner
-
- light.energy = 1.0
- light.color = [1.0, 0.0, 0.0]
-
- .. data:: SPOT
-
- A spot light source. See attribute :data:`type`
-
- .. data:: SUN
-
- A point light source with no attenuation. See attribute :data:`type`
-
- .. data:: NORMAL
-
- A point light source. See attribute :data:`type`
-
- .. attribute:: type
-
- The type of light - must be SPOT, SUN or NORMAL
-
- .. attribute:: layer
-
- The layer mask that this light affects object on.
-
- :type: bitfield
-
- .. attribute:: energy
-
- The brightness of this light.
-
- :type: float
-
- .. attribute:: distance
-
- The maximum distance this light can illuminate. (SPOT and NORMAL lights only).
-
- :type: float
-
- .. attribute:: color
-
- The color of this light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
-
- :type: list [r, g, b]
-
- .. attribute:: lin_attenuation
-
- The linear component of this light's attenuation. (SPOT and NORMAL lights only).
-
- :type: float
-
- .. attribute:: quad_attenuation
-
- The quadratic component of this light's attenuation (SPOT and NORMAL lights only).
-
- :type: float
-
- .. attribute:: spotsize
-
- The cone angle of the spot light, in degrees (SPOT lights only).
-
- :type: float in [0 - 180].
-
- .. attribute:: spotblend
-
- Specifies the intensity distribution of the spot light (SPOT lights only).
-
- :type: float in [0 - 1]
-
- .. note::
-
- Higher values result in a more focused light source.
-
-.. class:: KX_MeshProxy(SCA_IObject)
-
- A mesh object.
-
- You can only change the vertex properties of a mesh object, not the mesh topology.
-
- To use mesh objects effectively, you should know a bit about how the game engine handles them.
-
- #. Mesh Objects are converted from Blender at scene load.
- #. The Converter groups polygons by Material. This means they can be sent to the renderer efficiently. A material holds:
-
- #. The texture.
- #. The Blender material.
- #. The Tile properties
- #. The face properties - (From the "Texture Face" panel)
- #. Transparency & z sorting
- #. Light layer
- #. Polygon shape (triangle/quad)
- #. Game Object
-
- #. Vertices will be split by face if necessary. Vertices can only be shared between faces if:
-
- #. They are at the same position
- #. UV coordinates are the same
- #. Their normals are the same (both polygons are "Set Smooth")
- #. They are the same color, for example: a cube has 24 vertices: 6 faces with 4 vertices per face.
-
- The correct method of iterating over every :class:`KX_VertexProxy` in a game object
-
- .. code-block:: python
-
- from bge import logic
-
- cont = logic.getCurrentController()
- object = cont.owner
-
- for mesh in object.meshes:
- for m_index in range(len(mesh.materials)):
- for v_index in range(mesh.getVertexArrayLength(m_index)):
- vertex = mesh.getVertex(m_index, v_index)
- # Do something with vertex here...
- # ... eg: color the vertex red.
- vertex.color = [1.0, 0.0, 0.0, 1.0]
-
- .. attribute:: materials
-
- :type: list of :class:`KX_BlenderMaterial` or :class:`KX_PolygonMaterial` types
-
- .. attribute:: numPolygons
-
- :type: integer
-
- .. attribute:: numMaterials
-
- :type: integer
-
- .. method:: getMaterialName(matid)
-
- Gets the name of the specified material.
-
- :arg matid: the specified material.
- :type matid: integer
- :return: the attached material name.
- :rtype: string
-
- .. method:: getTextureName(matid)
-
- Gets the name of the specified material's texture.
-
- :arg matid: the specified material
- :type matid: integer
- :return: the attached material's texture name.
- :rtype: string
-
- .. method:: getVertexArrayLength(matid)
-
- Gets the length of the vertex array associated with the specified material.
-
- There is one vertex array for each material.
-
- :arg matid: the specified material
- :type matid: integer
- :return: the number of verticies in the vertex array.
- :rtype: integer
-
- .. method:: getVertex(matid, index)
-
- Gets the specified vertex from the mesh object.
-
- :arg matid: the specified material
- :type matid: integer
- :arg index: the index into the vertex array.
- :type index: integer
- :return: a vertex object.
- :rtype: :class:`KX_VertexProxy`
-
- .. method:: getPolygon(index)
-
- Gets the specified polygon from the mesh.
-
- :arg index: polygon number
- :type index: integer
- :return: a polygon object.
- :rtype: :class:`PolyProxy`
-
- .. method:: transform(matid, matrix)
-
- Transforms the vertices of a mesh.
-
- :arg matid: material index, -1 transforms all.
- :type matid: integer
- :arg matrix: transformation matrix.
- :type matrix: 4x4 matrix [[float]]
-
- .. method:: transformUV(matid, matrix, uv_index=-1, uv_index_from=-1)
-
- Transforms the vertices UV's of a mesh.
-
- :arg matid: material index, -1 transforms all.
- :type matid: integer
- :arg matrix: transformation matrix.
- :type matrix: 4x4 matrix [[float]]
- :arg uv_index: optional uv index, -1 for all, otherwise 0 or 1.
- :type uv_index: integer
- :arg uv_index_from: optional uv index to copy from, -1 to transform the current uv.
- :type uv_index_from: integer
-
-.. class:: SCA_MouseSensor(SCA_ISensor)
-
- Mouse Sensor logic brick.
-
- .. attribute:: position
-
- current [x, y] coordinates of the mouse, in frame coordinates (pixels).
-
- :type: [integer, interger]
-
- .. attribute:: mode
-
- sensor mode.
-
- :type: integer
-
- * KX_MOUSESENSORMODE_LEFTBUTTON(1)
- * KX_MOUSESENSORMODE_MIDDLEBUTTON(2)
- * KX_MOUSESENSORMODE_RIGHTBUTTON(3)
- * KX_MOUSESENSORMODE_WHEELUP(4)
- * KX_MOUSESENSORMODE_WHEELDOWN(5)
- * KX_MOUSESENSORMODE_MOVEMENT(6)
-
- .. method:: getButtonStatus(button)
-
- Get the mouse button status.
-
- :arg button: The code that represents the key you want to get the state of, use one of :ref:`these constants<mouse-keys>`
- :type button: int
- :return: The state of the given key, can be one of :ref:`these constants<input-status>`
- :rtype: int
-
-.. class:: KX_MouseFocusSensor(SCA_MouseSensor)
-
- The mouse focus sensor detects when the mouse is over the current game object.
-
- The mouse focus sensor works by transforming the mouse coordinates from 2d device
- space to 3d space then raycasting away from the camera.
-
- .. attribute:: raySource
-
- The worldspace source of the ray (the view position).
-
- :type: list (vector of 3 floats)
-
- .. attribute:: rayTarget
-
- The worldspace target of the ray.
-
- :type: list (vector of 3 floats)
-
- .. attribute:: rayDirection
-
- The :data:`rayTarget` - :class:`raySource` normalized.
-
- :type: list (normalized vector of 3 floats)
-
- .. attribute:: hitObject
-
- the last object the mouse was over.
-
- :type: :class:`KX_GameObject` or None
-
- .. attribute:: hitPosition
-
- The worldspace position of the ray intersecton.
-
- :type: list (vector of 3 floats)
-
- .. attribute:: hitNormal
-
- the worldspace normal from the face at point of intersection.
-
- :type: list (normalized vector of 3 floats)
-
- .. attribute:: hitUV
-
- the UV coordinates at the point of intersection.
-
- :type: list (vector of 2 floats)
-
- If the object has no UV mapping, it returns [0, 0].
-
- The UV coordinates are not normalized, they can be < 0 or > 1 depending on the UV mapping.
-
- .. attribute:: usePulseFocus
-
- When enabled, moving the mouse over a different object generates a pulse. (only used when the 'Mouse Over Any' sensor option is set).
-
- :type: boolean
-
-.. class:: KX_TouchSensor(SCA_ISensor)
-
- Touch sensor detects collisions between objects.
-
- .. attribute:: propName
-
- The property or material to collide with.
-
- :type: string
-
- .. attribute:: useMaterial
-
- Determines if the sensor is looking for a property or material. KX_True = Find material; KX_False = Find property.
-
- :type: boolean
-
- .. attribute:: usePulseCollision
-
- When enabled, changes to the set of colliding objects generate a pulse.
-
- :type: boolean
-
- .. attribute:: hitObject
-
- The last collided object. (read-only).
-
- :type: :class:`KX_GameObject` or None
-
- .. attribute:: hitObjectList
-
- A list of colliding objects. (read-only).
-
- :type: :class:`CListValue` of :class:`KX_GameObject`
-
-.. class:: KX_NearSensor(KX_TouchSensor)
-
- A near sensor is a specialised form of touch sensor.
-
- .. attribute:: distance
-
- The near sensor activates when an object is within this distance.
-
- :type: float
-
- .. attribute:: resetDistance
-
- The near sensor deactivates when the object exceeds this distance.
-
- :type: float
-
-.. class:: KX_NetworkMessageActuator(SCA_IActuator)
-
- Message Actuator
-
- .. attribute:: propName
-
- Messages will only be sent to objects with the given property name.
-
- :type: string
-
- .. attribute:: subject
-
- The subject field of the message.
-
- :type: string
-
- .. attribute:: body
-
- The body of the message.
-
- :type: string
-
- .. attribute:: usePropBody
-
- Send a property instead of a regular body message.
-
- :type: boolean
-
-.. class:: KX_NetworkMessageSensor(SCA_ISensor)
-
- The Message Sensor logic brick.
-
- Currently only loopback (local) networks are supported.
-
- .. attribute:: subject
-
- The subject the sensor is looking for.
-
- :type: string
-
- .. attribute:: frameMessageCount
-
- The number of messages received since the last frame. (read-only).
-
- :type: integer
-
- .. attribute:: subjects
-
- The list of message subjects received. (read-only).
-
- :type: list of strings
-
- .. attribute:: bodies
-
- The list of message bodies received. (read-only).
-
- :type: list of strings
-
-
-.. class:: KX_FontObject(KX_GameObject)
-
- TODO.
-
-
-.. class:: KX_NavMeshObject(KX_GameObject)
-
- Python interface for using and controlling navigation meshes.
-
- .. method:: findPath(start, goal)
-
- Finds the path from start to goal points.
-
- :arg start: the start point
- :arg start: 3D Vector
- :arg goal: the goal point
- :arg start: 3D Vector
- :return: a path as a list of points
- :rtype: list of points
-
- .. method:: raycast(start, goal)
-
- Raycast from start to goal points.
-
- :arg start: the start point
- :arg start: 3D Vector
- :arg goal: the goal point
- :arg start: 3D Vector
- :return: the hit factor
- :rtype: float
-
- .. method:: draw(mode)
-
- Draws a debug mesh for the navigation mesh.
-
- :arg mode: the drawing mode (one of :ref:`these constants <navmesh-draw-mode>`)
- :arg mode: integer
- :return: None
-
- .. method:: rebuild()
-
- Rebuild the navigation mesh.
-
- :return: None
-
-.. class:: KX_ObjectActuator(SCA_IActuator)
-
- The object actuator ("Motion Actuator") applies force, torque, displacement, angular displacement,
- velocity, or angular velocity to an object.
- Servo control allows to regulate force to achieve a certain speed target.
-
- .. attribute:: force
-
- The force applied by the actuator.
-
- :type: list [x, y, z]
-
- .. attribute:: useLocalForce
-
- A flag specifying if the force is local.
-
- :type: boolean
-
- .. attribute:: torque
-
- The torque applied by the actuator.
-
- :type: list [x, y, z]
-
- .. attribute:: useLocalTorque
-
- A flag specifying if the torque is local.
-
- :type: boolean
-
- .. attribute:: dLoc
-
- The displacement vector applied by the actuator.
-
- :type: list [x, y, z]
-
- .. attribute:: useLocalDLoc
-
- A flag specifying if the dLoc is local.
-
- :type: boolean
-
- .. attribute:: dRot
-
- The angular displacement vector applied by the actuator
-
- :type: list [x, y, z]
-
- .. note::
-
- Since the displacement is applied every frame, you must adjust the displacement based on the frame rate, or you game experience will depend on the player's computer speed.
-
- .. attribute:: useLocalDRot
-
- A flag specifying if the dRot is local.
-
- :type: boolean
-
- .. attribute:: linV
-
- The linear velocity applied by the actuator.
-
- :type: list [x, y, z]
-
- .. attribute:: useLocalLinV
-
- A flag specifying if the linear velocity is local.
-
- :type: boolean
-
- .. note::
-
- This is the target speed for servo controllers.
-
- .. attribute:: angV
-
- The angular velocity applied by the actuator.
-
- :type: list [x, y, z]
-
- .. attribute:: useLocalAngV
-
- A flag specifying if the angular velocity is local.
-
- :type: boolean
-
- .. attribute:: damping
-
- The damping parameter of the servo controller.
-
- :type: short
-
- .. attribute:: forceLimitX
-
- The min/max force limit along the X axis and activates or deactivates the limits in the servo controller.
-
- :type: list [min(float), max(float), bool]
-
- .. attribute:: forceLimitY
-
- The min/max force limit along the Y axis and activates or deactivates the limits in the servo controller.
-
- :type: list [min(float), max(float), bool]
-
- .. attribute:: forceLimitZ
-
- The min/max force limit along the Z axis and activates or deactivates the limits in the servo controller.
-
- :type: list [min(float), max(float), bool]
-
- .. attribute:: pid
-
- The PID coefficients of the servo controller.
-
- :type: list of floats [proportional, integral, derivate]
-
- .. attribute:: reference
-
- The object that is used as reference to compute the velocity for the servo controller.
-
- :type: :class:`KX_GameObject` or None
-
-.. class:: KX_ParentActuator(SCA_IActuator)
-
- The parent actuator can set or remove an objects parent object.
-
- .. attribute:: object
-
- the object this actuator sets the parent too.
-
- :type: :class:`KX_GameObject` or None
-
- .. attribute:: mode
-
- The mode of this actuator.
-
- :type: integer from 0 to 1.
-
- .. attribute:: compound
-
- Whether the object shape should be added to the parent compound shape when parenting.
-
- Effective only if the parent is already a compound shape.
-
- :type: boolean
-
- .. attribute:: ghost
-
- Whether the object should be made ghost when parenting
- Effective only if the shape is not added to the parent compound shape.
-
- :type: boolean
-
-.. class:: KX_PolyProxy(SCA_IObject)
-
- A polygon holds the index of the vertex forming the poylgon.
-
- Note:
- The polygon attributes are read-only, you need to retrieve the vertex proxy if you want
- to change the vertex settings.
-
- .. attribute:: material_name
-
- The name of polygon material, empty if no material.
-
- :type: string
-
- .. attribute:: material
-
- The material of the polygon.
-
- :type: :class:`KX_PolygonMaterial` or :class:`KX_BlenderMaterial`
-
- .. attribute:: texture_name
-
- The texture name of the polygon.
-
- :type: string
-
- .. attribute:: material_id
-
- The material index of the polygon, use this to retrieve vertex proxy from mesh proxy.
-
- :type: integer
-
- .. attribute:: v1
-
- vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
-
- :type: integer
-
- .. attribute:: v2
-
- vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
-
- :type: integer
-
- .. attribute:: v3
-
- vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
-
- :type: integer
-
- .. attribute:: v4
-
- Vertex index of the fourth vertex of the polygon, 0 if polygon has only 3 vertex
- Use this to retrieve vertex proxy from mesh proxy.
-
- :type: integer
-
- .. attribute:: visible
-
- visible state of the polygon: 1=visible, 0=invisible.
-
- :type: integer
-
- .. attribute:: collide
-
- collide state of the polygon: 1=receives collision, 0=collision free.
-
- :type: integer
-
- .. method:: getMaterialName()
-
- Returns the polygon material name with MA prefix
-
- :return: material name
- :rtype: string
-
- .. method:: getMaterial()
-
- :return: The polygon material
- :rtype: :class:`KX_PolygonMaterial` or :class:`KX_BlenderMaterial`
-
- .. method:: getTextureName()
-
- :return: The texture name
- :rtype: string
-
- .. method:: getMaterialIndex()
-
- Returns the material bucket index of the polygon.
- This index and the ones returned by getVertexIndex() are needed to retrieve the vertex proxy from :class:`MeshProxy`.
-
- :return: the material index in the mesh
- :rtype: integer
-
- .. method:: getNumVertex()
-
- Returns the number of vertex of the polygon.
-
- :return: number of vertex, 3 or 4.
- :rtype: integer
-
- .. method:: isVisible()
-
- Returns whether the polygon is visible or not
-
- :return: 0=invisible, 1=visible
- :rtype: boolean
-
- .. method:: isCollider()
-
- Returns whether the polygon is receives collision or not
-
- :return: 0=collision free, 1=receives collision
- :rtype: integer
-
- .. method:: getVertexIndex(vertex)
-
- Returns the mesh vertex index of a polygon vertex
- This index and the one returned by getMaterialIndex() are needed to retrieve the vertex proxy from :class:`MeshProxy`.
-
- :arg vertex: index of the vertex in the polygon: 0->3
- :arg vertex: integer
- :return: mesh vertex index
- :rtype: integer
-
- .. method:: getMesh()
-
- Returns a mesh proxy
-
- :return: mesh proxy
- :rtype: :class:`MeshProxy`
-
-.. class:: KX_PolygonMaterial(PyObjectPlus)
-
- This is the interface to materials in the game engine.
-
- Materials define the render state to be applied to mesh objects.
-
- .. warning::
-
- Some of the methods/variables are CObjects. If you mix these up, you will crash blender.
-
- .. code-block:: python
-
- from bge import logic
-
- vertex_shader = """
-
- void main(void)
- {
- // original vertex position, no changes
- gl_Position = ftransform();
- // coordinate of the 1st texture channel
- gl_TexCoord[0] = gl_MultiTexCoord0;
- // coordinate of the 2nd texture channel
- gl_TexCoord[1] = gl_MultiTexCoord1;
- }
- """
-
- fragment_shader ="""
-
- uniform sampler2D color_0;
- uniform sampler2D color_1;
- uniform float factor;
-
- void main(void)
- {
- vec4 color_0 = texture2D(color_0, gl_TexCoord[0].st);
- vec4 color_1 = texture2D(color_1, gl_TexCoord[1].st);
- gl_FragColor = mix(color_0, color_1, factor);
- }
- """
-
- object = logic.getCurrentController().owner
- object = cont.owner
- for mesh in object.meshes:
- for material in mesh.materials:
- shader = material.getShader()
- if shader != None:
- if not shader.isValid():
- shader.setSource(vertex_shader, fragment_shader, True)
-
- # get the first texture channel of the material
- shader.setSampler('color_0', 0)
- # get the second texture channel of the material
- shader.setSampler('color_1', 1)
- # pass another uniform to the shader
- shader.setUniform1f('factor', 0.3)
-
-
- .. attribute:: texture
-
- Texture name.
-
- :type: string (read-only)
-
- .. attribute:: gl_texture
-
- OpenGL texture handle (eg for glBindTexture(GL_TEXTURE_2D, gl_texture).
-
- :type: integer (read-only)
-
- .. attribute:: material
-
- Material name.
-
- :type: string (read-only)
-
- .. attribute:: tface
-
- Texture face properties.
-
- :type: CObject (read-only)
-
- .. attribute:: tile
-
- Texture is tiling.
-
- :type: boolean
-
- .. attribute:: tilexrep
-
- Number of tile repetitions in x direction.
-
- :type: integer
-
- .. attribute:: tileyrep
-
- Number of tile repetitions in y direction.
-
- :type: integer
-
- .. attribute:: drawingmode
-
- Drawing mode for the material.
- - 2 (drawingmode & 4) Textured
- - 4 (drawingmode & 16) Light
- - 14 (drawingmode & 16384) 3d Polygon Text.
-
- :type: bitfield
-
- .. attribute:: transparent
-
- This material is transparent. All meshes with this
- material will be rendered after non transparent meshes from back
- to front.
-
- :type: boolean
-
- .. attribute:: zsort
-
- Transparent polygons in meshes with this material will be sorted back to
- front before rendering.
- Non-Transparent polygons will be sorted front to back before rendering.
-
- :type: boolean
-
- .. attribute:: diffuse
-
- The diffuse color of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
-
- :type: list [r, g, b]
-
- .. attribute:: specular
-
- The specular color of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
-
- :type: list [r, g, b]
-
- .. attribute:: shininess
-
- The shininess (specular exponent) of the material. 0.0 <= shininess <= 128.0.
-
- :type: float
-
- .. attribute:: specularity
-
- The amount of specular of the material. 0.0 <= specularity <= 1.0.
-
- :type: float
-
- .. method:: updateTexture(tface, rasty)
-
- Updates a realtime animation.
-
- :arg tface: Texture face (eg mat.tface)
- :type tface: CObject
- :arg rasty: Rasterizer
- :type rasty: CObject
-
- .. method:: setTexture(tface)
-
- Sets texture render state.
-
- :arg tface: Texture face
- :type tface: CObject
-
- .. code-block:: python
-
- mat.setTexture(mat.tface)
-
- .. method:: activate(rasty, cachingInfo)
-
- Sets material parameters for this object for rendering.
-
- Material Parameters set:
-
- #. Texture
- #. Backface culling
- #. Line drawing
- #. Specular Colour
- #. Shininess
- #. Diffuse Colour
- #. Polygon Offset.
-
- :arg rasty: Rasterizer instance.
- :type rasty: CObject
- :arg cachingInfo: Material cache instance.
- :type cachingInfo: CObject
-
- .. method:: setCustomMaterial(material)
-
- Sets the material state setup object.
-
- Using this method, you can extend or completely replace the gameengine material
- to do your own advanced multipass effects.
-
- Use this method to register your material class. Instead of the normal material,
- your class's activate method will be called just before rendering the mesh.
- This should setup the texture, material, and any other state you would like.
- It should return True to render the mesh, or False if you are finished. You should
- clean up any state Blender does not set before returning False.
-
- Activate Method Definition:
-
- .. code-block:: python
-
- def activate(self, rasty, cachingInfo, material):
-
- :arg material: The material object.
- :type material: instance
-
- .. code-block:: python
-
- class PyMaterial:
- def __init__(self):
- self.pass_no = -1
-
- def activate(self, rasty, cachingInfo, material):
- # Activate the material here.
- #
- # The activate method will be called until it returns False.
- # Every time the activate method returns True the mesh will
- # be rendered.
- #
- # rasty is a CObject for passing to material.updateTexture()
- # and material.activate()
- # cachingInfo is a CObject for passing to material.activate()
- # material is the KX_PolygonMaterial instance this material
- # was added to
-
- # default material properties:
- self.pass_no += 1
- if self.pass_no == 0:
- material.activate(rasty, cachingInfo)
- # Return True to do this pass
- return True
-
- # clean up and return False to finish.
- self.pass_no = -1
- return False
-
- # Create a new Python Material and pass it to the renderer.
- mat.setCustomMaterial(PyMaterial())
-
-.. class:: KX_RadarSensor(KX_NearSensor)
-
- Radar sensor is a near sensor with a conical sensor object.
-
- .. attribute:: coneOrigin
-
- The origin of the cone with which to test. The origin is in the middle of the cone. (read-only).
-
- :type: list of floats [x, y, z]
-
- .. attribute:: coneTarget
-
- The center of the bottom face of the cone with which to test. (read-only).
-
- :type: list of floats [x, y, z]
-
- .. attribute:: distance
-
- The height of the cone with which to test.
-
- :type: float
-
- .. attribute:: angle
-
- The angle of the cone (in degrees) with which to test.
-
- :type: float
-
- .. attribute:: axis
-
- The axis on which the radar cone is cast.
-
- :type: integer from 0 to 5
-
- KX_RADAR_AXIS_POS_X, KX_RADAR_AXIS_POS_Y, KX_RADAR_AXIS_POS_Z,
- KX_RADAR_AXIS_NEG_X, KX_RADAR_AXIS_NEG_Y, KX_RADAR_AXIS_NEG_Z
-
-.. class:: KX_RaySensor(SCA_ISensor)
-
- A ray sensor detects the first object in a given direction.
-
- .. attribute:: propName
-
- The property the ray is looking for.
-
- :type: string
-
- .. attribute:: range
-
- The distance of the ray.
-
- :type: float
-
- .. attribute:: useMaterial
-
- Whether or not to look for a material (false = property).
-
- :type: boolean
-
- .. attribute:: useXRay
-
- Whether or not to use XRay.
-
- :type: boolean
-
- .. attribute:: hitObject
-
- The game object that was hit by the ray. (read-only).
-
- :type: :class:`KX_GameObject`
-
- .. attribute:: hitPosition
-
- The position (in worldcoordinates) where the object was hit by the ray. (read-only).
-
- :type: list [x, y, z]
-
- .. attribute:: hitNormal
-
- The normal (in worldcoordinates) of the object at the location where the object was hit by the ray. (read-only).
-
- :type: list [x, y, z]
-
- .. attribute:: rayDirection
-
- The direction from the ray (in worldcoordinates). (read-only).
-
- :type: list [x, y, z]
-
- .. attribute:: axis
-
- The axis the ray is pointing on.
-
- :type: integer from 0 to 5
-
- * KX_RAY_AXIS_POS_X
- * KX_RAY_AXIS_POS_Y
- * KX_RAY_AXIS_POS_Z
- * KX_RAY_AXIS_NEG_X
- * KX_RAY_AXIS_NEG_Y
- * KX_RAY_AXIS_NEG_Z
-
-.. class:: KX_SCA_AddObjectActuator(SCA_IActuator)
-
- Edit Object Actuator (in Add Object Mode)
-
- .. warning::
-
- An Add Object actuator will be ignored if at game start, the linked object doesn't exist (or is empty) or the linked object is in an active layer.
-
- .. code-block:: none
-
- Error: GameObject 'Name' has a AddObjectActuator 'ActuatorName' without object (in 'nonactive' layer)
-
- .. attribute:: object
-
- the object this actuator adds.
-
- :type: :class:`KX_GameObject` or None
-
- .. attribute:: objectLastCreated
-
- the last added object from this actuator (read-only).
-
- :type: :class:`KX_GameObject` or None
-
- .. attribute:: time
-
- the lifetime of added objects, in frames. Set to 0 to disable automatic deletion.
-
- :type: integer
-
- .. attribute:: linearVelocity
-
- the initial linear velocity of added objects.
-
- :type: list [vx, vy, vz]
-
- .. attribute:: angularVelocity
-
- the initial angular velocity of added objects.
-
- :type: list [vx, vy, vz]
-
- .. method:: instantAddObject()
-
- adds the object without needing to calling SCA_PythonController.activate()
-
- .. note:: Use objectLastCreated to get the newly created object.
-
-.. class:: KX_SCA_DynamicActuator(SCA_IActuator)
-
- Dynamic Actuator.
-
- .. attribute:: mode
-
- :type: integer
-
- the type of operation of the actuator, 0-4
-
- * KX_DYN_RESTORE_DYNAMICS(0)
- * KX_DYN_DISABLE_DYNAMICS(1)
- * KX_DYN_ENABLE_RIGID_BODY(2)
- * KX_DYN_DISABLE_RIGID_BODY(3)
- * KX_DYN_SET_MASS(4)
-
- .. attribute:: mass
-
- the mass value for the KX_DYN_SET_MASS operation.
-
- :type: float
-
-.. class:: KX_SCA_EndObjectActuator(SCA_IActuator)
-
- Edit Object Actuator (in End Object mode)
-
- This actuator has no python methods.
-
-.. class:: KX_SCA_ReplaceMeshActuator(SCA_IActuator)
-
- Edit Object actuator, in Replace Mesh mode.
-
- .. warning::
-
- Replace mesh actuators will be ignored if at game start, the named mesh doesn't exist.
-
- This will generate a warning in the console
-
- .. code-block:: none
-
- Error: GameObject 'Name' ReplaceMeshActuator 'ActuatorName' without object
-
- .. code-block:: python
-
- # Level-of-detail
- # Switch a game object's mesh based on its depth in the camera view.
- # +----------+ +-----------+ +-------------------------------------+
- # | Always +-----+ Python +-----+ Edit Object (Replace Mesh) LOD.Mesh |
- # +----------+ +-----------+ +-------------------------------------+
- from bge import logic
-
- # List detail meshes here
- # Mesh (name, near, far)
- # Meshes overlap so that they don't 'pop' when on the edge of the distance.
- meshes = ((".Hi", 0.0, -20.0),
- (".Med", -15.0, -50.0),
- (".Lo", -40.0, -100.0)
- )
-
- cont = logic.getCurrentController()
- object = cont.owner
- actuator = cont.actuators["LOD." + obj.name]
- camera = logic.getCurrentScene().active_camera
-
- def Depth(pos, plane):
- return pos[0]*plane[0] + pos[1]*plane[1] + pos[2]*plane[2] + plane[3]
-
- # Depth is negative and decreasing further from the camera
- depth = Depth(object.position, camera.world_to_camera[2])
-
- newmesh = None
- curmesh = None
- # Find the lowest detail mesh for depth
- for mesh in meshes:
- if depth < mesh[1] and depth > mesh[2]:
- newmesh = mesh
- if "ME" + object.name + mesh[0] == actuator.getMesh():
- curmesh = mesh
-
- if newmesh != None and "ME" + object.name + newmesh[0] != actuator.mesh:
- # The mesh is a different mesh - switch it.
- # Check the current mesh is not a better fit.
- if curmesh == None or curmesh[1] < depth or curmesh[2] > depth:
- actuator.mesh = object.name + newmesh[0]
- cont.activate(actuator)
-
- .. attribute:: mesh
-
- :class:`MeshProxy` or the name of the mesh that will replace the current one.
-
- Set to None to disable actuator.
-
- :type: :class:`MeshProxy` or None if no mesh is set
-
- .. attribute:: useDisplayMesh
-
- when true the displayed mesh is replaced.
-
- :type: boolean
-
- .. attribute:: usePhysicsMesh
-
- when true the physics mesh is replaced.
-
- :type: boolean
-
- .. method:: instantReplaceMesh()
-
- Immediately replace mesh without delay.
-
-.. class:: KX_Scene(PyObjectPlus)
-
- An active scene that gives access to objects, cameras, lights and scene attributes.
-
- The activity culling stuff is supposed to disable logic bricks when their owner gets too far
- from the active camera. It was taken from some code lurking at the back of KX_Scene - who knows
- what it does!
-
- .. code-block:: python
-
- from bge import logic
-
- # get the scene
- scene = logic.getCurrentScene()
-
- # print all the objects in the scene
- for object in scene.objects:
- print(object.name)
-
- # get an object named 'Cube'
- object = scene.objects["Cube"]
-
- # get the first object in the scene.
- object = scene.objects[0]
-
- .. code-block:: python
-
- # Get the depth of an object in the camera view.
- from bge import logic
-
- object = logic.getCurrentController().owner
- cam = logic.getCurrentScene().active_camera
-
- # Depth is negative and decreasing further from the camera
- depth = object.position[0]*cam.world_to_camera[2][0] + object.position[1]*cam.world_to_camera[2][1] + object.position[2]*cam.world_to_camera[2][2] + cam.world_to_camera[2][3]
-
- @bug: All attributes are read only at the moment.
-
- .. attribute:: name
-
- The scene's name, (read-only).
-
- :type: string
-
- .. attribute:: objects
-
- A list of objects in the scene, (read-only).
-
- :type: :class:`CListValue` of :class:`KX_GameObject`
-
- .. attribute:: objectsInactive
-
- A list of objects on background layers (used for the addObject actuator), (read-only).
-
- :type: :class:`CListValue` of :class:`KX_GameObject`
-
- .. attribute:: lights
-
- A list of lights in the scene, (read-only).
-
- :type: :class:`CListValue` of :class:`KX_LightObject`
-
- .. attribute:: cameras
-
- A list of cameras in the scene, (read-only).
-
- :type: :class:`CListValue` of :class:`KX_Camera`
-
- .. attribute:: active_camera
-
- The current active camera.
-
- :type: :class:`KX_Camera`
-
- .. note::
-
- This can be set directly from python to avoid using the :class:`KX_SceneActuator`.
-
- .. attribute:: suspended
-
- True if the scene is suspended, (read-only).
-
- :type: boolean
-
- .. attribute:: activity_culling
-
- True if the scene is activity culling.
-
- :type: boolean
-
- .. attribute:: activity_culling_radius
-
- The distance outside which to do activity culling. Measured in manhattan distance.
-
- :type: float
-
- .. attribute:: dbvt_culling
-
- True when Dynamic Bounding box Volume Tree is set (read-only).
-
- :type: boolean
-
- .. attribute:: pre_draw
-
- A list of callables to be run before the render step.
-
- :type: list
-
- .. attribute:: post_draw
-
- A list of callables to be run after the render step.
-
- :type: list
-
- .. attribute:: gravity
-
- The scene gravity using the world x, y and z axis.
-
- :type: list [fx, fy, fz]
-
- .. method:: addObject(object, other, time=0)
-
- Adds an object to the scene like the Add Object Actuator would.
-
- :arg object: The object to add
- :type object: :class:`KX_GameObject` or string
- :arg other: The object's center to use when adding the object
- :type other: :class:`KX_GameObject` or string
- :arg time: The lifetime of the added object, in frames. A time of 0 means the object will last forever.
- :type time: integer
- :return: The newly added object.
- :rtype: :class:`KX_GameObject`
-
- .. method:: end()
-
- Removes the scene from the game.
-
- .. method:: restart()
-
- Restarts the scene.
-
- .. method:: replace(scene)
-
- Replaces this scene with another one.
-
- :arg scene: The name of the scene to replace this scene with.
- :type scene: string
-
- .. method:: suspend()
-
- Suspends this scene.
-
- .. method:: resume()
-
- Resume this scene.
-
- .. method:: get(key, default=None)
-
- Return the value matching key, or the default value if its not found.
- :return: The key value or a default.
-
- .. method:: drawObstacleSimulation()
-
- Draw debug visualization of obstacle simulation.
-
-.. class:: KX_SceneActuator(SCA_IActuator)
-
- Scene Actuator logic brick.
-
- .. warning::
-
- Scene actuators that use a scene name will be ignored if at game start, the named scene doesn't exist or is empty
-
- This will generate a warning in the console:
-
- .. code-block:: none
-
- Error: GameObject 'Name' has a SceneActuator 'ActuatorName' (SetScene) without scene
-
- .. attribute:: scene
-
- the name of the scene to change to/overlay/underlay/remove/suspend/resume.
-
- :type: string
-
- .. attribute:: camera
-
- the camera to change to.
-
- :type: :class:`KX_Camera` on read, string or :class:`KX_Camera` on write
-
- .. note::
-
- When setting the attribute, you can use either a :class:`KX_Camera` or the name of the camera.
-
- .. attribute:: useRestart
-
- Set flag to True to restart the sene.
-
- :type: boolean
-
- .. attribute:: mode
-
- The mode of the actuator.
-
- :type: integer from 0 to 5.
-
-.. class:: KX_SoundActuator(SCA_IActuator)
-
- Sound Actuator.
-
- The :data:`startSound`, :data:`pauseSound` and :data:`stopSound` do not require the actuator to be activated - they act instantly provided that the actuator has been activated once at least.
-
- .. attribute:: volume
-
- The volume (gain) of the sound.
-
- :type: float
-
- .. attribute:: time
-
- The current position in the audio stream (in seconds).
-
- :type: float
-
- .. attribute:: pitch
-
- The pitch of the sound.
-
- :type: float
-
- .. attribute:: mode
-
- The operation mode of the actuator. Can be one of :ref:`these constants<logic-sound-actuator>`
-
- :type: integer
-
- .. attribute:: sound
-
- The sound the actuator should play.
-
- :type: Audaspace factory
-
- .. attribute:: is3D
-
- Whether or not the actuator should be using 3D sound. (read-only)
-
- :type: boolean
-
- .. attribute:: volume_maximum
-
- The maximum gain of the sound, no matter how near it is.
-
- :type: float
-
- .. attribute:: volume_minimum
-
- The minimum gain of the sound, no matter how far it is away.
-
- :type: float
-
- .. attribute:: distance_reference
-
- The distance where the sound has a gain of 1.0.
-
- :type: float
-
- .. attribute:: distance_maximum
-
- The maximum distance at which you can hear the sound.
-
- :type: float
-
- .. attribute:: attenuation
-
- The influence factor on volume depending on distance.
-
- :type: float
-
- .. attribute:: cone_angle_inner
-
- The angle of the inner cone.
-
- :type: float
-
- .. attribute:: cone_angle_outer
-
- The angle of the outer cone.
-
- :type: float
-
- .. attribute:: cone_volume_outer
-
- The gain outside the outer cone (the gain in the outer cone will be interpolated between this value and the normal gain in the inner cone).
-
- :type: float
-
- .. method:: startSound()
-
- Starts the sound.
-
- :return: None
-
- .. method:: pauseSound()
-
- Pauses the sound.
-
- :return: None
-
- .. method:: stopSound()
-
- Stops the sound.
-
- :return: None
-
-.. class:: KX_StateActuator(SCA_IActuator)
-
- State actuator changes the state mask of parent object.
-
- .. attribute:: operation
-
- Type of bit operation to be applied on object state mask.
-
- You can use one of :ref:`these constants <state-actuator-operation>`
-
- :type: integer
-
- .. attribute:: mask
-
- Value that defines the bits that will be modified by the operation.
-
- The bits that are 1 in the mask will be updated in the object state.
-
- The bits that are 0 are will be left unmodified expect for the Copy operation which copies the mask to the object state.
-
- :type: integer
-
-.. class:: KX_TrackToActuator(SCA_IActuator)
-
- Edit Object actuator in Track To mode.
-
- .. warning::
-
- Track To Actuators will be ignored if at game start, the object to track to is invalid.
-
- This will generate a warning in the console:
-
- .. code-block:: none
-
- GameObject 'Name' no object in EditObjectActuator 'ActuatorName'
-
- .. attribute:: object
-
- the object this actuator tracks.
-
- :type: :class:`KX_GameObject` or None
-
- .. attribute:: time
-
- the time in frames with which to delay the tracking motion.
-
- :type: integer
-
- .. attribute:: use3D
-
- the tracking motion to use 3D.
-
- :type: boolean
-
-.. class:: KX_VehicleWrapper(PyObjectPlus)
-
- KX_VehicleWrapper
-
- TODO - description
-
- .. method:: addWheel(wheel, attachPos, attachDir, axleDir, suspensionRestLength, wheelRadius, hasSteering)
-
- Add a wheel to the vehicle
-
- :arg wheel: The object to use as a wheel.
- :type wheel: :class:`KX_GameObject` or a KX_GameObject name
- :arg attachPos: The position that this wheel will attach to.
- :type attachPos: vector of 3 floats
- :arg attachDir: The direction this wheel points.
- :type attachDir: vector of 3 floats
- :arg axleDir: The direction of this wheels axle.
- :type axleDir: vector of 3 floats
- :arg suspensionRestLength: TODO - Description
- :type suspensionRestLength: float
- :arg wheelRadius: The size of the wheel.
- :type wheelRadius: float
-
- .. method:: applyBraking(force, wheelIndex)
-
- Apply a braking force to the specified wheel
-
- :arg force: the brake force
- :type force: float
-
- :arg wheelIndex: index of the wheel where the force needs to be applied
- :type wheelIndex: integer
-
- .. method:: applyEngineForce(force, wheelIndex)
-
- Apply an engine force to the specified wheel
-
- :arg force: the engine force
- :type force: float
-
- :arg wheelIndex: index of the wheel where the force needs to be applied
- :type wheelIndex: integer
-
- .. method:: getConstraintId()
-
- Get the constraint ID
-
- :return: the constraint id
- :rtype: integer
-
- .. method:: getConstraintType()
-
- Returns the constraint type.
-
- :return: constraint type
- :rtype: integer
-
- .. method:: getNumWheels()
-
- Returns the number of wheels.
-
- :return: the number of wheels for this vehicle
- :rtype: integer
-
- .. method:: getWheelOrientationQuaternion(wheelIndex)
-
- Returns the wheel orientation as a quaternion.
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
-
- :return: TODO Description
- :rtype: TODO - type should be quat as per method name but from the code it looks like a matrix
-
- .. method:: getWheelPosition(wheelIndex)
-
- Returns the position of the specified wheel
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
- :return: position vector
- :rtype: list[x, y, z]
-
- .. method:: getWheelRotation(wheelIndex)
-
- Returns the rotation of the specified wheel
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
-
- :return: the wheel rotation
- :rtype: float
-
- .. method:: setRollInfluence(rollInfluece, wheelIndex)
-
- Set the specified wheel's roll influence.
- The higher the roll influence the more the vehicle will tend to roll over in corners.
-
- :arg rollInfluece: the wheel roll influence
- :type rollInfluece: float
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
-
- .. method:: setSteeringValue(steering, wheelIndex)
-
- Set the specified wheel's steering
-
- :arg steering: the wheel steering
- :type steering: float
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
-
- .. method:: setSuspensionCompression(compression, wheelIndex)
-
- Set the specified wheel's compression
-
- :arg compression: the wheel compression
- :type compression: float
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
-
- .. method:: setSuspensionDamping(damping, wheelIndex)
-
- Set the specified wheel's damping
-
- :arg damping: the wheel damping
- :type damping: float
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
-
- .. method:: setSuspensionStiffness(stiffness, wheelIndex)
-
- Set the specified wheel's stiffness
-
- :arg stiffness: the wheel stiffness
- :type stiffness: float
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
-
- .. method:: setTyreFriction(friction, wheelIndex)
-
- Set the specified wheel's tyre friction
-
- :arg friction: the tyre friction
- :type friction: float
-
- :arg wheelIndex: the wheel index
- :type wheelIndex: integer
-
-.. class:: KX_CharacterWrapper(PyObjectPlus)
-
- A wrapper to expose character physics options.
-
- .. attribute:: onGround
-
- Whether or not the character is on the ground. (read-only)
-
- :type: boolean
-
- .. attribute:: gravity
-
- The gravity value used for the character.
-
- :type: float
-
- .. method:: jump()
-
- The character jumps based on it's jump speed.
-
-.. class:: KX_VertexProxy(SCA_IObject)
-
- A vertex holds position, UV, color and normal information.
-
- Note:
- The physics simulation is NOT currently updated - physics will not respond
- to changes in the vertex position.
-
- .. attribute:: XYZ
-
- The position of the vertex.
-
- :type: list [x, y, z]
-
- .. attribute:: UV
-
- The texture coordinates of the vertex.
-
- :type: list [u, v]
-
- .. attribute:: normal
-
- The normal of the vertex.
-
- :type: list [nx, ny, nz]
-
- .. attribute:: color
-
- The color of the vertex.
-
- :type: list [r, g, b, a]
-
- Black = [0.0, 0.0, 0.0, 1.0], White = [1.0, 1.0, 1.0, 1.0]
-
- .. attribute:: x
-
- The x coordinate of the vertex.
-
- :type: float
-
- .. attribute:: y
-
- The y coordinate of the vertex.
-
- :type: float
-
- .. attribute:: z
-
- The z coordinate of the vertex.
-
- :type: float
-
- .. attribute:: u
-
- The u texture coordinate of the vertex.
-
- :type: float
-
- .. attribute:: v
-
- The v texture coordinate of the vertex.
-
- :type: float
-
- .. attribute:: u2
-
- The second u texture coordinate of the vertex.
-
- :type: float
-
- .. attribute:: v2
-
- The second v texture coordinate of the vertex.
-
- :type: float
-
- .. attribute:: r
-
- The red component of the vertex color. 0.0 <= r <= 1.0.
-
- :type: float
-
- .. attribute:: g
-
- The green component of the vertex color. 0.0 <= g <= 1.0.
-
- :type: float
-
- .. attribute:: b
-
- The blue component of the vertex color. 0.0 <= b <= 1.0.
-
- :type: float
-
- .. attribute:: a
-
- The alpha component of the vertex color. 0.0 <= a <= 1.0.
-
- :type: float
-
- .. method:: getXYZ()
-
- Gets the position of this vertex.
-
- :return: this vertexes position in local coordinates.
- :rtype: list [x, y, z]
-
- .. method:: setXYZ(pos)
-
- Sets the position of this vertex.
-
- :type: list [x, y, z]
-
- :arg pos: the new position for this vertex in local coordinates.
-
- .. method:: getUV()
-
- Gets the UV (texture) coordinates of this vertex.
-
- :return: this vertexes UV (texture) coordinates.
- :rtype: list [u, v]
-
- .. method:: setUV(uv)
-
- Sets the UV (texture) coordinates of this vertex.
-
- :type: list [u, v]
-
- .. method:: getUV2()
-
- Gets the 2nd UV (texture) coordinates of this vertex.
-
- :return: this vertexes UV (texture) coordinates.
- :rtype: list [u, v]
-
- .. method:: setUV2(uv, unit)
-
- Sets the 2nd UV (texture) coordinates of this vertex.
-
- :type: list [u, v]
-
- :arg unit: optional argument, FLAT==1, SECOND_UV==2, defaults to SECOND_UV
- :arg unit: integer
-
- .. method:: getRGBA()
-
- Gets the color of this vertex.
-
- The color is represented as four bytes packed into an integer value. The color is
- packed as RGBA.
-
- Since Python offers no way to get each byte without shifting, you must use the struct module to
- access color in an machine independent way.
-
- Because of this, it is suggested you use the r, g, b and a attributes or the color attribute instead.
-
- .. code-block:: python
-
- import struct;
- col = struct.unpack('4B', struct.pack('I', v.getRGBA()))
- # col = (r, g, b, a)
- # black = ( 0, 0, 0, 255)
- # white = (255, 255, 255, 255)
-
- :return: packed color. 4 byte integer with one byte per color channel in RGBA format.
- :rtype: integer
-
- .. method:: setRGBA(col)
-
- Sets the color of this vertex.
-
- See getRGBA() for the format of col, and its relevant problems. Use the r, g, b and a attributes
- or the color attribute instead.
-
- setRGBA() also accepts a four component list as argument col. The list represents the color as [r, g, b, a]
- with black = [0.0, 0.0, 0.0, 1.0] and white = [1.0, 1.0, 1.0, 1.0]
-
- .. code-block:: python
-
- v.setRGBA(0xff0000ff) # Red
- v.setRGBA(0xff00ff00) # Green on little endian, transparent purple on big endian
- v.setRGBA([1.0, 0.0, 0.0, 1.0]) # Red
- v.setRGBA([0.0, 1.0, 0.0, 1.0]) # Green on all platforms.
-
- :arg col: the new color of this vertex in packed RGBA format.
- :type col: integer or list [r, g, b, a]
-
- .. method:: getNormal()
-
- Gets the normal vector of this vertex.
-
- :return: normalized normal vector.
- :rtype: list [nx, ny, nz]
-
- .. method:: setNormal(normal)
-
- Sets the normal vector of this vertex.
-
- :type: sequence of floats [r, g, b]
-
- :arg normal: the new normal of this vertex.
-
-.. class:: KX_VisibilityActuator(SCA_IActuator)
-
- Visibility Actuator.
-
- .. attribute:: visibility
-
- whether the actuator makes its parent object visible or invisible.
-
- :type: boolean
-
- .. attribute:: useOcclusion
-
- whether the actuator makes its parent object an occluder or not.
-
- :type: boolean
-
- .. attribute:: useRecursion
-
- whether the visibility/occlusion should be propagated to all children of the object.
-
- :type: boolean
-
-.. class:: SCA_2DFilterActuator(SCA_IActuator)
-
- Create, enable and disable 2D filters
-
- The following properties don't have an immediate effect.
- You must active the actuator to get the result.
- The actuator is not persistent: it automatically stops itself after setting up the filter
- but the filter remains active. To stop a filter you must activate the actuator with 'type'
- set to :data:`~bge.logic.RAS_2DFILTER_DISABLED` or :data:`~bge.logic.RAS_2DFILTER_NOFILTER`.
-
- .. attribute:: shaderText
-
- shader source code for custom shader.
-
- :type: string
-
- .. attribute:: disableMotionBlur
-
- action on motion blur: 0=enable, 1=disable.
-
- :type: integer
-
- .. attribute:: mode
-
- Type of 2D filter, use one of :ref:`these constants <Two-D-FilterActuator-mode>`
-
- :type: integer
-
- .. attribute:: passNumber
-
- order number of filter in the stack of 2D filters. Filters are executed in increasing order of passNb.
-
- Only be one filter can be defined per passNb.
-
- :type: integer (0-100)
-
- .. attribute:: value
-
- argument for motion blur filter.
-
- :type: float (0.0-100.0)
-
-.. class:: SCA_ANDController(SCA_IController)
-
- An AND controller activates only when all linked sensors are activated.
-
- There are no special python methods for this controller.
-
-.. class:: SCA_ActuatorSensor(SCA_ISensor)
-
- Actuator sensor detect change in actuator state of the parent object.
- It generates a positive pulse if the corresponding actuator is activated
- and a negative pulse if the actuator is deactivated.
-
- .. attribute:: actuator
-
- the name of the actuator that the sensor is monitoring.
-
- :type: string
-
-.. class:: SCA_AlwaysSensor(SCA_ISensor)
-
- This sensor is always activated.
-
-.. class:: SCA_DelaySensor(SCA_ISensor)
-
- The Delay sensor generates positive and negative triggers at precise time,
- expressed in number of frames. The delay parameter defines the length of the initial OFF period. A positive trigger is generated at the end of this period.
-
- The duration parameter defines the length of the ON period following the OFF period.
- There is a negative trigger at the end of the ON period. If duration is 0, the sensor stays ON and there is no negative trigger.
-
- The sensor runs the OFF-ON cycle once unless the repeat option is set: the OFF-ON cycle repeats indefinately (or the OFF cycle if duration is 0).
-
- Use :class:`SCA_ISensor.reset` at any time to restart sensor.
-
- .. attribute:: delay
-
- length of the initial OFF period as number of frame, 0 for immediate trigger.
-
- :type: integer.
-
- .. attribute:: duration
-
- length of the ON period in number of frame after the initial OFF period.
-
- If duration is greater than 0, a negative trigger is sent at the end of the ON pulse.
-
- :type: integer
-
- .. attribute:: repeat
-
- 1 if the OFF-ON cycle should be repeated indefinately, 0 if it should run once.
-
- :type: integer
-
-.. class:: SCA_JoystickSensor(SCA_ISensor)
-
- This sensor detects player joystick events.
-
- .. attribute:: axisValues
-
- The state of the joysticks axis as a list of values :data:`numAxis` long. (read-only).
-
- :type: list of ints.
-
- Each spesifying the value of an axis between -32767 and 32767 depending on how far the axis is pushed, 0 for nothing.
- The first 2 values are used by most joysticks and gamepads for directional control. 3rd and 4th values are only on some joysticks and can be used for arbitary controls.
-
- * left:[-32767, 0, ...]
- * right:[32767, 0, ...]
- * up:[0, -32767, ...]
- * down:[0, 32767, ...]
-
- .. attribute:: axisSingle
-
- like :data:`axisValues` but returns a single axis value that is set by the sensor. (read-only).
-
- :type: integer
-
- .. note::
-
- Only use this for "Single Axis" type sensors otherwise it will raise an error.
-
- .. attribute:: hatValues
-
- The state of the joysticks hats as a list of values :data:`numHats` long. (read-only).
-
- :type: list of ints
-
- Each spesifying the direction of the hat from 1 to 12, 0 when inactive.
-
- Hat directions are as follows...
-
- * 0:None
- * 1:Up
- * 2:Right
- * 4:Down
- * 8:Left
- * 3:Up - Right
- * 6:Down - Right
- * 12:Down - Left
- * 9:Up - Left
-
- .. attribute:: hatSingle
-
- Like :data:`hatValues` but returns a single hat direction value that is set by the sensor. (read-only).
-
- :type: integer
-
- .. attribute:: numAxis
-
- The number of axes for the joystick at this index. (read-only).
-
- :type: integer
-
- .. attribute:: numButtons
-
- The number of buttons for the joystick at this index. (read-only).
-
- :type: integer
-
- .. attribute:: numHats
-
- The number of hats for the joystick at this index. (read-only).
-
- :type: integer
-
- .. attribute:: connected
-
- True if a joystick is connected at this joysticks index. (read-only).
-
- :type: boolean
-
- .. attribute:: index
-
- The joystick index to use (from 0 to 7). The first joystick is always 0.
-
- :type: integer
-
- .. attribute:: threshold
-
- Axis threshold. Joystick axis motion below this threshold wont trigger an event. Use values between (0 and 32767), lower values are more sensitive.
-
- :type: integer
-
- .. attribute:: button
-
- The button index the sensor reacts to (first button = 0). When the "All Events" toggle is set, this option has no effect.
-
- :type: integer
-
- .. attribute:: axis
-
- The axis this sensor reacts to, as a list of two values [axisIndex, axisDirection]
-
- * axisIndex: the axis index to use when detecting axis movement, 1=primary directional control, 2=secondary directional control.
- * axisDirection: 0=right, 1=up, 2=left, 3=down.
-
- :type: [integer, integer]
-
- .. attribute:: hat
-
- The hat the sensor reacts to, as a list of two values: [hatIndex, hatDirection]
-
- * hatIndex: the hat index to use when detecting hat movement, 1=primary hat, 2=secondary hat (4 max).
- * hatDirection: 1-12.
-
- :type: [integer, integer]
-
- .. method:: getButtonActiveList()
-
- :return: A list containing the indicies of the currently pressed buttons.
- :rtype: list
-
- .. method:: getButtonStatus(buttonIndex)
-
- :arg buttonIndex: the button index, 0=first button
- :type buttonIndex: integer
- :return: The current pressed state of the specified button.
- :rtype: boolean
-
-.. class:: SCA_KeyboardSensor(SCA_ISensor)
-
- A keyboard sensor detects player key presses.
-
- See module :mod:`bge.keys` for keycode values.
-
- .. attribute:: key
-
- The key code this sensor is looking for.
-
- :type: keycode from :mod:`bge.keys` module
-
- .. attribute:: hold1
-
- The key code for the first modifier this sensor is looking for.
-
- :type: keycode from :mod:`bge.keys` module
-
- .. attribute:: hold2
-
- The key code for the second modifier this sensor is looking for.
-
- :type: keycode from :mod:`bge.keys` module
-
- .. attribute:: toggleProperty
-
- The name of the property that indicates whether or not to log keystrokes as a string.
-
- :type: string
-
- .. attribute:: targetProperty
-
- The name of the property that receives keystrokes in case in case a string is logged.
-
- :type: string
-
- .. attribute:: useAllKeys
-
- Flag to determine whether or not to accept all keys.
-
- :type: boolean
-
- .. attribute:: events
-
- a list of pressed keys that have either been pressed, or just released, or are active this frame. (read-only).
-
- :type: list [[:ref:`keycode<keyboard-keys>`, :ref:`status<input-status>`], ...]
-
- .. method:: getKeyStatus(keycode)
-
- Get the status of a key.
-
- :arg keycode: The code that represents the key you want to get the state of, use one of :ref:`these constants<keyboard-keys>`
- :type keycode: integer
- :return: The state of the given key, can be one of :ref:`these constants<input-status>`
- :rtype: int
-
-.. class:: SCA_NANDController(SCA_IController)
-
- An NAND controller activates when all linked sensors are not active.
-
- There are no special python methods for this controller.
-
-.. class:: SCA_NORController(SCA_IController)
-
- An NOR controller activates only when all linked sensors are de-activated.
-
- There are no special python methods for this controller.
-
-.. class:: SCA_ORController(SCA_IController)
-
- An OR controller activates when any connected sensor activates.
-
- There are no special python methods for this controller.
-
-.. class:: SCA_PropertyActuator(SCA_IActuator)
-
- Property Actuator
-
- .. attribute:: propName
-
- the property on which to operate.
-
- :type: string
-
- .. attribute:: value
-
- the value with which the actuator operates.
-
- :type: string
-
- .. attribute:: mode
-
- TODO - add constants to game logic dict!.
-
- :type: integer
-
-.. class:: SCA_PropertySensor(SCA_ISensor)
-
- Activates when the game object property matches.
-
- .. attribute:: mode
-
- Type of check on the property. Can be one of :ref:`these constants <logic-property-sensor>`
-
- :type: integer.
-
- .. attribute:: propName
-
- the property the sensor operates.
-
- :type: string
-
- .. attribute:: value
-
- the value with which the sensor compares to the value of the property.
-
- :type: string
-
- .. attribute:: min
-
- the minimum value of the range used to evaluate the property when in interval mode.
-
- :type: string
-
- .. attribute:: max
-
- the maximum value of the range used to evaluate the property when in interval mode.
-
- :type: string
-
-.. class:: SCA_PythonController(SCA_IController)
-
- A Python controller uses a Python script to activate it's actuators,
- based on it's sensors.
-
- .. attribute:: script
-
- The value of this variable depends on the execution methid.
-
- * When 'Script' execution mode is set this value contains the entire python script as a single string (not the script name as you might expect) which can be modified to run different scripts.
- * When 'Module' execution mode is set this value will contain a single line string - module name and function "module.func" or "package.modile.func" where the module names are python textblocks or external scripts.
-
- :type: string
-
- .. note::
-
- Once this is set the script name given for warnings will remain unchanged.
-
- .. attribute:: mode
-
- the execution mode for this controller (read-only).
-
- * Script: 0, Execite the :data:`script` as a python code.
- * Module: 1, Execite the :data:`script` as a module and function.
-
- :type: integer
-
- .. method:: activate(actuator)
-
- Activates an actuator attached to this controller.
-
- :arg actuator: The actuator to operate on.
- :type actuator: actuator or the actuator name as a string
-
- .. method:: deactivate(actuator)
-
- Deactivates an actuator attached to this controller.
-
- :arg actuator: The actuator to operate on.
- :type actuator: actuator or the actuator name as a string
-
-.. class:: SCA_RandomActuator(SCA_IActuator)
-
- Random Actuator
-
- .. attribute:: seed
-
- Seed of the random number generator.
-
- :type: integer.
-
- Equal seeds produce equal series. If the seed is 0, the generator will produce the same value on every call.
-
- .. attribute:: para1
-
- the first parameter of the active distribution.
-
- :type: float, read-only.
-
- Refer to the documentation of the generator types for the meaning of this value.
-
- .. attribute:: para2
-
- the second parameter of the active distribution.
-
- :type: float, read-only
-
- Refer to the documentation of the generator types for the meaning of this value.
-
- .. attribute:: distribution
-
- Distribution type. (read-only). Can be one of :ref:`these constants <logic-random-distributions>`
-
- :type: integer
-
- .. attribute:: propName
-
- the name of the property to set with the random value.
-
- :type: string
-
- If the generator and property types do not match, the assignment is ignored.
-
- .. method:: setBoolConst(value)
-
- Sets this generator to produce a constant boolean value.
-
- :arg value: The value to return.
- :type value: boolean
-
- .. method:: setBoolUniform()
-
- Sets this generator to produce a uniform boolean distribution.
-
- The generator will generate True or False with 50% chance.
-
- .. method:: setBoolBernouilli(value)
-
- Sets this generator to produce a Bernouilli distribution.
-
- :arg value: Specifies the proportion of False values to produce.
-
- * 0.0: Always generate True
- * 1.0: Always generate False
- :type value: float
-
- .. method:: setIntConst(value)
-
- Sets this generator to always produce the given value.
-
- :arg value: the value this generator produces.
- :type value: integer
-
- .. method:: setIntUniform(lower_bound, upper_bound)
-
- Sets this generator to produce a random value between the given lower and
- upper bounds (inclusive).
-
- :type lower_bound: integer
- :type upper_bound: integer
-
- .. method:: setIntPoisson(value)
-
- Generate a Poisson-distributed number.
-
- This performs a series of Bernouilli tests with parameter value.
- It returns the number of tries needed to achieve succes.
-
- :type value: float
-
- .. method:: setFloatConst(value)
-
- Always generate the given value.
-
- :type value: float
-
- .. method:: setFloatUniform(lower_bound, upper_bound)
-
- Generates a random float between lower_bound and upper_bound with a
- uniform distribution.
-
- :type lower_bound: float
- :type upper_bound: float
-
- .. method:: setFloatNormal(mean, standard_deviation)
-
- Generates a random float from the given normal distribution.
-
- :arg mean: The mean (average) value of the generated numbers
- :type mean: float
- :arg standard_deviation: The standard deviation of the generated numbers.
- :type standard_deviation: float
-
- .. method:: setFloatNegativeExponential(half_life)
-
- Generate negative-exponentially distributed numbers.
-
- The half-life 'time' is characterized by half_life.
-
- :type half_life: float
-
-.. class:: SCA_RandomSensor(SCA_ISensor)
-
- This sensor activates randomly.
-
- .. attribute:: lastDraw
-
- The seed of the random number generator.
-
- :type: integer
-
- .. attribute:: seed
-
- The seed of the random number generator.
-
- :type: integer
-
-.. class:: SCA_XNORController(SCA_IController)
-
- An XNOR controller activates when all linked sensors are the same (activated or inative).
-
- There are no special python methods for this controller.
-
-.. class:: SCA_XORController(SCA_IController)
-
- An XOR controller activates when there is the input is mixed, but not when all are on or off.
-
- There are no special python methods for this controller.
-
-.. class:: KX_Camera(KX_GameObject)
-
- A Camera object.
-
- .. data:: INSIDE
-
- See :data:`sphereInsideFrustum` and :data:`boxInsideFrustum`
-
- .. data:: INTERSECT
-
- See :data:`sphereInsideFrustum` and :data:`boxInsideFrustum`
-
- .. data:: OUTSIDE
-
- See :data:`sphereInsideFrustum` and :data:`boxInsideFrustum`
-
- .. attribute:: lens
-
- The camera's lens value.
-
- :type: float
-
- .. attribute:: ortho_scale
-
- The camera's view scale when in orthographic mode.
-
- :type: float
-
- .. attribute:: near
-
- The camera's near clip distance.
-
- :type: float
-
- .. attribute:: far
-
- The camera's far clip distance.
-
- :type: float
-
- .. attribute:: perspective
-
- True if this camera has a perspective transform, False for an orthographic projection.
-
- :type: boolean
-
- .. attribute:: frustum_culling
-
- True if this camera is frustum culling.
-
- :type: boolean
-
- .. attribute:: projection_matrix
-
- This camera's 4x4 projection matrix.
-
- .. note::
-
- This is the identity matrix prior to rendering the first frame (any Python done on frame 1).
-
- :type: 4x4 Matrix [[float]]
-
- .. attribute:: modelview_matrix
-
- This camera's 4x4 model view matrix. (read-only).
-
- :type: 4x4 Matrix [[float]]
-
- .. note::
-
- This matrix is regenerated every frame from the camera's position and orientation. Also, this is the identity matrix prior to rendering the first frame (any Python done on frame 1).
-
- .. attribute:: camera_to_world
-
- This camera's camera to world transform. (read-only).
-
- :type: 4x4 Matrix [[float]]
-
- .. note::
-
- This matrix is regenerated every frame from the camera's position and orientation.
-
- .. attribute:: world_to_camera
-
- This camera's world to camera transform. (read-only).
-
- :type: 4x4 Matrix [[float]]
-
- .. note::
-
- Regenerated every frame from the camera's position and orientation.
-
- .. note::
-
- This is camera_to_world inverted.
-
- .. attribute:: useViewport
-
- True when the camera is used as a viewport, set True to enable a viewport for this camera.
-
- :type: boolean
-
- .. method:: sphereInsideFrustum(centre, radius)
-
- Tests the given sphere against the view frustum.
-
- :arg centre: The centre of the sphere (in world coordinates.)
- :type centre: list [x, y, z]
- :arg radius: the radius of the sphere
- :type radius: float
- :return: :data:`~bge.types.KX_Camera.INSIDE`, :data:`~bge.types.KX_Camera.OUTSIDE` or :data:`~bge.types.KX_Camera.INTERSECT`
- :rtype: integer
-
- .. note::
-
- When the camera is first initialized the result will be invalid because the projection matrix has not been set.
-
- .. code-block:: python
-
- from bge import logic
- cont = logic.getCurrentController()
- cam = cont.owner
-
- # A sphere of radius 4.0 located at [x, y, z] = [1.0, 1.0, 1.0]
- if (cam.sphereInsideFrustum([1.0, 1.0, 1.0], 4) != cam.OUTSIDE):
- # Sphere is inside frustum !
- # Do something useful !
- else:
- # Sphere is outside frustum
-
- .. method:: boxInsideFrustum(box)
-
- Tests the given box against the view frustum.
-
- :arg box: Eight (8) corner points of the box (in world coordinates.)
- :type box: list of lists
- :return: :data:`~bge.types.KX_Camera.INSIDE`, :data:`~bge.types.KX_Camera.OUTSIDE` or :data:`~bge.types.KX_Camera.INTERSECT`
-
- .. note::
-
- When the camera is first initialized the result will be invalid because the projection matrix has not been set.
-
- .. code-block:: python
-
- from bge import logic
- cont = logic.getCurrentController()
- cam = cont.owner
-
- # Box to test...
- box = []
- box.append([-1.0, -1.0, -1.0])
- box.append([-1.0, -1.0, 1.0])
- box.append([-1.0, 1.0, -1.0])
- box.append([-1.0, 1.0, 1.0])
- box.append([ 1.0, -1.0, -1.0])
- box.append([ 1.0, -1.0, 1.0])
- box.append([ 1.0, 1.0, -1.0])
- box.append([ 1.0, 1.0, 1.0])
-
- if (cam.boxInsideFrustum(box) != cam.OUTSIDE):
- # Box is inside/intersects frustum !
- # Do something useful !
- else:
- # Box is outside the frustum !
-
- .. method:: pointInsideFrustum(point)
-
- Tests the given point against the view frustum.
-
- :arg point: The point to test (in world coordinates.)
- :type point: 3D Vector
- :return: True if the given point is inside this camera's viewing frustum.
- :rtype: boolean
-
- .. note::
-
- When the camera is first initialized the result will be invalid because the projection matrix has not been set.
-
- .. code-block:: python
-
- from bge import logic
- cont = logic.getCurrentController()
- cam = cont.owner
-
- # Test point [0.0, 0.0, 0.0]
- if (cam.pointInsideFrustum([0.0, 0.0, 0.0])):
- # Point is inside frustum !
- # Do something useful !
- else:
- # Box is outside the frustum !
-
- .. method:: getCameraToWorld()
-
- Returns the camera-to-world transform.
-
- :return: the camera-to-world transform matrix.
- :rtype: matrix (4x4 list)
-
- .. method:: getWorldToCamera()
-
- Returns the world-to-camera transform.
-
- This returns the inverse matrix of getCameraToWorld().
-
- :return: the world-to-camera transform matrix.
- :rtype: matrix (4x4 list)
-
- .. method:: setOnTop()
-
- Set this cameras viewport ontop of all other viewport.
-
- .. method:: setViewport(left, bottom, right, top)
-
- Sets the region of this viewport on the screen in pixels.
-
- Use :data:`bge.render.getWindowHeight` and :data:`bge.render.getWindowWidth` to calculate values relative to the entire display.
-
- :arg left: left pixel coordinate of this viewport
- :type left: integer
- :arg bottom: bottom pixel coordinate of this viewport
- :type bottom: integer
- :arg right: right pixel coordinate of this viewport
- :type right: integer
- :arg top: top pixel coordinate of this viewport
- :type top: integer
-
- .. method:: getScreenPosition(object)
-
- Gets the position of an object projected on screen space.
-
- .. code-block:: python
-
- # For an object in the middle of the screen, coord = [0.5, 0.5]
- coord = camera.getScreenPosition(object)
-
- :arg object: object name or list [x, y, z]
- :type object: :class:`KX_GameObject` or 3D Vector
- :return: the object's position in screen coordinates.
- :rtype: list [x, y]
-
- .. method:: getScreenVect(x, y)
-
- Gets the vector from the camera position in the screen coordinate direction.
-
- :arg x: X Axis
- :type x: float
- :arg y: Y Axis
- :type y: float
- :rtype: 3D Vector
- :return: The vector from screen coordinate.
-
- .. code-block:: python
-
- # Gets the vector of the camera front direction:
- m_vect = camera.getScreenVect(0.5, 0.5)
-
- .. method:: getScreenRay(x, y, dist=inf, property=None)
-
- Look towards a screen coordinate (x, y) and find first object hit within dist that matches prop.
- The ray is similar to KX_GameObject->rayCastTo.
-
- :arg x: X Axis
- :type x: float
- :arg y: Y Axis
- :type y: float
- :arg dist: max distance to look (can be negative => look behind); 0 or omitted => detect up to other
- :type dist: float
- :arg property: property name that object must have; can be omitted => detect any object
- :type property: string
- :rtype: :class:`KX_GameObject`
- :return: the first object hit or None if no object or object does not match prop
-
- .. code-block:: python
-
- # Gets an object with a property "wall" in front of the camera within a distance of 100:
- target = camera.getScreenRay(0.5, 0.5, 100, "wall")
-
-.. class:: BL_ArmatureObject(KX_GameObject)
-
- An armature object.
-
- .. attribute:: constraints
-
- The list of armature constraint defined on this armature.
- Elements of the list can be accessed by index or string.
- The key format for string access is '<bone_name>:<constraint_name>'.
-
- :type: list of :class:`BL_ArmatureConstraint`
-
- .. attribute:: channels
-
- The list of armature channels.
- Elements of the list can be accessed by index or name the bone.
-
- :type: list of :class:`BL_ArmatureChannel`
-
- .. method:: update()
-
- Ensures that the armature will be updated on next graphic frame.
-
- This action is unecessary if a KX_ArmatureActuator with mode run is active
- or if an action is playing. Use this function in other cases. It must be called
- on each frame to ensure that the armature is updated continously.
-
-.. class:: BL_ArmatureActuator(SCA_IActuator)
-
- Armature Actuators change constraint condition on armatures.
-
- .. attribute:: type
-
- The type of action that the actuator executes when it is active.
-
- Can be one of :ref:`these constants <armatureactuator-constants-type>`
-
- :type: integer
-
- .. attribute:: constraint
-
- The constraint object this actuator is controlling.
-
- :type: :class:`BL_ArmatureConstraint`
-
- .. attribute:: target
-
- The object that this actuator will set as primary target to the constraint it controls.
-
- :type: :class:`KX_GameObject`
-
- .. attribute:: subtarget
-
- The object that this actuator will set as secondary target to the constraint it controls.
-
- :type: :class:`KX_GameObject`.
-
- .. note::
-
- Currently, the only secondary target is the pole target for IK constraint.
-
- .. attribute:: weight
-
- The weight this actuator will set on the constraint it controls.
-
- :type: float.
-
- .. note::
-
- Currently only the IK constraint has a weight. It must be a value between 0 and 1.
-
- .. note::
-
- A weight of 0 disables a constraint while still updating constraint runtime values (see :class:`BL_ArmatureConstraint`)
-
- .. attribute:: influence
-
- The influence this actuator will set on the constraint it controls.
-
- :type: float.
-
-.. class:: KX_ArmatureSensor(SCA_ISensor)
-
- Armature sensor detect conditions on armatures.
-
- .. attribute:: type
-
- The type of measurement that the sensor make when it is active.
-
- Can be one of :ref:`these constants <armaturesensor-type>`
-
- :type: integer.
-
- .. attribute:: constraint
-
- The constraint object this sensor is watching.
-
- :type: :class:`BL_ArmatureConstraint`
-
- .. attribute:: value
-
- The threshold used in the comparison with the constraint error
- The linear error is only updated on CopyPose/Distance IK constraint with iTaSC solver
- The rotation error is only updated on CopyPose+rotation IK constraint with iTaSC solver
- The linear error on CopyPose is always >= 0: it is the norm of the distance between the target and the bone
- The rotation error on CopyPose is always >= 0: it is the norm of the equivalent rotation vector between the bone and the target orientations
- The linear error on Distance can be positive if the distance between the bone and the target is greater than the desired distance, and negative if the distance is smaller.
-
- :type: float
-
-.. class:: BL_ArmatureConstraint(PyObjectPlus)
-
- Proxy to Armature Constraint. Allows to change constraint on the fly.
- Obtained through :class:`BL_ArmatureObject`.constraints.
-
- .. note::
-
- Not all armature constraints are supported in the GE.
-
-
- .. attribute:: type
-
- Type of constraint, (read-only).
-
- Use one of :ref:`these constants<armatureconstraint-constants-type>`.
-
- :type: integer, one of CONSTRAINT_TYPE_* constants
-
- .. attribute:: name
-
- Name of constraint constructed as <bone_name>:<constraint_name>. constraints list.
-
- :type: string
-
- This name is also the key subscript on :class:`BL_ArmatureObject`.
-
- .. attribute:: enforce
-
- fraction of constraint effect that is enforced. Between 0 and 1.
-
- :type: float
-
- .. attribute:: headtail
-
- Position of target between head and tail of the target bone: 0=head, 1=tail.
-
- :type: float.
-
- .. note::
-
- Only used if the target is a bone (i.e target object is an armature.
-
- .. attribute:: lin_error
-
- runtime linear error (in Blender units) on constraint at the current frame.
-
- This is a runtime value updated on each frame by the IK solver. Only available on IK constraint and iTaSC solver.
-
- :type: float
-
- .. attribute:: rot_error
-
- Runtime rotation error (in radiant) on constraint at the current frame.
-
- :type: float.
-
- This is a runtime value updated on each frame by the IK solver. Only available on IK constraint and iTaSC solver.
-
- It is only set if the constraint has a rotation part, for example, a CopyPose+Rotation IK constraint.
-
- .. attribute:: target
-
- Primary target object for the constraint. The position of this object in the GE will be used as target for the constraint.
-
- :type: :class:`KX_GameObject`.
-
- .. attribute:: subtarget
-
- Secondary target object for the constraint. The position of this object in the GE will be used as secondary target for the constraint.
-
- :type: :class:`KX_GameObject`.
-
- Currently this is only used for pole target on IK constraint.
-
- .. attribute:: active
-
- True if the constraint is active.
-
- :type: boolean
-
- .. note::
-
- An inactive constraint does not update lin_error and rot_error.
-
- .. attribute:: ik_weight
-
- Weight of the IK constraint between 0 and 1.
-
- Only defined for IK constraint.
-
- :type: float
-
- .. attribute:: ik_type
-
- Type of IK constraint, (read-only).
-
- Use one of :ref:`these constants<armatureconstraint-constants-ik-type>`.
-
- :type: integer.
-
- .. attribute:: ik_flag
-
- Combination of IK constraint option flags, read-only.
-
- Use one of :ref:`these constants<armatureconstraint-constants-ik-flag>`.
-
- :type: integer
-
- .. attribute:: ik_dist
-
- Distance the constraint is trying to maintain with target, only used when ik_type=CONSTRAINT_IK_DISTANCE.
-
- :type: float
-
- .. attribute:: ik_mode
-
- Use one of :ref:`these constants<armatureconstraint-constants-ik-mode>`.
-
- Additional mode for IK constraint. Currently only used for Distance constraint:
-
- :type: integer
-
-.. class:: BL_ArmatureChannel(PyObjectPlus)
-
- Proxy to armature pose channel. Allows to read and set armature pose.
- The attributes are identical to RNA attributes, but mostly in read-only mode.
-
- .. attribute:: name
-
- channel name (=bone name), read-only.
-
- :type: string
-
- .. attribute:: bone
-
- return the bone object corresponding to this pose channel, read-only.
-
- :type: :class:`BL_ArmatureBone`
-
- .. attribute:: parent
-
- return the parent channel object, None if root channel, read-only.
-
- :type: :class:`BL_ArmatureChannel`
-
- .. attribute:: has_ik
-
- true if the bone is part of an active IK chain, read-only.
- This flag is not set when an IK constraint is defined but not enabled (miss target information for example).
-
- :type: boolean
-
- .. attribute:: ik_dof_x
-
- true if the bone is free to rotation in the X axis, read-only.
-
- :type: boolean
-
- .. attribute:: ik_dof_y
-
- true if the bone is free to rotation in the Y axis, read-only.
-
- :type: boolean
-
- .. attribute:: ik_dof_z
-
- true if the bone is free to rotation in the Z axis, read-only.
-
- :type: boolean
-
- .. attribute:: ik_limit_x
-
- true if a limit is imposed on X rotation, read-only.
-
- :type: boolean
-
- .. attribute:: ik_limit_y
-
- true if a limit is imposed on Y rotation, read-only.
-
- :type: boolean
-
- .. attribute:: ik_limit_z
-
- true if a limit is imposed on Z rotation, read-only.
-
- :type: boolean
-
- .. attribute:: ik_rot_control
-
- true if channel rotation should applied as IK constraint, read-only.
-
- :type: boolean
-
- .. attribute:: ik_lin_control
-
- true if channel size should applied as IK constraint, read-only.
-
- :type: boolean
-
- .. attribute:: location
-
- displacement of the bone head in armature local space, read-write.
-
- :type: vector [X, Y, Z].
-
- .. note::
-
- You can only move a bone if it is unconnected to its parent. An action playing on the armature may change the value. An IK chain does not update this value, see joint_rotation.
-
- .. note::
-
- Changing this field has no immediate effect, the pose is updated when the armature is updated during the graphic render (see :data:`BL_ArmatureObject.update`).
-
- .. attribute:: scale
-
- scale of the bone relative to its parent, read-write.
-
- :type: vector [sizeX, sizeY, sizeZ].
-
- .. note::
-
- An action playing on the armature may change the value. An IK chain does not update this value, see joint_rotation.
-
- .. note::
-
- Changing this field has no immediate effect, the pose is updated when the armature is updated during the graphic render (see :data:`BL_ArmatureObject.update`)
-
- .. attribute:: rotation_quaternion
-
- rotation of the bone relative to its parent expressed as a quaternion, read-write.
-
- :type: vector [qr, qi, qj, qk].
-
- .. note::
-
- This field is only used if rotation_mode is 0. An action playing on the armature may change the value. An IK chain does not update this value, see joint_rotation.
-
- .. note::
-
- Changing this field has no immediate effect, the pose is updated when the armature is updated during the graphic render (see :data:`BL_ArmatureObject.update`)
-
- .. attribute:: rotation_euler
-
- rotation of the bone relative to its parent expressed as a set of euler angles, read-write.
-
- :type: vector [X, Y, Z].
-
- .. note::
-
- This field is only used if rotation_mode is > 0. You must always pass the angles in [X, Y, Z] order; the order of applying the angles to the bone depends on rotation_mode. An action playing on the armature may change this field. An IK chain does not update this value, see joint_rotation.
-
- .. note::
-
- Changing this field has no immediate effect, the pose is updated when the armature is updated during the graphic render (see :data:`BL_ArmatureObject.update`)
-
- .. attribute:: rotation_mode
-
- Method of updating the bone rotation, read-write.
-
- :type: integer (one of :ref:`these constants <armaturechannel-constants-rotation-mode>`)
-
- .. attribute:: channel_matrix
-
- pose matrix in bone space (deformation of the bone due to action, constraint, etc), Read-only.
- This field is updated after the graphic render, it represents the current pose.
-
- :type: matrix [4][4]
-
- .. attribute:: pose_matrix
-
- pose matrix in armature space, read-only,
- This field is updated after the graphic render, it represents the current pose.
-
- :type: matrix [4][4]
-
- .. attribute:: pose_head
-
- position of bone head in armature space, read-only.
-
- :type: vector [x, y, z]
-
- .. attribute:: pose_tail
-
- position of bone tail in armature space, read-only.
-
- :type: vector [x, y, z]
-
- .. attribute:: ik_min_x
-
- minimum value of X rotation in degree (<= 0) when X rotation is limited (see ik_limit_x), read-only.
-
- :type: float
-
- .. attribute:: ik_max_x
-
- maximum value of X rotation in degree (>= 0) when X rotation is limited (see ik_limit_x), read-only.
-
- :type: float
-
- .. attribute:: ik_min_y
-
- minimum value of Y rotation in degree (<= 0) when Y rotation is limited (see ik_limit_y), read-only.
-
- :type: float
-
- .. attribute:: ik_max_y
-
- maximum value of Y rotation in degree (>= 0) when Y rotation is limited (see ik_limit_y), read-only.
-
- :type: float
-
- .. attribute:: ik_min_z
-
- minimum value of Z rotation in degree (<= 0) when Z rotation is limited (see ik_limit_z), read-only.
-
- :type: float
-
- .. attribute:: ik_max_z
-
- maximum value of Z rotation in degree (>= 0) when Z rotation is limited (see ik_limit_z), read-only.
-
- :type: float
-
- .. attribute:: ik_stiffness_x
-
- bone rotation stiffness in X axis, read-only.
-
- :type: float between 0 and 1
-
- .. attribute:: ik_stiffness_y
-
- bone rotation stiffness in Y axis, read-only.
-
- :type: float between 0 and 1
-
- .. attribute:: ik_stiffness_z
-
- bone rotation stiffness in Z axis, read-only.
-
- :type: float between 0 and 1
-
- .. attribute:: ik_stretch
-
- ratio of scale change that is allowed, 0=bone can't change size, read-only.
-
- :type: float
-
- .. attribute:: ik_rot_weight
-
- weight of rotation constraint when ik_rot_control is set, read-write.
-
- :type: float between 0 and 1
-
- .. attribute:: ik_lin_weight
-
- weight of size constraint when ik_lin_control is set, read-write.
-
- :type: float between 0 and 1
-
- .. attribute:: joint_rotation
-
- Control bone rotation in term of joint angle (for robotic applications), read-write.
-
- When writing to this attribute, you pass a [x, y, z] vector and an appropriate set of euler angles or quaternion is calculated according to the rotation_mode.
-
- When you read this attribute, the current pose matrix is converted into a [x, y, z] vector representing the joint angles.
-
- The value and the meaning of the x, y, z depends on the ik_dof_x/ik_dof_y/ik_dof_z attributes:
-
- * 1DoF joint X, Y or Z: the corresponding x, y, or z value is used an a joint angle in radiant
- * 2DoF joint X+Y or Z+Y: treated as 2 successive 1DoF joints: first X or Z, then Y. The x or z value is used as a joint angle in radiant along the X or Z axis, followed by a rotation along the new Y axis of y radiants.
- * 2DoF joint X+Z: treated as a 2DoF joint with rotation axis on the X/Z plane. The x and z values are used as the coordinates of the rotation vector in the X/Z plane.
- * 3DoF joint X+Y+Z: treated as a revolute joint. The [x, y, z] vector represents the equivalent rotation vector to bring the joint from the rest pose to the new pose.
-
- :type: vector [x, y, z]
-
- .. note::
-
- The bone must be part of an IK chain if you want to set the ik_dof_x/ik_dof_y/ik_dof_z attributes via the UI, but this will interfere with this attribute since the IK solver will overwrite the pose. You can stay in control of the armature if you create an IK constraint but do not finalize it (e.g. don't set a target) the IK solver will not run but the IK panel will show up on the UI for each bone in the chain.
-
- .. note::
-
- [0, 0, 0] always corresponds to the rest pose.
-
- .. note::
-
- You must request the armature pose to update and wait for the next graphic frame to see the effect of setting this attribute (see :data:`BL_ArmatureObject.update`).
-
- .. note::
-
- You can read the result of the calculation in rotation or euler_rotation attributes after setting this attribute.
-
-.. class:: BL_ArmatureBone(PyObjectPlus)
-
- Proxy to Blender bone structure. All fields are read-only and comply to RNA names.
- All space attribute correspond to the rest pose.
-
- .. attribute:: name
-
- bone name.
-
- :type: string
-
- .. attribute:: connected
-
- true when the bone head is struck to the parent's tail.
-
- :type: boolean
-
- .. attribute:: hinge
-
- true when bone doesn't inherit rotation or scale from parent bone.
-
- :type: boolean
-
- .. attribute:: inherit_scale
-
- true when bone inherits scaling from parent bone.
-
- :type: boolean
-
- .. attribute:: bbone_segments
-
- number of B-bone segments.
-
- :type: integer
-
- .. attribute:: roll
-
- bone rotation around head-tail axis.
-
- :type: float
-
- .. attribute:: head
-
- location of head end of the bone in parent bone space.
-
- :type: vector [x, y, z]
-
- .. attribute:: tail
-
- location of head end of the bone in parent bone space.
-
- :type: vector [x, y, z]
-
- .. attribute:: length
-
- bone length.
-
- :type: float
-
- .. attribute:: arm_head
-
- location of head end of the bone in armature space.
-
- :type: vector [x, y, z]
-
- .. attribute:: arm_tail
-
- location of tail end of the bone in armature space.
-
- :type: vector [x, y, z]
-
- .. attribute:: arm_mat
-
- matrix of the bone head in armature space.
-
- :type: matrix [4][4]
-
- .. note::
-
- This matrix has no scale part.
-
- .. attribute:: bone_mat
-
- rotation matrix of the bone in parent bone space.
-
- :type: matrix [3][3]
-
- .. attribute:: parent
-
- parent bone, or None for root bone.
-
- :type: :class:`BL_ArmatureBone`
-
- .. attribute:: children
-
- list of bone's children.
-
- :type: list of :class:`BL_ArmatureBone`
diff --git a/doc/python_api/rst/bge_types/bge.types.BL_ActionActuator.rst b/doc/python_api/rst/bge_types/bge.types.BL_ActionActuator.rst
new file mode 100644
index 00000000000..9b95a5ba611
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.BL_ActionActuator.rst
@@ -0,0 +1,78 @@
+BL_ActionActuator(SCA_IActuator)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: BL_ActionActuator(SCA_IActuator)
+
+ Action Actuators apply an action to an actor.
+
+ .. attribute:: action
+
+ The name of the action to set as the current action.
+
+ :type: string
+
+ .. attribute:: frameStart
+
+ Specifies the starting frame of the animation.
+
+ :type: float
+
+ .. attribute:: frameEnd
+
+ Specifies the ending frame of the animation.
+
+ :type: float
+
+ .. attribute:: blendIn
+
+ Specifies the number of frames of animation to generate when making transitions between actions.
+
+ :type: float
+
+ .. attribute:: priority
+
+ Sets the priority of this actuator. Actuators will lower priority numbers will override actuators with higher numbers.
+
+ :type: integer
+
+ .. attribute:: frame
+
+ Sets the current frame for the animation.
+
+ :type: float
+
+ .. attribute:: propName
+
+ Sets the property to be used in FromProp playback mode.
+
+ :type: string
+
+ .. attribute:: blendTime
+
+ Sets the internal frame timer. This property must be in the range from 0.0 to blendIn.
+
+ :type: float
+
+ .. attribute:: mode
+
+ The operation mode of the actuator. Can be one of :ref:`these constants<action-actuator>`.
+
+ :type: integer
+
+ .. attribute:: useContinue
+
+ The actions continue option, True or False. When True, the action will always play from where last left off,
+ otherwise negative events to this actuator will reset it to its start frame.
+
+ :type: boolean
+
+ .. attribute:: framePropName
+
+ The name of the property that is set to the current frame number.
+
+ :type: string
+
diff --git a/doc/python_api/rst/bge_types/bge.types.BL_ArmatureActuator.rst b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureActuator.rst
new file mode 100644
index 00000000000..579186ac1d6
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureActuator.rst
@@ -0,0 +1,61 @@
+BL_ArmatureActuator(SCA_IActuator)
+==================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: BL_ArmatureActuator(SCA_IActuator)
+
+ Armature Actuators change constraint condition on armatures.
+
+ .. attribute:: type
+
+ The type of action that the actuator executes when it is active.
+
+ Can be one of :ref:`these constants <armatureactuator-constants-type>`
+
+ :type: integer
+
+ .. attribute:: constraint
+
+ The constraint object this actuator is controlling.
+
+ :type: :class:`BL_ArmatureConstraint`
+
+ .. attribute:: target
+
+ The object that this actuator will set as primary target to the constraint it controls.
+
+ :type: :class:`KX_GameObject`
+
+ .. attribute:: subtarget
+
+ The object that this actuator will set as secondary target to the constraint it controls.
+
+ :type: :class:`KX_GameObject`.
+
+ .. note::
+
+ Currently, the only secondary target is the pole target for IK constraint.
+
+ .. attribute:: weight
+
+ The weight this actuator will set on the constraint it controls.
+
+ :type: float.
+
+ .. note::
+
+ Currently only the IK constraint has a weight. It must be a value between 0 and 1.
+
+ .. note::
+
+ A weight of 0 disables a constraint while still updating constraint runtime values (see :class:`BL_ArmatureConstraint`)
+
+ .. attribute:: influence
+
+ The influence this actuator will set on the constraint it controls.
+
+ :type: float.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.BL_ArmatureBone.rst b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureBone.rst
new file mode 100644
index 00000000000..14a9ebe9ef3
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureBone.rst
@@ -0,0 +1,105 @@
+BL_ArmatureBone(PyObjectPlus)
+=============================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: BL_ArmatureBone(PyObjectPlus)
+
+ Proxy to Blender bone structure. All fields are read-only and comply to RNA names.
+ All space attribute correspond to the rest pose.
+
+ .. attribute:: name
+
+ bone name.
+
+ :type: string
+
+ .. attribute:: connected
+
+ true when the bone head is struck to the parent's tail.
+
+ :type: boolean
+
+ .. attribute:: hinge
+
+ true when bone doesn't inherit rotation or scale from parent bone.
+
+ :type: boolean
+
+ .. attribute:: inherit_scale
+
+ true when bone inherits scaling from parent bone.
+
+ :type: boolean
+
+ .. attribute:: bbone_segments
+
+ number of B-bone segments.
+
+ :type: integer
+
+ .. attribute:: roll
+
+ bone rotation around head-tail axis.
+
+ :type: float
+
+ .. attribute:: head
+
+ location of head end of the bone in parent bone space.
+
+ :type: vector [x, y, z]
+
+ .. attribute:: tail
+
+ location of head end of the bone in parent bone space.
+
+ :type: vector [x, y, z]
+
+ .. attribute:: length
+
+ bone length.
+
+ :type: float
+
+ .. attribute:: arm_head
+
+ location of head end of the bone in armature space.
+
+ :type: vector [x, y, z]
+
+ .. attribute:: arm_tail
+
+ location of tail end of the bone in armature space.
+
+ :type: vector [x, y, z]
+
+ .. attribute:: arm_mat
+
+ matrix of the bone head in armature space.
+
+ :type: matrix [4][4]
+
+ .. note::
+
+ This matrix has no scale part.
+
+ .. attribute:: bone_mat
+
+ rotation matrix of the bone in parent bone space.
+
+ :type: matrix [3][3]
+
+ .. attribute:: parent
+
+ parent bone, or None for root bone.
+
+ :type: :class:`BL_ArmatureBone`
+
+ .. attribute:: children
+
+ list of bone's children.
+
+ :type: list of :class:`BL_ArmatureBone`
diff --git a/doc/python_api/rst/bge_types/bge.types.BL_ArmatureChannel.rst b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureChannel.rst
new file mode 100644
index 00000000000..07220534b28
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureChannel.rst
@@ -0,0 +1,278 @@
+BL_ArmatureChannel(PyObjectPlus)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: BL_ArmatureChannel(PyObjectPlus)
+
+ Proxy to armature pose channel. Allows to read and set armature pose.
+ The attributes are identical to RNA attributes, but mostly in read-only mode.
+
+ .. attribute:: name
+
+ channel name (=bone name), read-only.
+
+ :type: string
+
+ .. attribute:: bone
+
+ return the bone object corresponding to this pose channel, read-only.
+
+ :type: :class:`BL_ArmatureBone`
+
+ .. attribute:: parent
+
+ return the parent channel object, None if root channel, read-only.
+
+ :type: :class:`BL_ArmatureChannel`
+
+ .. attribute:: has_ik
+
+ true if the bone is part of an active IK chain, read-only.
+ This flag is not set when an IK constraint is defined but not enabled (miss target information for example).
+
+ :type: boolean
+
+ .. attribute:: ik_dof_x
+
+ true if the bone is free to rotation in the X axis, read-only.
+
+ :type: boolean
+
+ .. attribute:: ik_dof_y
+
+ true if the bone is free to rotation in the Y axis, read-only.
+
+ :type: boolean
+
+ .. attribute:: ik_dof_z
+
+ true if the bone is free to rotation in the Z axis, read-only.
+
+ :type: boolean
+
+ .. attribute:: ik_limit_x
+
+ true if a limit is imposed on X rotation, read-only.
+
+ :type: boolean
+
+ .. attribute:: ik_limit_y
+
+ true if a limit is imposed on Y rotation, read-only.
+
+ :type: boolean
+
+ .. attribute:: ik_limit_z
+
+ true if a limit is imposed on Z rotation, read-only.
+
+ :type: boolean
+
+ .. attribute:: ik_rot_control
+
+ true if channel rotation should applied as IK constraint, read-only.
+
+ :type: boolean
+
+ .. attribute:: ik_lin_control
+
+ true if channel size should applied as IK constraint, read-only.
+
+ :type: boolean
+
+ .. attribute:: location
+
+ displacement of the bone head in armature local space, read-write.
+
+ :type: vector [X, Y, Z].
+
+ .. note::
+
+ You can only move a bone if it is unconnected to its parent. An action playing on the armature may change the value. An IK chain does not update this value, see joint_rotation.
+
+ .. note::
+
+ Changing this field has no immediate effect, the pose is updated when the armature is updated during the graphic render (see :data:`BL_ArmatureObject.update`).
+
+ .. attribute:: scale
+
+ scale of the bone relative to its parent, read-write.
+
+ :type: vector [sizeX, sizeY, sizeZ].
+
+ .. note::
+
+ An action playing on the armature may change the value. An IK chain does not update this value, see joint_rotation.
+
+ .. note::
+
+ Changing this field has no immediate effect, the pose is updated when the armature is updated during the graphic render (see :data:`BL_ArmatureObject.update`)
+
+ .. attribute:: rotation_quaternion
+
+ rotation of the bone relative to its parent expressed as a quaternion, read-write.
+
+ :type: vector [qr, qi, qj, qk].
+
+ .. note::
+
+ This field is only used if rotation_mode is 0. An action playing on the armature may change the value. An IK chain does not update this value, see joint_rotation.
+
+ .. note::
+
+ Changing this field has no immediate effect, the pose is updated when the armature is updated during the graphic render (see :data:`BL_ArmatureObject.update`)
+
+ .. attribute:: rotation_euler
+
+ rotation of the bone relative to its parent expressed as a set of euler angles, read-write.
+
+ :type: vector [X, Y, Z].
+
+ .. note::
+
+ This field is only used if rotation_mode is > 0. You must always pass the angles in [X, Y, Z] order; the order of applying the angles to the bone depends on rotation_mode. An action playing on the armature may change this field. An IK chain does not update this value, see joint_rotation.
+
+ .. note::
+
+ Changing this field has no immediate effect, the pose is updated when the armature is updated during the graphic render (see :data:`BL_ArmatureObject.update`)
+
+ .. attribute:: rotation_mode
+
+ Method of updating the bone rotation, read-write.
+
+ :type: integer (one of :ref:`these constants <armaturechannel-constants-rotation-mode>`)
+
+ .. attribute:: channel_matrix
+
+ pose matrix in bone space (deformation of the bone due to action, constraint, etc), Read-only.
+ This field is updated after the graphic render, it represents the current pose.
+
+ :type: matrix [4][4]
+
+ .. attribute:: pose_matrix
+
+ pose matrix in armature space, read-only,
+ This field is updated after the graphic render, it represents the current pose.
+
+ :type: matrix [4][4]
+
+ .. attribute:: pose_head
+
+ position of bone head in armature space, read-only.
+
+ :type: vector [x, y, z]
+
+ .. attribute:: pose_tail
+
+ position of bone tail in armature space, read-only.
+
+ :type: vector [x, y, z]
+
+ .. attribute:: ik_min_x
+
+ minimum value of X rotation in degree (<= 0) when X rotation is limited (see ik_limit_x), read-only.
+
+ :type: float
+
+ .. attribute:: ik_max_x
+
+ maximum value of X rotation in degree (>= 0) when X rotation is limited (see ik_limit_x), read-only.
+
+ :type: float
+
+ .. attribute:: ik_min_y
+
+ minimum value of Y rotation in degree (<= 0) when Y rotation is limited (see ik_limit_y), read-only.
+
+ :type: float
+
+ .. attribute:: ik_max_y
+
+ maximum value of Y rotation in degree (>= 0) when Y rotation is limited (see ik_limit_y), read-only.
+
+ :type: float
+
+ .. attribute:: ik_min_z
+
+ minimum value of Z rotation in degree (<= 0) when Z rotation is limited (see ik_limit_z), read-only.
+
+ :type: float
+
+ .. attribute:: ik_max_z
+
+ maximum value of Z rotation in degree (>= 0) when Z rotation is limited (see ik_limit_z), read-only.
+
+ :type: float
+
+ .. attribute:: ik_stiffness_x
+
+ bone rotation stiffness in X axis, read-only.
+
+ :type: float between 0 and 1
+
+ .. attribute:: ik_stiffness_y
+
+ bone rotation stiffness in Y axis, read-only.
+
+ :type: float between 0 and 1
+
+ .. attribute:: ik_stiffness_z
+
+ bone rotation stiffness in Z axis, read-only.
+
+ :type: float between 0 and 1
+
+ .. attribute:: ik_stretch
+
+ ratio of scale change that is allowed, 0=bone can't change size, read-only.
+
+ :type: float
+
+ .. attribute:: ik_rot_weight
+
+ weight of rotation constraint when ik_rot_control is set, read-write.
+
+ :type: float between 0 and 1
+
+ .. attribute:: ik_lin_weight
+
+ weight of size constraint when ik_lin_control is set, read-write.
+
+ :type: float between 0 and 1
+
+ .. attribute:: joint_rotation
+
+ Control bone rotation in term of joint angle (for robotic applications), read-write.
+
+ When writing to this attribute, you pass a [x, y, z] vector and an appropriate set of euler angles or quaternion is calculated according to the rotation_mode.
+
+ When you read this attribute, the current pose matrix is converted into a [x, y, z] vector representing the joint angles.
+
+ The value and the meaning of the x, y, z depends on the ik_dof_x/ik_dof_y/ik_dof_z attributes:
+
+ * 1DoF joint X, Y or Z: the corresponding x, y, or z value is used an a joint angle in radiant
+ * 2DoF joint X+Y or Z+Y: treated as 2 successive 1DoF joints: first X or Z, then Y. The x or z value is used as a joint angle in radiant along the X or Z axis, followed by a rotation along the new Y axis of y radiants.
+ * 2DoF joint X+Z: treated as a 2DoF joint with rotation axis on the X/Z plane. The x and z values are used as the coordinates of the rotation vector in the X/Z plane.
+ * 3DoF joint X+Y+Z: treated as a revolute joint. The [x, y, z] vector represents the equivalent rotation vector to bring the joint from the rest pose to the new pose.
+
+ :type: vector [x, y, z]
+
+ .. note::
+
+ The bone must be part of an IK chain if you want to set the ik_dof_x/ik_dof_y/ik_dof_z attributes via the UI, but this will interfere with this attribute since the IK solver will overwrite the pose. You can stay in control of the armature if you create an IK constraint but do not finalize it (e.g. don't set a target) the IK solver will not run but the IK panel will show up on the UI for each bone in the chain.
+
+ .. note::
+
+ [0, 0, 0] always corresponds to the rest pose.
+
+ .. note::
+
+ You must request the armature pose to update and wait for the next graphic frame to see the effect of setting this attribute (see :data:`BL_ArmatureObject.update`).
+
+ .. note::
+
+ You can read the result of the calculation in rotation or euler_rotation attributes after setting this attribute.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.BL_ArmatureConstraint.rst b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureConstraint.rst
new file mode 100644
index 00000000000..1a4370945c1
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureConstraint.rst
@@ -0,0 +1,129 @@
+BL_ArmatureConstraint(PyObjectPlus)
+===================================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: BL_ArmatureConstraint(PyObjectPlus)
+
+ Proxy to Armature Constraint. Allows to change constraint on the fly.
+ Obtained through :class:`BL_ArmatureObject`.constraints.
+
+ .. note::
+
+ Not all armature constraints are supported in the GE.
+
+
+ .. attribute:: type
+
+ Type of constraint, (read-only).
+
+ Use one of :ref:`these constants<armatureconstraint-constants-type>`.
+
+ :type: integer, one of CONSTRAINT_TYPE_* constants
+
+ .. attribute:: name
+
+ Name of constraint constructed as <bone_name>:<constraint_name>. constraints list.
+
+ :type: string
+
+ This name is also the key subscript on :class:`BL_ArmatureObject`.
+
+ .. attribute:: enforce
+
+ fraction of constraint effect that is enforced. Between 0 and 1.
+
+ :type: float
+
+ .. attribute:: headtail
+
+ Position of target between head and tail of the target bone: 0=head, 1=tail.
+
+ :type: float.
+
+ .. note::
+
+ Only used if the target is a bone (i.e target object is an armature.
+
+ .. attribute:: lin_error
+
+ runtime linear error (in Blender units) on constraint at the current frame.
+
+ This is a runtime value updated on each frame by the IK solver. Only available on IK constraint and iTaSC solver.
+
+ :type: float
+
+ .. attribute:: rot_error
+
+ Runtime rotation error (in radiant) on constraint at the current frame.
+
+ :type: float.
+
+ This is a runtime value updated on each frame by the IK solver. Only available on IK constraint and iTaSC solver.
+
+ It is only set if the constraint has a rotation part, for example, a CopyPose+Rotation IK constraint.
+
+ .. attribute:: target
+
+ Primary target object for the constraint. The position of this object in the GE will be used as target for the constraint.
+
+ :type: :class:`KX_GameObject`.
+
+ .. attribute:: subtarget
+
+ Secondary target object for the constraint. The position of this object in the GE will be used as secondary target for the constraint.
+
+ :type: :class:`KX_GameObject`.
+
+ Currently this is only used for pole target on IK constraint.
+
+ .. attribute:: active
+
+ True if the constraint is active.
+
+ :type: boolean
+
+ .. note::
+
+ An inactive constraint does not update lin_error and rot_error.
+
+ .. attribute:: ik_weight
+
+ Weight of the IK constraint between 0 and 1.
+
+ Only defined for IK constraint.
+
+ :type: float
+
+ .. attribute:: ik_type
+
+ Type of IK constraint, (read-only).
+
+ Use one of :ref:`these constants<armatureconstraint-constants-ik-type>`.
+
+ :type: integer.
+
+ .. attribute:: ik_flag
+
+ Combination of IK constraint option flags, read-only.
+
+ Use one of :ref:`these constants<armatureconstraint-constants-ik-flag>`.
+
+ :type: integer
+
+ .. attribute:: ik_dist
+
+ Distance the constraint is trying to maintain with target, only used when ik_type=CONSTRAINT_IK_DISTANCE.
+
+ :type: float
+
+ .. attribute:: ik_mode
+
+ Use one of :ref:`these constants<armatureconstraint-constants-ik-mode>`.
+
+ Additional mode for IK constraint. Currently only used for Distance constraint:
+
+ :type: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.BL_ArmatureObject.rst b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureObject.rst
new file mode 100644
index 00000000000..8389affe8a9
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.BL_ArmatureObject.rst
@@ -0,0 +1,34 @@
+BL_ArmatureObject(KX_GameObject)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`KX_GameObject`
+
+.. class:: BL_ArmatureObject(KX_GameObject)
+
+ An armature object.
+
+ .. attribute:: constraints
+
+ The list of armature constraint defined on this armature.
+ Elements of the list can be accessed by index or string.
+ The key format for string access is '<bone_name>:<constraint_name>'.
+
+ :type: list of :class:`BL_ArmatureConstraint`
+
+ .. attribute:: channels
+
+ The list of armature channels.
+ Elements of the list can be accessed by index or name the bone.
+
+ :type: list of :class:`BL_ArmatureChannel`
+
+ .. method:: update()
+
+ Ensures that the armature will be updated on next graphic frame.
+
+ This action is unecessary if a KX_ArmatureActuator with mode run is active
+ or if an action is playing. Use this function in other cases. It must be called
+ on each frame to ensure that the armature is updated continously.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.BL_Shader.rst b/doc/python_api/rst/bge_types/bge.types.BL_Shader.rst
new file mode 100644
index 00000000000..f4f5c0d62ba
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.BL_Shader.rst
@@ -0,0 +1,220 @@
+BL_Shader(PyObjectPlus)
+=======================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: BL_Shader(PyObjectPlus)
+
+ BL_Shader GLSL shaders.
+
+ TODO - Description
+
+ .. method:: setUniformfv(name, fList)
+
+ Set a uniform with a list of float values
+
+ :arg name: the uniform name
+ :type name: string
+ :arg fList: a list (2, 3 or 4 elements) of float values
+ :type fList: list[float]
+
+ .. method:: delSource()
+
+ Clear the shader. Use this method before the source is changed with :data:`setSource`.
+
+ .. method:: getFragmentProg()
+
+ Returns the fragment program.
+
+ :return: The fragment program.
+ :rtype: string
+
+ .. method:: getVertexProg()
+
+ Get the vertex program.
+
+ :return: The vertex program.
+ :rtype: string
+
+ .. method:: isValid()
+
+ Check if the shader is valid.
+
+ :return: True if the shader is valid
+ :rtype: boolean
+
+ .. method:: setAttrib(enum)
+
+ Set attribute location. (The parameter is ignored a.t.m. and the value of "tangent" is always used.)
+
+ :arg enum: attribute location value
+ :type enum: integer
+
+ .. method:: setNumberOfPasses( max_pass )
+
+ Set the maximum number of passes. Not used a.t.m.
+
+ :arg max_pass: the maximum number of passes
+ :type max_pass: integer
+
+ .. method:: setSampler(name, index)
+
+ Set uniform texture sample index.
+
+ :arg name: Uniform name
+ :type name: string
+ :arg index: Texture sample index.
+ :type index: integer
+
+ .. method:: setSource(vertexProgram, fragmentProgram)
+
+ Set the vertex and fragment programs
+
+ :arg vertexProgram: Vertex program
+ :type vertexProgram: string
+ :arg fragmentProgram: Fragment program
+ :type fragmentProgram: string
+
+ .. method:: setUniform1f(name, fx)
+
+ Set a uniform with 1 float value.
+
+ :arg name: the uniform name
+ :type name: string
+ :arg fx: Uniform value
+ :type fx: float
+
+ .. method:: setUniform1i(name, ix)
+
+ Set a uniform with an integer value.
+
+ :arg name: the uniform name
+ :type name: string
+ :arg ix: the uniform value
+ :type ix: integer
+
+ .. method:: setUniform2f(name, fx, fy)
+
+ Set a uniform with 2 float values
+
+ :arg name: the uniform name
+ :type name: string
+ :arg fx: first float value
+ :type fx: float
+
+ :arg fy: second float value
+ :type fy: float
+
+ .. method:: setUniform2i(name, ix, iy)
+
+ Set a uniform with 2 integer values
+
+ :arg name: the uniform name
+ :type name: string
+ :arg ix: first integer value
+ :type ix: integer
+ :arg iy: second integer value
+ :type iy: integer
+
+ .. method:: setUniform3f(name, fx, fy, fz)
+
+ Set a uniform with 3 float values.
+
+ :arg name: the uniform name
+ :type name: string
+ :arg fx: first float value
+ :type fx: float
+ :arg fy: second float value
+ :type fy: float
+ :arg fz: third float value
+ :type fz: float
+
+ .. method:: setUniform3i(name, ix, iy, iz)
+
+ Set a uniform with 3 integer values
+
+ :arg name: the uniform name
+ :type name: string
+ :arg ix: first integer value
+ :type ix: integer
+ :arg iy: second integer value
+ :type iy: integer
+ :arg iz: third integer value
+ :type iz: integer
+
+ .. method:: setUniform4f(name, fx, fy, fz, fw)
+
+ Set a uniform with 4 float values.
+
+ :arg name: the uniform name
+ :type name: string
+ :arg fx: first float value
+ :type fx: float
+ :arg fy: second float value
+ :type fy: float
+ :arg fz: third float value
+ :type fz: float
+ :arg fw: fourth float value
+ :type fw: float
+
+ .. method:: setUniform4i(name, ix, iy, iz, iw)
+
+ Set a uniform with 4 integer values
+
+ :arg name: the uniform name
+ :type name: string
+ :arg ix: first integer value
+ :type ix: integer
+ :arg iy: second integer value
+ :type iy: integer
+ :arg iz: third integer value
+ :type iz: integer
+ :arg iw: fourth integer value
+ :type iw: integer
+
+ .. method:: setUniformDef(name, type)
+
+ Define a new uniform
+
+ :arg name: the uniform name
+ :type name: string
+ :arg type: uniform type
+ :type type: UNI_NONE, UNI_INT, UNI_FLOAT, UNI_INT2, UNI_FLOAT2, UNI_INT3, UNI_FLOAT3, UNI_INT4, UNI_FLOAT4, UNI_MAT3, UNI_MAT4, UNI_MAX
+
+ .. method:: setUniformMatrix3(name, mat, transpose)
+
+ Set a uniform with a 3x3 matrix value
+
+ :arg name: the uniform name
+ :type name: string
+ :arg mat: A 3x3 matrix [[f, f, f], [f, f, f], [f, f, f]]
+ :type mat: 3x3 matrix
+ :arg transpose: set to True to transpose the matrix
+ :type transpose: boolean
+
+ .. method:: setUniformMatrix4(name, mat, transpose)
+
+ Set a uniform with a 4x4 matrix value
+
+ :arg name: the uniform name
+ :type name: string
+ :arg mat: A 4x4 matrix [[f, f, f, f], [f, f, f, f], [f, f, f, f], [f, f, f, f]]
+ :type mat: 4x4 matrix
+ :arg transpose: set to True to transpose the matrix
+ :type transpose: boolean
+
+ .. method:: setUniformiv(name, iList)
+
+ Set a uniform with a list of integer values
+
+ :arg name: the uniform name
+ :type name: string
+ :arg iList: a list (2, 3 or 4 elements) of integer values
+ :type iList: list[integer]
+
+ .. method:: validate()
+
+ Validate the shader object.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.BL_ShapeActionActuator.rst b/doc/python_api/rst/bge_types/bge.types.BL_ShapeActionActuator.rst
new file mode 100644
index 00000000000..d08a761ed95
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.BL_ShapeActionActuator.rst
@@ -0,0 +1,72 @@
+BL_ShapeActionActuator(SCA_IActuator)
+=====================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: BL_ShapeActionActuator(SCA_IActuator)
+
+ ShapeAction Actuators apply an shape action to an mesh object.
+
+ .. attribute:: action
+
+ The name of the action to set as the current shape action.
+
+ :type: string
+
+ .. attribute:: frameStart
+
+ Specifies the starting frame of the shape animation.
+
+ :type: float
+
+ .. attribute:: frameEnd
+
+ Specifies the ending frame of the shape animation.
+
+ :type: float
+
+ .. attribute:: blendIn
+
+ Specifies the number of frames of animation to generate when making transitions between actions.
+
+ :type: float
+
+ .. attribute:: priority
+
+ Sets the priority of this actuator. Actuators will lower priority numbers will override actuators with higher numbers.
+
+ :type: integer
+
+ .. attribute:: frame
+
+ Sets the current frame for the animation.
+
+ :type: float
+
+ .. attribute:: propName
+
+ Sets the property to be used in FromProp playback mode.
+
+ :type: string
+
+ .. attribute:: blendTime
+
+ Sets the internal frame timer. This property must be in the range from 0.0 to blendin.
+
+ :type: float
+
+ .. attribute:: mode
+
+ The operation mode of the actuator. Can be one of :ref:`these constants<shape-action-actuator>`.
+
+ :type: integer
+
+ .. attribute:: framePropName
+
+ The name of the property that is set to the current frame number.
+
+ :type: string
+
+
diff --git a/doc/python_api/rst/bge_types/bge.types.CListValue.rst b/doc/python_api/rst/bge_types/bge.types.CListValue.rst
new file mode 100644
index 00000000000..ca4cdc44bf5
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.CListValue.rst
@@ -0,0 +1,72 @@
+CListValue(CPropValue)
+======================
+
+.. module:: bge.types
+
+base class --- :class:`CPropValue`
+
+.. class:: CListValue(CPropValue)
+
+ This is a list like object used in the game engine internally that behaves similar to a python list in most ways.
+
+ As well as the normal index lookup (``val= clist[i]``), CListValue supports string lookups (``val= scene.objects["Cube"]``)
+
+ Other operations such as ``len(clist)``, ``list(clist)``, ``clist[0:10]`` are also supported.
+
+ .. method:: append(val)
+
+ Add an item to the list (like pythons append)
+
+ .. warning::
+
+ Appending values to the list can cause crashes when the list is used internally by the game engine.
+
+ .. method:: count(val)
+
+ Count the number of instances of a value in the list.
+
+ :return: number of instances
+ :rtype: integer
+
+ .. method:: index(val)
+
+ Return the index of a value in the list.
+
+ :return: The index of the value in the list.
+ :rtype: integer
+
+ .. method:: reverse()
+
+ Reverse the order of the list.
+
+ .. method:: get(key, default=None)
+
+ Return the value matching key, or the default value if its not found.
+
+ :return: The key value or a default.
+
+ .. method:: from_id(id)
+
+ This is a funtion especially for the game engine to return a value with a spesific id.
+
+ Since object names are not always unique, the id of an object can be used to get an object from the CValueList.
+
+ Example:
+
+ .. code-block:: python
+
+ myObID=id(gameObject)
+ ob= scene.objects.from_id(myObID)
+
+ Where ``myObID`` is an int or long from the id function.
+
+ This has the advantage that you can store the id in places you could not store a gameObject.
+
+ .. warning::
+
+ The id is derived from a memory location and will be different each time the game engine starts.
+
+ .. warning::
+
+ The id can't be stored as an integer in game object properties, as those only have a limited range that the id may not be contained in. Instead an id can be stored as a string game property and converted back to an integer for use in from_id lookups.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.CPropValue.rst b/doc/python_api/rst/bge_types/bge.types.CPropValue.rst
new file mode 100644
index 00000000000..7be28c1e006
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.CPropValue.rst
@@ -0,0 +1,11 @@
+CPropValue(CValue)
+==================
+
+.. module:: bge.types
+
+base class --- :class:`CValue`
+
+.. class:: CPropValue(CValue)
+
+ This class has no python functions
+
diff --git a/doc/python_api/rst/bge_types/bge.types.CValue.rst b/doc/python_api/rst/bge_types/bge.types.CValue.rst
new file mode 100644
index 00000000000..52906de5576
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.CValue.rst
@@ -0,0 +1,17 @@
+CValue(PyObjectPlus)
+====================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: CValue(PyObjectPlus)
+
+ This class is a basis for other classes.
+
+ .. attribute:: name
+
+ The name of this CValue derived object (read-only).
+
+ :type: string
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ArmatureSensor.rst b/doc/python_api/rst/bge_types/bge.types.KX_ArmatureSensor.rst
new file mode 100644
index 00000000000..a7123eb5c9d
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_ArmatureSensor.rst
@@ -0,0 +1,36 @@
+KX_ArmatureSensor(SCA_ISensor)
+==============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: KX_ArmatureSensor(SCA_ISensor)
+
+ Armature sensor detect conditions on armatures.
+
+ .. attribute:: type
+
+ The type of measurement that the sensor make when it is active.
+
+ Can be one of :ref:`these constants <armaturesensor-type>`
+
+ :type: integer.
+
+ .. attribute:: constraint
+
+ The constraint object this sensor is watching.
+
+ :type: :class:`BL_ArmatureConstraint`
+
+ .. attribute:: value
+
+ The threshold used in the comparison with the constraint error
+ The linear error is only updated on CopyPose/Distance IK constraint with iTaSC solver
+ The rotation error is only updated on CopyPose+rotation IK constraint with iTaSC solver
+ The linear error on CopyPose is always >= 0: it is the norm of the distance between the target and the bone
+ The rotation error on CopyPose is always >= 0: it is the norm of the equivalent rotation vector between the bone and the target orientations
+ The linear error on Distance can be positive if the distance between the bone and the target is greater than the desired distance, and negative if the distance is smaller.
+
+ :type: float
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst b/doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst
new file mode 100644
index 00000000000..0dfc7a10d13
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_BlenderMaterial.rst
@@ -0,0 +1,77 @@
+KX_BlenderMaterial(PyObjectPlus)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: KX_BlenderMaterial(PyObjectPlus)
+
+ KX_BlenderMaterial
+
+ .. attribute:: shader
+
+ The materials shader.
+
+ :type: :class:`BL_Shader`
+
+ .. attribute:: blending
+
+ Ints used for pixel blending, (src, dst), matching the setBlending method.
+
+ :type: (integer, integer)
+
+ .. attribute:: material_index
+
+ The material's index.
+
+ :type: integer
+
+ .. method:: getShader()
+
+ Returns the material's shader.
+
+ :return: the material's shader
+ :rtype: :class:`BL_Shader`
+
+ .. method:: setBlending(src, dest)
+
+ Set the pixel color arithmetic functions.
+
+ :arg src: Specifies how the red, green, blue, and alpha source blending factors are computed.
+ :type src: Value in...
+
+ * GL_ZERO,
+ * GL_ONE,
+ * GL_SRC_COLOR,
+ * GL_ONE_MINUS_SRC_COLOR,
+ * GL_DST_COLOR,
+ * GL_ONE_MINUS_DST_COLOR,
+ * GL_SRC_ALPHA,
+ * GL_ONE_MINUS_SRC_ALPHA,
+ * GL_DST_ALPHA,
+ * GL_ONE_MINUS_DST_ALPHA,
+ * GL_SRC_ALPHA_SATURATE
+
+ :arg dest: Specifies how the red, green, blue, and alpha destination blending factors are computed.
+ :type dest: Value in...
+
+ * GL_ZERO
+ * GL_ONE
+ * GL_SRC_COLOR
+ * GL_ONE_MINUS_SRC_COLOR
+ * GL_DST_COLOR
+ * GL_ONE_MINUS_DST_COLOR
+ * GL_SRC_ALPHA
+ * GL_ONE_MINUS_SRC_ALPHA
+ * GL_DST_ALPHA
+ * GL_ONE_MINUS_DST_ALPHA
+ * GL_SRC_ALPHA_SATURATE
+
+ .. method:: getMaterialIndex()
+
+ Returns the material's index.
+
+ :return: the material's index
+ :rtype: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst b/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst
new file mode 100644
index 00000000000..baf60ec0c97
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst
@@ -0,0 +1,284 @@
+KX_Camera(KX_GameObject)
+========================
+
+.. module:: bge.types
+
+base class --- :class:`KX_GameObject`
+
+.. class:: KX_Camera(KX_GameObject)
+
+ A Camera object.
+
+ .. data:: INSIDE
+
+ See :data:`sphereInsideFrustum` and :data:`boxInsideFrustum`
+
+ .. data:: INTERSECT
+
+ See :data:`sphereInsideFrustum` and :data:`boxInsideFrustum`
+
+ .. data:: OUTSIDE
+
+ See :data:`sphereInsideFrustum` and :data:`boxInsideFrustum`
+
+ .. attribute:: lens
+
+ The camera's lens value.
+
+ :type: float
+
+ .. attribute:: ortho_scale
+
+ The camera's view scale when in orthographic mode.
+
+ :type: float
+
+ .. attribute:: near
+
+ The camera's near clip distance.
+
+ :type: float
+
+ .. attribute:: far
+
+ The camera's far clip distance.
+
+ :type: float
+
+ .. attribute:: perspective
+
+ True if this camera has a perspective transform, False for an orthographic projection.
+
+ :type: boolean
+
+ .. attribute:: frustum_culling
+
+ True if this camera is frustum culling.
+
+ :type: boolean
+
+ .. attribute:: projection_matrix
+
+ This camera's 4x4 projection matrix.
+
+ .. note::
+
+ This is the identity matrix prior to rendering the first frame (any Python done on frame 1).
+
+ :type: 4x4 Matrix [[float]]
+
+ .. attribute:: modelview_matrix
+
+ This camera's 4x4 model view matrix. (read-only).
+
+ :type: 4x4 Matrix [[float]]
+
+ .. note::
+
+ This matrix is regenerated every frame from the camera's position and orientation. Also, this is the identity matrix prior to rendering the first frame (any Python done on frame 1).
+
+ .. attribute:: camera_to_world
+
+ This camera's camera to world transform. (read-only).
+
+ :type: 4x4 Matrix [[float]]
+
+ .. note::
+
+ This matrix is regenerated every frame from the camera's position and orientation.
+
+ .. attribute:: world_to_camera
+
+ This camera's world to camera transform. (read-only).
+
+ :type: 4x4 Matrix [[float]]
+
+ .. note::
+
+ Regenerated every frame from the camera's position and orientation.
+
+ .. note::
+
+ This is camera_to_world inverted.
+
+ .. attribute:: useViewport
+
+ True when the camera is used as a viewport, set True to enable a viewport for this camera.
+
+ :type: boolean
+
+ .. method:: sphereInsideFrustum(centre, radius)
+
+ Tests the given sphere against the view frustum.
+
+ :arg centre: The centre of the sphere (in world coordinates.)
+ :type centre: list [x, y, z]
+ :arg radius: the radius of the sphere
+ :type radius: float
+ :return: :data:`~bge.types.KX_Camera.INSIDE`, :data:`~bge.types.KX_Camera.OUTSIDE` or :data:`~bge.types.KX_Camera.INTERSECT`
+ :rtype: integer
+
+ .. note::
+
+ When the camera is first initialized the result will be invalid because the projection matrix has not been set.
+
+ .. code-block:: python
+
+ from bge import logic
+ cont = logic.getCurrentController()
+ cam = cont.owner
+
+ # A sphere of radius 4.0 located at [x, y, z] = [1.0, 1.0, 1.0]
+ if (cam.sphereInsideFrustum([1.0, 1.0, 1.0], 4) != cam.OUTSIDE):
+ # Sphere is inside frustum !
+ # Do something useful !
+ else:
+ # Sphere is outside frustum
+
+ .. method:: boxInsideFrustum(box)
+
+ Tests the given box against the view frustum.
+
+ :arg box: Eight (8) corner points of the box (in world coordinates.)
+ :type box: list of lists
+ :return: :data:`~bge.types.KX_Camera.INSIDE`, :data:`~bge.types.KX_Camera.OUTSIDE` or :data:`~bge.types.KX_Camera.INTERSECT`
+
+ .. note::
+
+ When the camera is first initialized the result will be invalid because the projection matrix has not been set.
+
+ .. code-block:: python
+
+ from bge import logic
+ cont = logic.getCurrentController()
+ cam = cont.owner
+
+ # Box to test...
+ box = []
+ box.append([-1.0, -1.0, -1.0])
+ box.append([-1.0, -1.0, 1.0])
+ box.append([-1.0, 1.0, -1.0])
+ box.append([-1.0, 1.0, 1.0])
+ box.append([ 1.0, -1.0, -1.0])
+ box.append([ 1.0, -1.0, 1.0])
+ box.append([ 1.0, 1.0, -1.0])
+ box.append([ 1.0, 1.0, 1.0])
+
+ if (cam.boxInsideFrustum(box) != cam.OUTSIDE):
+ # Box is inside/intersects frustum !
+ # Do something useful !
+ else:
+ # Box is outside the frustum !
+
+ .. method:: pointInsideFrustum(point)
+
+ Tests the given point against the view frustum.
+
+ :arg point: The point to test (in world coordinates.)
+ :type point: 3D Vector
+ :return: True if the given point is inside this camera's viewing frustum.
+ :rtype: boolean
+
+ .. note::
+
+ When the camera is first initialized the result will be invalid because the projection matrix has not been set.
+
+ .. code-block:: python
+
+ from bge import logic
+ cont = logic.getCurrentController()
+ cam = cont.owner
+
+ # Test point [0.0, 0.0, 0.0]
+ if (cam.pointInsideFrustum([0.0, 0.0, 0.0])):
+ # Point is inside frustum !
+ # Do something useful !
+ else:
+ # Box is outside the frustum !
+
+ .. method:: getCameraToWorld()
+
+ Returns the camera-to-world transform.
+
+ :return: the camera-to-world transform matrix.
+ :rtype: matrix (4x4 list)
+
+ .. method:: getWorldToCamera()
+
+ Returns the world-to-camera transform.
+
+ This returns the inverse matrix of getCameraToWorld().
+
+ :return: the world-to-camera transform matrix.
+ :rtype: matrix (4x4 list)
+
+ .. method:: setOnTop()
+
+ Set this cameras viewport ontop of all other viewport.
+
+ .. method:: setViewport(left, bottom, right, top)
+
+ Sets the region of this viewport on the screen in pixels.
+
+ Use :data:`bge.render.getWindowHeight` and :data:`bge.render.getWindowWidth` to calculate values relative to the entire display.
+
+ :arg left: left pixel coordinate of this viewport
+ :type left: integer
+ :arg bottom: bottom pixel coordinate of this viewport
+ :type bottom: integer
+ :arg right: right pixel coordinate of this viewport
+ :type right: integer
+ :arg top: top pixel coordinate of this viewport
+ :type top: integer
+
+ .. method:: getScreenPosition(object)
+
+ Gets the position of an object projected on screen space.
+
+ .. code-block:: python
+
+ # For an object in the middle of the screen, coord = [0.5, 0.5]
+ coord = camera.getScreenPosition(object)
+
+ :arg object: object name or list [x, y, z]
+ :type object: :class:`KX_GameObject` or 3D Vector
+ :return: the object's position in screen coordinates.
+ :rtype: list [x, y]
+
+ .. method:: getScreenVect(x, y)
+
+ Gets the vector from the camera position in the screen coordinate direction.
+
+ :arg x: X Axis
+ :type x: float
+ :arg y: Y Axis
+ :type y: float
+ :rtype: 3D Vector
+ :return: The vector from screen coordinate.
+
+ .. code-block:: python
+
+ # Gets the vector of the camera front direction:
+ m_vect = camera.getScreenVect(0.5, 0.5)
+
+ .. method:: getScreenRay(x, y, dist=inf, property=None)
+
+ Look towards a screen coordinate (x, y) and find first object hit within dist that matches prop.
+ The ray is similar to KX_GameObject->rayCastTo.
+
+ :arg x: X Axis
+ :type x: float
+ :arg y: Y Axis
+ :type y: float
+ :arg dist: max distance to look (can be negative => look behind); 0 or omitted => detect up to other
+ :type dist: float
+ :arg property: property name that object must have; can be omitted => detect any object
+ :type property: string
+ :rtype: :class:`KX_GameObject`
+ :return: the first object hit or None if no object or object does not match prop
+
+ .. code-block:: python
+
+ # Gets an object with a property "wall" in front of the camera within a distance of 100:
+ target = camera.getScreenRay(0.5, 0.5, 100, "wall")
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_CameraActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_CameraActuator.rst
new file mode 100644
index 00000000000..bc5efed4b08
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_CameraActuator.rst
@@ -0,0 +1,47 @@
+KX_CameraActuator(SCA_IActuator)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_CameraActuator(SCA_IActuator)
+
+ Applies changes to a camera.
+
+ .. attribute:: damping
+
+ strength of of the camera following movement.
+
+ :type: float
+
+ .. attribute:: axis
+
+ The camera axis (0, 1, 2) for positive ``XYZ``, (3, 4, 5) for negative ``XYZ``.
+
+ :type: int
+
+ .. attribute:: min
+
+ minimum distance to the target object maintained by the actuator.
+
+ :type: float
+
+ .. attribute:: max
+
+ maximum distance to stay from the target object.
+
+ :type: float
+
+ .. attribute:: height
+
+ height to stay above the target object.
+
+ :type: float
+
+ .. attribute:: object
+
+ the object this actuator tracks.
+
+ :type: :class:`KX_GameObject` or None
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst
new file mode 100644
index 00000000000..32e5c3eaad8
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_CharacterWrapper.rst
@@ -0,0 +1,45 @@
+KX_CharacterWrapper(PyObjectPlus)
+=================================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: KX_CharacterWrapper(PyObjectPlus)
+
+ A wrapper to expose character physics options.
+
+ .. attribute:: onGround
+
+ Whether or not the character is on the ground. (read-only)
+
+ :type: boolean
+
+ .. attribute:: gravity
+
+ The gravity value used for the character.
+
+ :type: float
+
+ .. attribute:: maxJumps
+
+ The maximum number of jumps a character can perform before having to touch the ground. By default this is set to 1. 2 allows for a double jump, etc.
+
+ :type: int
+
+ .. attribute:: jumpCount
+
+ The current jump count. This can be used to have different logic for a single jump versus a double jump. For example, a different animation for the second jump.
+
+ :type: int
+
+ .. attribute:: walkDirection
+
+ The speed and direction the character is traveling in using world coordinates. This should be used instead of applyMovement() to properly move the character.
+
+ :type: list [x, y, z]
+
+ .. method:: jump()
+
+ The character jumps based on it's jump speed.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintActuator.rst
new file mode 100644
index 00000000000..498990449fe
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintActuator.rst
@@ -0,0 +1,78 @@
+KX_ConstraintActuator(SCA_IActuator)
+====================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_ConstraintActuator(SCA_IActuator)
+
+ A constraint actuator limits the position, rotation, distance or orientation of an object.
+
+ .. attribute:: damp
+
+ Time constant of the constraint expressed in frame (not use by Force field constraint).
+
+ :type: integer
+
+ .. attribute:: rotDamp
+
+ Time constant for the rotation expressed in frame (only for the distance constraint), 0 = use damp for rotation as well.
+
+ :type: integer
+
+ .. attribute:: direction
+
+ The reference direction in world coordinate for the orientation constraint.
+
+ :type: 3-tuple of float: (x, y, z)
+
+ .. attribute:: option
+
+ Binary combination of :ref:`these constants <constraint-actuator-option>`
+
+ :type: integer
+
+ .. attribute:: time
+
+ activation time of the actuator. The actuator disables itself after this many frame. If set to 0, the actuator is not limited in time.
+
+ :type: integer
+
+ .. attribute:: propName
+
+ the name of the property or material for the ray detection of the distance constraint.
+
+ :type: string
+
+ .. attribute:: min
+
+ The lower bound of the constraint. For the rotation and orientation constraint, it represents radiant.
+
+ :type: float
+
+ .. attribute:: distance
+
+ the target distance of the distance constraint.
+
+ :type: float
+
+ .. attribute:: max
+
+ the upper bound of the constraint. For rotation and orientation constraints, it represents radiant.
+
+ :type: float
+
+ .. attribute:: rayLength
+
+ the length of the ray of the distance constraint.
+
+ :type: float
+
+ .. attribute:: limit
+
+ type of constraint. Use one of the :ref:`these constants <constraint-actuator-limit>`
+
+ :type: integer.
+
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
new file mode 100644
index 00000000000..c26675147ac
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
@@ -0,0 +1,18 @@
+KX_ConstraintWrapper(PyObjectPlus)
+==================================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: KX_ConstraintWrapper(PyObjectPlus)
+
+ KX_ConstraintWrapper
+
+ .. method:: getConstraintId(val)
+
+ Returns the contraint's ID
+
+ :return: the constraint's ID
+ :rtype: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_FontObject.rst b/doc/python_api/rst/bge_types/bge.types.KX_FontObject.rst
new file mode 100644
index 00000000000..1961f5e3e92
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_FontObject.rst
@@ -0,0 +1,12 @@
+KX_FontObject(KX_GameObject)
+============================
+
+.. module:: bge.types
+
+base class --- :class:`KX_GameObject`
+
+.. class:: KX_FontObject(KX_GameObject)
+
+ TODO.
+
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_GameActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_GameActuator.rst
new file mode 100644
index 00000000000..54702c5318d
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_GameActuator.rst
@@ -0,0 +1,23 @@
+KX_GameActuator(SCA_IActuator)
+==============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_GameActuator(SCA_IActuator)
+
+ The game actuator loads a new .blend file, restarts the current .blend file or quits the game.
+
+ .. attribute:: fileName
+
+ the new .blend file to load.
+
+ :type: string
+
+ .. attribute:: mode
+
+ The mode of this actuator. Can be on of :ref:`these constants <game-actuator>`
+
+ :type: Int
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
new file mode 100644
index 00000000000..a9c91735f91
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
@@ -0,0 +1,839 @@
+KX_GameObject(SCA_IObject)
+==========================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IObject`
+
+.. class:: KX_GameObject(SCA_IObject)
+
+ All game objects are derived from this class.
+
+ Properties assigned to game objects are accessible as attributes of this class.
+
+ .. note::
+
+ Calling ANY method or attribute on an object that has been removed from a scene will raise a SystemError,
+ if an object may have been removed since last accessing it use the :data:`invalid` attribute to check.
+
+ KX_GameObject can be subclassed to extend functionality. For example:
+
+ .. code-block:: python
+
+ import bge
+
+ class CustomGameObject(bge.types.KX_GameObject):
+ RATE = 0.05
+
+ def __init__(self, old_owner):
+ # "old_owner" can just be ignored. At this point, "self" is
+ # already the object in the scene, and "old_owner" has been
+ # destroyed.
+
+ # New attributes can be defined - but we could also use a game
+ # property, like "self['rate']".
+ self.rate = CustomGameObject.RATE
+
+ def update(self):
+ self.worldPosition.z += self.rate
+
+ # switch direction
+ if self.worldPosition.z > 1.0:
+ self.rate = -CustomGameObject.RATE
+ elif self.worldPosition.z < 0.0:
+ self.rate = CustomGameObject.RATE
+
+ # Called first
+ def mutate(cont):
+ old_object = cont.owner
+ mutated_object = CustomGameObject(cont.owner)
+
+ # After calling the constructor above, references to the old object
+ # should not be used.
+ assert(old_object is not mutated_object)
+ assert(old_object.invalid)
+ assert(mutated_object is cont.owner)
+
+ # Called later - note we are now working with the mutated object.
+ def update(cont):
+ cont.owner.update()
+
+ When subclassing objects other than empties and meshes, the specific type
+ should be used - e.g. inherit from :class:`BL_ArmatureObject` when the object
+ to mutate is an armature.
+
+ .. attribute:: name
+
+ The object's name. (read-only).
+
+ :type: string
+
+ .. attribute:: mass
+
+ The object's mass
+
+ :type: float
+
+ .. note::
+
+ The object must have a physics controller for the mass to be applied, otherwise the mass value will be returned as 0.0.
+
+ .. attribute:: linVelocityMin
+
+ Enforces the object keeps moving at a minimum velocity.
+
+ :type: float
+
+ .. note::
+
+ Applies to dynamic and rigid body objects only.
+
+ .. note::
+
+ A value of 0.0 disables this option.
+
+ .. note::
+
+ While objects are stationary the minimum velocity will not be applied.
+
+ .. attribute:: linVelocityMax
+
+ Clamp the maximum linear velocity to prevent objects moving beyond a set speed.
+
+ :type: float
+
+ .. note::
+
+ Applies to dynamic and rigid body objects only.
+
+ .. note::
+
+ A value of 0.0 disables this option (rather then setting it stationary).
+
+ .. attribute:: localInertia
+
+ the object's inertia vector in local coordinates. Read only.
+
+ :type: list [ix, iy, iz]
+
+ .. attribute:: parent
+
+ The object's parent object. (read-only).
+
+ :type: :class:`KX_GameObject` or None
+
+ .. attribute:: groupMembers
+
+ Returns the list of group members if the object is a group object, otherwise None is returned.
+
+ :type: :class:`CListValue` of :class:`KX_GameObject` or None
+
+ .. attribute:: groupObject
+
+ Returns the group object that the object belongs to or None if the object is not part of a group.
+
+ :type: :class:`KX_GameObject` or None
+
+ .. attribute:: scene
+
+ The object's scene. (read-only).
+
+ :type: :class:`KX_Scene` or None
+
+ .. attribute:: visible
+
+ visibility flag.
+
+ :type: boolean
+
+ .. note::
+
+ Game logic will still run for invisible objects.
+
+ .. attribute:: color
+
+ The object color of the object. [r, g, b, a]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: occlusion
+
+ occlusion capability flag.
+
+ :type: boolean
+
+ .. attribute:: position
+
+ The object's position. [x, y, z] On write: local position, on read: world position
+
+ .. deprecated:: use :data:`localPosition` and :data:`worldPosition`.
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: orientation
+
+ The object's orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector. On write: local orientation, on read: world orientation
+
+ .. deprecated:: use :data:`localOrientation` and :data:`worldOrientation`.
+
+ :type: :class:`mathutils.Matrix`
+
+ .. attribute:: scaling
+
+ The object's scaling factor. [sx, sy, sz] On write: local scaling, on read: world scaling
+
+ .. deprecated:: use :data:`localScale` and :data:`worldScale`.
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: localOrientation
+
+ The object's local orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector.
+
+ :type: :class:`mathutils.Matrix`
+
+ .. attribute:: worldOrientation
+
+ The object's world orientation. 3x3 Matrix.
+
+ :type: :class:`mathutils.Matrix`
+
+ .. attribute:: localScale
+
+ The object's local scaling factor. [sx, sy, sz]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: worldScale
+
+ The object's world scaling factor. [sx, sy, sz]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: localPosition
+
+ The object's local position. [x, y, z]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: worldPosition
+
+ The object's world position. [x, y, z]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: localTransform
+
+ The object's local space transform matrix. 4x4 Matrix.
+
+ :type: :class:`mathutils.Matrix`
+
+ .. attribute:: worldTransform
+
+ The object's world space transform matrix. 4x4 Matrix.
+
+ :type: :class:`mathutils.Matrix`
+
+ .. attribute:: localLinearVelocity
+
+ The object's local linear velocity. [x, y, z]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: worldLinearVelocity
+
+ The object's world linear velocity. [x, y, z]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: localAngularVelocity
+
+ The object's local angular velocity. [x, y, z]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: worldAngularVelocity
+
+ The object's world angular velocity. [x, y, z]
+
+ :type: :class:`mathutils.Vector`
+
+ .. attribute:: timeOffset
+
+ adjust the slowparent delay at runtime.
+
+ :type: float
+
+ .. attribute:: state
+
+ the game object's state bitmask, using the first 30 bits, one bit must always be set.
+
+ :type: int
+
+ .. attribute:: meshes
+
+ a list meshes for this object.
+
+ :type: list of :class:`KX_MeshProxy`
+
+ .. note::
+
+ Most objects use only 1 mesh.
+
+ .. note::
+
+ Changes to this list will not update the KX_GameObject.
+
+ .. attribute:: sensors
+
+ a sequence of :class:`SCA_ISensor` objects with string/index lookups and iterator support.
+
+ :type: list
+
+ .. note::
+
+ This attribute is experemental and may be removed (but probably wont be).
+
+ .. note::
+
+ Changes to this list will not update the KX_GameObject.
+
+ .. attribute:: controllers
+
+ a sequence of :class:`SCA_IController` objects with string/index lookups and iterator support.
+
+ :type: list of :class:`SCA_ISensor`
+
+ .. note::
+
+ This attribute is experemental and may be removed (but probably wont be).
+
+ .. note::
+
+ Changes to this list will not update the KX_GameObject.
+
+ .. attribute:: actuators
+
+ a list of :class:`SCA_IActuator` with string/index lookups and iterator support.
+
+ :type: list
+
+ .. note::
+
+ This attribute is experemental and may be removed (but probably wont be).
+
+ .. note::
+
+ Changes to this list will not update the KX_GameObject.
+
+ .. attribute:: attrDict
+
+ get the objects internal python attribute dictionary for direct (faster) access.
+
+ :type: dict
+
+ .. attribute:: children
+
+ direct children of this object, (read-only).
+
+ :type: :class:`CListValue` of :class:`KX_GameObject`'s
+
+ .. attribute:: childrenRecursive
+
+ all children of this object including childrens children, (read-only).
+
+ :type: :class:`CListValue` of :class:`KX_GameObject`'s
+
+ .. attribute:: life
+
+ The number of seconds until the object ends, assumes 50fps.
+ (when added with an add object actuator), (read-only).
+
+ :type: float
+
+ .. method:: endObject()
+
+ Delete this object, can be used in place of the EndObject Actuator.
+
+ The actual removal of the object from the scene is delayed.
+
+ .. method:: replaceMesh(mesh, useDisplayMesh=True, usePhysicsMesh=False)
+
+ Replace the mesh of this object with a new mesh. This works the same was as the actuator.
+
+ :arg mesh: mesh to replace or the meshes name.
+ :type mesh: :class:`MeshProxy` or string
+ :arg useDisplayMesh: when enabled the display mesh will be replaced (optional argument).
+ :type useDisplayMesh: boolean
+ :arg usePhysicsMesh: when enabled the physics mesh will be replaced (optional argument).
+ :type usePhysicsMesh: boolean
+
+ .. method:: setVisible(visible, recursive)
+
+ Sets the game object's visible flag.
+
+ :arg visible: the visible state to set.
+ :type visible: boolean
+ :arg recursive: optional argument to set all childrens visibility flag too.
+ :type recursive: boolean
+
+ .. method:: setOcclusion(occlusion, recursive)
+
+ Sets the game object's occlusion capability.
+
+ :arg occlusion: the state to set the occlusion to.
+ :type occlusion: boolean
+ :arg recursive: optional argument to set all childrens occlusion flag too.
+ :type recursive: boolean
+
+ .. method:: alignAxisToVect(vect, axis=2, factor=1.0)
+
+ Aligns any of the game object's axis along the given vector.
+
+
+ :arg vect: a vector to align the axis.
+ :type vect: 3D vector
+ :arg axis: The axis you want to align
+
+ * 0: X axis
+ * 1: Y axis
+ * 2: Z axis
+
+ :type axis: integer
+ :arg factor: Only rotate a feaction of the distance to the target vector (0.0 - 1.0)
+ :type factor: float
+
+ .. method:: getAxisVect(vect)
+
+ Returns the axis vector rotates by the objects worldspace orientation.
+ This is the equivalent of multiplying the vector by the orientation matrix.
+
+ :arg vect: a vector to align the axis.
+ :type vect: 3D Vector
+ :return: The vector in relation to the objects rotation.
+ :rtype: 3d vector.
+
+ .. method:: applyMovement(movement, local=False)
+
+ Sets the game object's movement.
+
+ :arg movement: movement vector.
+ :type movement: 3D Vector
+ :arg local:
+ * False: you get the "global" movement ie: relative to world orientation.
+ * True: you get the "local" movement ie: relative to object orientation.
+ :arg local: boolean
+
+ .. method:: applyRotation(rotation, local=False)
+
+ Sets the game object's rotation.
+
+ :arg rotation: rotation vector.
+ :type rotation: 3D Vector
+ :arg local:
+ * False: you get the "global" rotation ie: relative to world orientation.
+ * True: you get the "local" rotation ie: relative to object orientation.
+ :arg local: boolean
+
+ .. method:: applyForce(force, local=False)
+
+ Sets the game object's force.
+
+ This requires a dynamic object.
+
+ :arg force: force vector.
+ :type force: 3D Vector
+ :arg local:
+ * False: you get the "global" force ie: relative to world orientation.
+ * True: you get the "local" force ie: relative to object orientation.
+ :type local: boolean
+
+ .. method:: applyTorque(torque, local=False)
+
+ Sets the game object's torque.
+
+ This requires a dynamic object.
+
+ :arg torque: torque vector.
+ :type torque: 3D Vector
+ :arg local:
+ * False: you get the "global" torque ie: relative to world orientation.
+ * True: you get the "local" torque ie: relative to object orientation.
+ :type local: boolean
+
+ .. method:: getLinearVelocity(local=False)
+
+ Gets the game object's linear velocity.
+
+ This method returns the game object's velocity through it's centre of mass, ie no angular velocity component.
+
+ :arg local:
+ * False: you get the "global" velocity ie: relative to world orientation.
+ * True: you get the "local" velocity ie: relative to object orientation.
+ :type local: boolean
+ :return: the object's linear velocity.
+ :rtype: list [vx, vy, vz]
+
+ .. method:: setLinearVelocity(velocity, local=False)
+
+ Sets the game object's linear velocity.
+
+ This method sets game object's velocity through it's centre of mass,
+ ie no angular velocity component.
+
+ This requires a dynamic object.
+
+ :arg velocity: linear velocity vector.
+ :type velocity: 3D Vector
+ :arg local:
+ * False: you get the "global" velocity ie: relative to world orientation.
+ * True: you get the "local" velocity ie: relative to object orientation.
+ :type local: boolean
+
+ .. method:: getAngularVelocity(local=False)
+
+ Gets the game object's angular velocity.
+
+ :arg local:
+ * False: you get the "global" velocity ie: relative to world orientation.
+ * True: you get the "local" velocity ie: relative to object orientation.
+ :type local: boolean
+ :return: the object's angular velocity.
+ :rtype: list [vx, vy, vz]
+
+ .. method:: setAngularVelocity(velocity, local=False)
+
+ Sets the game object's angular velocity.
+
+ This requires a dynamic object.
+
+ :arg velocity: angular velocity vector.
+ :type velocity: boolean
+ :arg local:
+ * False: you get the "global" velocity ie: relative to world orientation.
+ * True: you get the "local" velocity ie: relative to object orientation.
+
+ .. method:: getVelocity(point=(0, 0, 0))
+
+ Gets the game object's velocity at the specified point.
+
+ Gets the game object's velocity at the specified point, including angular
+ components.
+
+ :arg point: optional point to return the velocity for, in local coordinates.
+ :type point: 3D Vector
+ :return: the velocity at the specified point.
+ :rtype: list [vx, vy, vz]
+
+ .. method:: getReactionForce()
+
+ Gets the game object's reaction force.
+
+ The reaction force is the force applied to this object over the last simulation timestep.
+ This also includes impulses, eg from collisions.
+
+ :return: the reaction force of this object.
+ :rtype: list [fx, fy, fz]
+
+ .. note::
+
+ This is not implimented at the moment.
+
+ .. method:: applyImpulse(point, impulse)
+
+ Applies an impulse to the game object.
+
+ This will apply the specified impulse to the game object at the specified point.
+ If point != position, applyImpulse will also change the object's angular momentum.
+ Otherwise, only linear momentum will change.
+
+ :arg point: the point to apply the impulse to (in world coordinates)
+ :type point: the point to apply the impulse to (in world coordinates)
+
+ .. method:: suspendDynamics()
+
+ Suspends physics for this object.
+
+ .. method:: restoreDynamics()
+
+ Resumes physics for this object.
+
+ .. note::
+
+ The objects linear velocity will be applied from when the dynamics were suspended.
+
+ .. method:: enableRigidBody()
+
+ Enables rigid body physics for this object.
+
+ Rigid body physics allows the object to roll on collisions.
+
+ .. method:: disableRigidBody()
+
+ Disables rigid body physics for this object.
+
+ .. method:: setParent(parent, compound=True, ghost=True)
+
+ Sets this object's parent.
+ Control the shape status with the optional compound and ghost parameters:
+
+ In that case you can control if it should be ghost or not:
+
+ :arg parent: new parent object.
+ :type parent: :class:`KX_GameObject`
+ :arg compound: whether the shape should be added to the parent compound shape.
+
+ * True: the object shape should be added to the parent compound shape.
+ * False: the object should keep its individual shape.
+
+ :type compound: boolean
+ :arg ghost: whether the object should be ghost while parented.
+
+ * True: if the object should be made ghost while parented.
+ * False: if the object should be solid while parented.
+
+ :type ghost: boolean
+
+ .. note::
+
+ If the object type is sensor, it stays ghost regardless of ghost parameter
+
+ .. method:: removeParent()
+
+ Removes this objects parent.
+
+ .. method:: getPhysicsId()
+
+ Returns the user data object associated with this game object's physics controller.
+
+ .. method:: getPropertyNames()
+
+ Gets a list of all property names.
+
+ :return: All property names for this object.
+ :rtype: list
+
+ .. method:: getDistanceTo(other)
+
+ :arg other: a point or another :class:`KX_GameObject` to measure the distance to.
+ :type other: :class:`KX_GameObject` or list [x, y, z]
+ :return: distance to another object or point.
+ :rtype: float
+
+ .. method:: getVectTo(other)
+
+ Returns the vector and the distance to another object or point.
+ The vector is normalized unless the distance is 0, in which a zero length vector is returned.
+
+ :arg other: a point or another :class:`KX_GameObject` to get the vector and distance to.
+ :type other: :class:`KX_GameObject` or list [x, y, z]
+ :return: (distance, globalVector(3), localVector(3))
+ :rtype: 3-tuple (float, 3-tuple (x, y, z), 3-tuple (x, y, z))
+
+ .. method:: rayCastTo(other, dist, prop)
+
+ Look towards another point/object and find first object hit within dist that matches prop.
+
+ The ray is always casted from the center of the object, ignoring the object itself.
+ The ray is casted towards the center of another object or an explicit [x, y, z] point.
+ Use rayCast() if you need to retrieve the hit point
+
+ :arg other: [x, y, z] or object towards which the ray is casted
+ :type other: :class:`KX_GameObject` or 3-tuple
+ :arg dist: max distance to look (can be negative => look behind); 0 or omitted => detect up to other
+ :type dist: float
+ :arg prop: property name that object must have; can be omitted => detect any object
+ :type prop: string
+ :return: the first object hit or None if no object or object does not match prop
+ :rtype: :class:`KX_GameObject`
+
+ .. method:: rayCast(objto, objfrom, dist, prop, face, xray, poly)
+
+ Look from a point/object to another point/object and find first object hit within dist that matches prop.
+ if poly is 0, returns a 3-tuple with object reference, hit point and hit normal or (None, None, None) if no hit.
+ if poly is 1, returns a 4-tuple with in addition a :class:`KX_PolyProxy` as 4th element.
+ if poly is 2, returns a 5-tuple with in addition a 2D vector with the UV mapping of the hit point as 5th element.
+
+ .. code-block:: python
+
+ # shoot along the axis gun-gunAim (gunAim should be collision-free)
+ obj, point, normal = gun.rayCast(gunAim, None, 50)
+ if obj:
+ # do something
+ pass
+
+ The face paremeter determines the orientation of the normal.
+
+ * 0 => hit normal is always oriented towards the ray origin (as if you casted the ray from outside)
+ * 1 => hit normal is the real face normal (only for mesh object, otherwise face has no effect)
+
+ The ray has X-Ray capability if xray parameter is 1, otherwise the first object hit (other than self object) stops the ray.
+ The prop and xray parameters interact as follow.
+
+ * prop off, xray off: return closest hit or no hit if there is no object on the full extend of the ray.
+ * prop off, xray on : idem.
+ * prop on, xray off: return closest hit if it matches prop, no hit otherwise.
+ * prop on, xray on : return closest hit matching prop or no hit if there is no object matching prop on the full extend of the ray.
+
+ The :class:`KX_PolyProxy` 4th element of the return tuple when poly=1 allows to retrieve information on the polygon hit by the ray.
+ If there is no hit or the hit object is not a static mesh, None is returned as 4th element.
+
+ The ray ignores collision-free objects and faces that dont have the collision flag enabled, you can however use ghost objects.
+
+ :arg objto: [x, y, z] or object to which the ray is casted
+ :type objto: :class:`KX_GameObject` or 3-tuple
+ :arg objfrom: [x, y, z] or object from which the ray is casted; None or omitted => use self object center
+ :type objfrom: :class:`KX_GameObject` or 3-tuple or None
+ :arg dist: max distance to look (can be negative => look behind); 0 or omitted => detect up to to
+ :type dist: float
+ :arg prop: property name that object must have; can be omitted or "" => detect any object
+ :type prop: string
+ :arg face: normal option: 1=>return face normal; 0 or omitted => normal is oriented towards origin
+ :type face: integer
+ :arg xray: X-ray option: 1=>skip objects that don't match prop; 0 or omitted => stop on first object
+ :type xray: integer
+ :arg poly: polygon option: 0, 1 or 2 to return a 3-, 4- or 5-tuple with information on the face hit.
+
+ * 0 or omitted: return value is a 3-tuple (object, hitpoint, hitnormal) or (None, None, None) if no hit
+ * 1: return value is a 4-tuple and the 4th element is a :class:`KX_PolyProxy` or None if no hit or the object doesn't use a mesh collision shape.
+ * 2: return value is a 5-tuple and the 5th element is a 2-tuple (u, v) with the UV mapping of the hit point or None if no hit, or the object doesn't use a mesh collision shape, or doesn't have a UV mapping.
+
+ :type poly: integer
+ :return: (object, hitpoint, hitnormal) or (object, hitpoint, hitnormal, polygon) or (object, hitpoint, hitnormal, polygon, hituv).
+
+ * object, hitpoint and hitnormal are None if no hit.
+ * polygon is valid only if the object is valid and is a static object, a dynamic object using mesh collision shape or a soft body object, otherwise it is None
+ * hituv is valid only if polygon is valid and the object has a UV mapping, otherwise it is None
+
+ :rtype:
+
+ * 3-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz))
+ * or 4-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`)
+ * or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`, 2-tuple (u, v))
+
+ .. note::
+
+ The ray ignores the object on which the method is called. It is casted from/to object center or explicit [x, y, z] points.
+
+ .. method:: setCollisionMargin(margin)
+
+ Set the objects collision margin.
+
+ :arg margin: the collision margin distance in blender units.
+ :type margin: float
+
+ .. note::
+
+ If this object has no physics controller (a physics ID of zero), this function will raise RuntimeError.
+
+ .. method:: sendMessage(subject, body="", to="")
+
+ Sends a message.
+
+ :arg subject: The subject of the message
+ :type subject: string
+ :arg body: The body of the message (optional)
+ :type body: string
+ :arg to: The name of the object to send the message to (optional)
+ :type to: string
+
+ .. method:: reinstancePhysicsMesh(gameObject, meshObject)
+
+ Updates the physics system with the changed mesh.
+
+ If no arguments are given the physics mesh will be re-created from the first mesh assigned to the game object.
+
+ :arg gameObject: optional argument, set the physics shape from this gameObjets mesh.
+ :type gameObject: string, :class:`KX_GameObject` or None
+ :arg meshObject: optional argument, set the physics shape from this mesh.
+ :type meshObject: string, :class:`MeshProxy` or None
+
+ :return: True if reinstance succeeded, False if it failed.
+ :rtype: boolean
+
+ .. note::
+
+ If this object has instances the other instances will be updated too.
+
+ .. note::
+
+ The gameObject argument has an advantage that it can convert from a mesh with modifiers applied (such as subsurf).
+
+ .. warning::
+
+ Only triangle mesh type objects are supported currently (not convex hull)
+
+ .. warning::
+
+ If the object is a part of a combound object it will fail (parent or child)
+
+ .. warning::
+
+ Rebuilding the physics mesh can be slow, running many times per second will give a performance hit.
+
+ .. method:: get(key, default=None)
+
+ Return the value matching key, or the default value if its not found.
+ :return: The key value or a default.
+
+ .. method:: playAction(name, start_frame, end_frame, layer=0, priority=0, blendin=0, play_mode=ACT_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0)
+
+ Plays an action.
+
+ :arg name: the name of the action
+ :type name: string
+ :arg start: the start frame of the action
+ :type start: float
+ :arg end: the end frame of the action
+ :type end: float
+ :arg layer: the layer the action will play in (actions in different layers are added/blended together)
+ :type layer: integer
+ :arg priority: only play this action if there isn't an action currently playing in this layer with a higher (lower number) priority
+ :type priority: integer
+ :arg blendin: the amount of blending between this animation and the previous one on this layer
+ :type blendin: float
+ :arg play_mode: the play mode
+ :type play_mode: one of :ref:`these constants <gameobject-playaction-mode>`
+ :arg layer_weight: how much of the previous layer to use for blending (0 = add)
+ :type layer_weight: float
+ :arg ipo_flags: flags for the old IPO behaviors (force, etc)
+ :type ipo_flags: int bitfield
+ :arg speed: the playback speed of the action as a factor (1.0 = normal speed, 2.0 = 2x speed, etc)
+ :type speed: float
+
+ .. method:: stopAction(layer=0)
+
+ Stop playing the action on the given layer.
+
+ :arg layer: The layer to stop playing.
+ :type layer: integer
+
+ .. method:: getActionFrame(layer=0)
+
+ Gets the current frame of the action playing in the supplied layer.
+
+ :arg layer: The layer that you want to get the frame from.
+ :type layer: integer
+
+ :return: The current frame of the action
+ :rtype: float
+
+ .. method:: setActionFrame(frame, layer=0)
+
+ Set the current frame of the action playing in the supplied layer.
+
+ :arg layer: The layer where you want to set the frame
+ :type layer: integer
+ :arg frame: The frame to set the action to
+ :type frame: float
+
+ .. method:: isPlayingAction(layer=0)
+
+ Checks to see if there is an action playing in the given layer.
+
+ :arg layer: The layer to check for a playing action.
+ :type layer: integer
+
+ :return: Whether or not the action is playing
+ :rtype: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_IpoActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_IpoActuator.rst
new file mode 100644
index 00000000000..2cae4fb3b1a
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_IpoActuator.rst
@@ -0,0 +1,65 @@
+KX_IpoActuator(SCA_IActuator)
+=============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_IpoActuator(SCA_IActuator)
+
+ IPO actuator activates an animation.
+
+ .. attribute:: frameStart
+
+ Start frame.
+
+ :type: float
+
+ .. attribute:: frameEnd
+
+ End frame.
+
+ :type: float
+
+ .. attribute:: propName
+
+ Use this property to define the Ipo position.
+
+ :type: string
+
+ .. attribute:: framePropName
+
+ Assign this property this action current frame number.
+
+ :type: string
+
+ .. attribute:: mode
+
+ Play mode for the ipo. Can be on of :ref:`these constants <ipo-actuator>`
+
+ :type: integer
+
+ .. attribute:: useIpoAsForce
+
+ Apply Ipo as a global or local force depending on the local option (dynamic objects only).
+
+ :type: boolean
+
+ .. attribute:: useIpoAdd
+
+ Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag.
+
+ :type: boolean
+
+ .. attribute:: useIpoLocal
+
+ Let the ipo acts in local coordinates, used in Force and Add mode.
+
+ :type: boolean
+
+ .. attribute:: useChildren
+
+ Update IPO on all children Objects as well.
+
+ :type: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_LibLoadStatus.rst b/doc/python_api/rst/bge_types/bge.types.KX_LibLoadStatus.rst
new file mode 100644
index 00000000000..a5b7aaf5dee
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_LibLoadStatus.rst
@@ -0,0 +1,45 @@
+KX_LibLoadStatus(PyObjectPlus)
+==============================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: KX_LibLoadStatus(PyObjectPlus)
+
+ An object providing information about a LibLoad() operation.
+
+ .. code-block:: python
+
+ # Print a message when an async LibLoad is done
+ import bge
+
+ def finished_cb(status):
+ print("Library (%s) loaded in %.2fms." % (status.libraryName, status.timeTaken))
+
+ bge.logic.LibLoad('myblend.blend', 'Scene', async=True).onFinish = finished_cb
+
+ .. attribute:: onFinish
+
+ A callback that gets called when the lib load is done.
+
+ :type: callable
+
+ .. attribute:: progress
+
+ The current progress of the lib load as a normalized value from 0.0 to 1.0.
+
+ :type: float
+
+ .. attribute:: libraryName
+
+ The name of the library being loaded (the first argument to LibLoad).
+
+ :type: string
+
+ .. attribute:: timeTaken
+
+ The amount of time, in seconds, the lib load took (0 until the operation is complete).
+
+ :type: float
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_LightObject.rst b/doc/python_api/rst/bge_types/bge.types.KX_LightObject.rst
new file mode 100644
index 00000000000..2b2bdf76b4f
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_LightObject.rst
@@ -0,0 +1,90 @@
+KX_LightObject(KX_GameObject)
+=============================
+
+.. module:: bge.types
+
+base class --- :class:`KX_GameObject`
+
+.. class:: KX_LightObject(KX_GameObject)
+
+ A Light object.
+
+ .. code-block:: python
+
+ # Turn on a red alert light.
+ import bge
+
+ co = bge.logic.getCurrentController()
+ light = co.owner
+
+ light.energy = 1.0
+ light.color = [1.0, 0.0, 0.0]
+
+ .. data:: SPOT
+
+ A spot light source. See attribute :data:`type`
+
+ .. data:: SUN
+
+ A point light source with no attenuation. See attribute :data:`type`
+
+ .. data:: NORMAL
+
+ A point light source. See attribute :data:`type`
+
+ .. attribute:: type
+
+ The type of light - must be SPOT, SUN or NORMAL
+
+ .. attribute:: layer
+
+ The layer mask that this light affects object on.
+
+ :type: bitfield
+
+ .. attribute:: energy
+
+ The brightness of this light.
+
+ :type: float
+
+ .. attribute:: distance
+
+ The maximum distance this light can illuminate. (SPOT and NORMAL lights only).
+
+ :type: float
+
+ .. attribute:: color
+
+ The color of this light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
+
+ :type: list [r, g, b]
+
+ .. attribute:: lin_attenuation
+
+ The linear component of this light's attenuation. (SPOT and NORMAL lights only).
+
+ :type: float
+
+ .. attribute:: quad_attenuation
+
+ The quadratic component of this light's attenuation (SPOT and NORMAL lights only).
+
+ :type: float
+
+ .. attribute:: spotsize
+
+ The cone angle of the spot light, in degrees (SPOT lights only).
+
+ :type: float in [0 - 180].
+
+ .. attribute:: spotblend
+
+ Specifies the intensity distribution of the spot light (SPOT lights only).
+
+ :type: float in [0 - 1]
+
+ .. note::
+
+ Higher values result in a more focused light source.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_MeshProxy.rst b/doc/python_api/rst/bge_types/bge.types.KX_MeshProxy.rst
new file mode 100644
index 00000000000..2ec8b8ece5c
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_MeshProxy.rst
@@ -0,0 +1,134 @@
+KX_MeshProxy(SCA_IObject)
+=========================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IObject`
+
+.. class:: KX_MeshProxy(SCA_IObject)
+
+ A mesh object.
+
+ You can only change the vertex properties of a mesh object, not the mesh topology.
+
+ To use mesh objects effectively, you should know a bit about how the game engine handles them.
+
+ #. Mesh Objects are converted from Blender at scene load.
+ #. The Converter groups polygons by Material. This means they can be sent to the renderer efficiently. A material holds:
+
+ #. The texture.
+ #. The Blender material.
+ #. The Tile properties
+ #. The face properties - (From the "Texture Face" panel)
+ #. Transparency & z sorting
+ #. Light layer
+ #. Polygon shape (triangle/quad)
+ #. Game Object
+
+ #. Vertices will be split by face if necessary. Vertices can only be shared between faces if:
+
+ #. They are at the same position
+ #. UV coordinates are the same
+ #. Their normals are the same (both polygons are "Set Smooth")
+ #. They are the same color, for example: a cube has 24 vertices: 6 faces with 4 vertices per face.
+
+ The correct method of iterating over every :class:`KX_VertexProxy` in a game object
+
+ .. code-block:: python
+
+ from bge import logic
+
+ cont = logic.getCurrentController()
+ object = cont.owner
+
+ for mesh in object.meshes:
+ for m_index in range(len(mesh.materials)):
+ for v_index in range(mesh.getVertexArrayLength(m_index)):
+ vertex = mesh.getVertex(m_index, v_index)
+ # Do something with vertex here...
+ # ... eg: color the vertex red.
+ vertex.color = [1.0, 0.0, 0.0, 1.0]
+
+ .. attribute:: materials
+
+ :type: list of :class:`KX_BlenderMaterial` or :class:`KX_PolygonMaterial` types
+
+ .. attribute:: numPolygons
+
+ :type: integer
+
+ .. attribute:: numMaterials
+
+ :type: integer
+
+ .. method:: getMaterialName(matid)
+
+ Gets the name of the specified material.
+
+ :arg matid: the specified material.
+ :type matid: integer
+ :return: the attached material name.
+ :rtype: string
+
+ .. method:: getTextureName(matid)
+
+ Gets the name of the specified material's texture.
+
+ :arg matid: the specified material
+ :type matid: integer
+ :return: the attached material's texture name.
+ :rtype: string
+
+ .. method:: getVertexArrayLength(matid)
+
+ Gets the length of the vertex array associated with the specified material.
+
+ There is one vertex array for each material.
+
+ :arg matid: the specified material
+ :type matid: integer
+ :return: the number of verticies in the vertex array.
+ :rtype: integer
+
+ .. method:: getVertex(matid, index)
+
+ Gets the specified vertex from the mesh object.
+
+ :arg matid: the specified material
+ :type matid: integer
+ :arg index: the index into the vertex array.
+ :type index: integer
+ :return: a vertex object.
+ :rtype: :class:`KX_VertexProxy`
+
+ .. method:: getPolygon(index)
+
+ Gets the specified polygon from the mesh.
+
+ :arg index: polygon number
+ :type index: integer
+ :return: a polygon object.
+ :rtype: :class:`PolyProxy`
+
+ .. method:: transform(matid, matrix)
+
+ Transforms the vertices of a mesh.
+
+ :arg matid: material index, -1 transforms all.
+ :type matid: integer
+ :arg matrix: transformation matrix.
+ :type matrix: 4x4 matrix [[float]]
+
+ .. method:: transformUV(matid, matrix, uv_index=-1, uv_index_from=-1)
+
+ Transforms the vertices UV's of a mesh.
+
+ :arg matid: material index, -1 transforms all.
+ :type matid: integer
+ :arg matrix: transformation matrix.
+ :type matrix: 4x4 matrix [[float]]
+ :arg uv_index: optional uv index, -1 for all, otherwise 0 or 1.
+ :type uv_index: integer
+ :arg uv_index_from: optional uv index to copy from, -1 to transform the current uv.
+ :type uv_index_from: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst b/doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst
new file mode 100644
index 00000000000..dda73eadb52
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_MouseFocusSensor.rst
@@ -0,0 +1,66 @@
+KX_MouseFocusSensor(SCA_MouseSensor)
+====================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_MouseSensor`
+
+.. class:: KX_MouseFocusSensor(SCA_MouseSensor)
+
+ The mouse focus sensor detects when the mouse is over the current game object.
+
+ The mouse focus sensor works by transforming the mouse coordinates from 2d device
+ space to 3d space then raycasting away from the camera.
+
+ .. attribute:: raySource
+
+ The worldspace source of the ray (the view position).
+
+ :type: list (vector of 3 floats)
+
+ .. attribute:: rayTarget
+
+ The worldspace target of the ray.
+
+ :type: list (vector of 3 floats)
+
+ .. attribute:: rayDirection
+
+ The :data:`rayTarget` - :class:`raySource` normalized.
+
+ :type: list (normalized vector of 3 floats)
+
+ .. attribute:: hitObject
+
+ the last object the mouse was over.
+
+ :type: :class:`KX_GameObject` or None
+
+ .. attribute:: hitPosition
+
+ The worldspace position of the ray intersecton.
+
+ :type: list (vector of 3 floats)
+
+ .. attribute:: hitNormal
+
+ the worldspace normal from the face at point of intersection.
+
+ :type: list (normalized vector of 3 floats)
+
+ .. attribute:: hitUV
+
+ the UV coordinates at the point of intersection.
+
+ :type: list (vector of 2 floats)
+
+ If the object has no UV mapping, it returns [0, 0].
+
+ The UV coordinates are not normalized, they can be < 0 or > 1 depending on the UV mapping.
+
+ .. attribute:: usePulseFocus
+
+ When enabled, moving the mouse over a different object generates a pulse. (only used when the 'Mouse Over Any' sensor option is set).
+
+ :type: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_NavMeshObject.rst b/doc/python_api/rst/bge_types/bge.types.KX_NavMeshObject.rst
new file mode 100644
index 00000000000..5c73d0aa1d3
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_NavMeshObject.rst
@@ -0,0 +1,47 @@
+KX_NavMeshObject(KX_GameObject)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`KX_GameObject`
+
+.. class:: KX_NavMeshObject(KX_GameObject)
+
+ Python interface for using and controlling navigation meshes.
+
+ .. method:: findPath(start, goal)
+
+ Finds the path from start to goal points.
+
+ :arg start: the start point
+ :arg start: 3D Vector
+ :arg goal: the goal point
+ :arg start: 3D Vector
+ :return: a path as a list of points
+ :rtype: list of points
+
+ .. method:: raycast(start, goal)
+
+ Raycast from start to goal points.
+
+ :arg start: the start point
+ :arg start: 3D Vector
+ :arg goal: the goal point
+ :arg start: 3D Vector
+ :return: the hit factor
+ :rtype: float
+
+ .. method:: draw(mode)
+
+ Draws a debug mesh for the navigation mesh.
+
+ :arg mode: the drawing mode (one of :ref:`these constants <navmesh-draw-mode>`)
+ :arg mode: integer
+ :return: None
+
+ .. method:: rebuild()
+
+ Rebuild the navigation mesh.
+
+ :return: None
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_NearSensor.rst b/doc/python_api/rst/bge_types/bge.types.KX_NearSensor.rst
new file mode 100644
index 00000000000..995e645b979
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_NearSensor.rst
@@ -0,0 +1,23 @@
+KX_NearSensor(KX_TouchSensor)
+=============================
+
+.. module:: bge.types
+
+base class --- :class:`KX_TouchSensor`
+
+.. class:: KX_NearSensor(KX_TouchSensor)
+
+ A near sensor is a specialised form of touch sensor.
+
+ .. attribute:: distance
+
+ The near sensor activates when an object is within this distance.
+
+ :type: float
+
+ .. attribute:: resetDistance
+
+ The near sensor deactivates when the object exceeds this distance.
+
+ :type: float
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_NetworkMessageActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_NetworkMessageActuator.rst
new file mode 100644
index 00000000000..b8dcd01fe43
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_NetworkMessageActuator.rst
@@ -0,0 +1,35 @@
+KX_NetworkMessageActuator(SCA_IActuator)
+========================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_NetworkMessageActuator(SCA_IActuator)
+
+ Message Actuator
+
+ .. attribute:: propName
+
+ Messages will only be sent to objects with the given property name.
+
+ :type: string
+
+ .. attribute:: subject
+
+ The subject field of the message.
+
+ :type: string
+
+ .. attribute:: body
+
+ The body of the message.
+
+ :type: string
+
+ .. attribute:: usePropBody
+
+ Send a property instead of a regular body message.
+
+ :type: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_NetworkMessageSensor.rst b/doc/python_api/rst/bge_types/bge.types.KX_NetworkMessageSensor.rst
new file mode 100644
index 00000000000..a6b1082a4fe
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_NetworkMessageSensor.rst
@@ -0,0 +1,38 @@
+KX_NetworkMessageSensor(SCA_ISensor)
+====================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: KX_NetworkMessageSensor(SCA_ISensor)
+
+ The Message Sensor logic brick.
+
+ Currently only loopback (local) networks are supported.
+
+ .. attribute:: subject
+
+ The subject the sensor is looking for.
+
+ :type: string
+
+ .. attribute:: frameMessageCount
+
+ The number of messages received since the last frame. (read-only).
+
+ :type: integer
+
+ .. attribute:: subjects
+
+ The list of message subjects received. (read-only).
+
+ :type: list of strings
+
+ .. attribute:: bodies
+
+ The list of message bodies received. (read-only).
+
+ :type: list of strings
+
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ObjectActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_ObjectActuator.rst
new file mode 100644
index 00000000000..f10f101a4cc
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_ObjectActuator.rst
@@ -0,0 +1,129 @@
+KX_ObjectActuator(SCA_IActuator)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_ObjectActuator(SCA_IActuator)
+
+ The object actuator ("Motion Actuator") applies force, torque, displacement, angular displacement,
+ velocity, or angular velocity to an object.
+ Servo control allows to regulate force to achieve a certain speed target.
+
+ .. attribute:: force
+
+ The force applied by the actuator.
+
+ :type: list [x, y, z]
+
+ .. attribute:: useLocalForce
+
+ A flag specifying if the force is local.
+
+ :type: boolean
+
+ .. attribute:: torque
+
+ The torque applied by the actuator.
+
+ :type: list [x, y, z]
+
+ .. attribute:: useLocalTorque
+
+ A flag specifying if the torque is local.
+
+ :type: boolean
+
+ .. attribute:: dLoc
+
+ The displacement vector applied by the actuator.
+
+ :type: list [x, y, z]
+
+ .. attribute:: useLocalDLoc
+
+ A flag specifying if the dLoc is local.
+
+ :type: boolean
+
+ .. attribute:: dRot
+
+ The angular displacement vector applied by the actuator
+
+ :type: list [x, y, z]
+
+ .. note::
+
+ Since the displacement is applied every frame, you must adjust the displacement based on the frame rate, or you game experience will depend on the player's computer speed.
+
+ .. attribute:: useLocalDRot
+
+ A flag specifying if the dRot is local.
+
+ :type: boolean
+
+ .. attribute:: linV
+
+ The linear velocity applied by the actuator.
+
+ :type: list [x, y, z]
+
+ .. attribute:: useLocalLinV
+
+ A flag specifying if the linear velocity is local.
+
+ :type: boolean
+
+ .. note::
+
+ This is the target speed for servo controllers.
+
+ .. attribute:: angV
+
+ The angular velocity applied by the actuator.
+
+ :type: list [x, y, z]
+
+ .. attribute:: useLocalAngV
+
+ A flag specifying if the angular velocity is local.
+
+ :type: boolean
+
+ .. attribute:: damping
+
+ The damping parameter of the servo controller.
+
+ :type: short
+
+ .. attribute:: forceLimitX
+
+ The min/max force limit along the X axis and activates or deactivates the limits in the servo controller.
+
+ :type: list [min(float), max(float), bool]
+
+ .. attribute:: forceLimitY
+
+ The min/max force limit along the Y axis and activates or deactivates the limits in the servo controller.
+
+ :type: list [min(float), max(float), bool]
+
+ .. attribute:: forceLimitZ
+
+ The min/max force limit along the Z axis and activates or deactivates the limits in the servo controller.
+
+ :type: list [min(float), max(float), bool]
+
+ .. attribute:: pid
+
+ The PID coefficients of the servo controller.
+
+ :type: list of floats [proportional, integral, derivate]
+
+ .. attribute:: reference
+
+ The object that is used as reference to compute the velocity for the servo controller.
+
+ :type: :class:`KX_GameObject` or None
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ParentActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_ParentActuator.rst
new file mode 100644
index 00000000000..77dcb907d6a
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_ParentActuator.rst
@@ -0,0 +1,38 @@
+KX_ParentActuator(SCA_IActuator)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_ParentActuator(SCA_IActuator)
+
+ The parent actuator can set or remove an objects parent object.
+
+ .. attribute:: object
+
+ the object this actuator sets the parent too.
+
+ :type: :class:`KX_GameObject` or None
+
+ .. attribute:: mode
+
+ The mode of this actuator.
+
+ :type: integer from 0 to 1.
+
+ .. attribute:: compound
+
+ Whether the object shape should be added to the parent compound shape when parenting.
+
+ Effective only if the parent is already a compound shape.
+
+ :type: boolean
+
+ .. attribute:: ghost
+
+ Whether the object should be made ghost when parenting
+ Effective only if the shape is not added to the parent compound shape.
+
+ :type: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_PolyProxy.rst b/doc/python_api/rst/bge_types/bge.types.KX_PolyProxy.rst
new file mode 100644
index 00000000000..534f6deedc0
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_PolyProxy.rst
@@ -0,0 +1,139 @@
+KX_PolyProxy(SCA_IObject)
+=========================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IObject`
+
+.. class:: KX_PolyProxy(SCA_IObject)
+
+ A polygon holds the index of the vertex forming the poylgon.
+
+ Note:
+ The polygon attributes are read-only, you need to retrieve the vertex proxy if you want
+ to change the vertex settings.
+
+ .. attribute:: material_name
+
+ The name of polygon material, empty if no material.
+
+ :type: string
+
+ .. attribute:: material
+
+ The material of the polygon.
+
+ :type: :class:`KX_PolygonMaterial` or :class:`KX_BlenderMaterial`
+
+ .. attribute:: texture_name
+
+ The texture name of the polygon.
+
+ :type: string
+
+ .. attribute:: material_id
+
+ The material index of the polygon, use this to retrieve vertex proxy from mesh proxy.
+
+ :type: integer
+
+ .. attribute:: v1
+
+ vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
+
+ :type: integer
+
+ .. attribute:: v2
+
+ vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
+
+ :type: integer
+
+ .. attribute:: v3
+
+ vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
+
+ :type: integer
+
+ .. attribute:: v4
+
+ Vertex index of the fourth vertex of the polygon, 0 if polygon has only 3 vertex
+ Use this to retrieve vertex proxy from mesh proxy.
+
+ :type: integer
+
+ .. attribute:: visible
+
+ visible state of the polygon: 1=visible, 0=invisible.
+
+ :type: integer
+
+ .. attribute:: collide
+
+ collide state of the polygon: 1=receives collision, 0=collision free.
+
+ :type: integer
+
+ .. method:: getMaterialName()
+
+ Returns the polygon material name with MA prefix
+
+ :return: material name
+ :rtype: string
+
+ .. method:: getMaterial()
+
+ :return: The polygon material
+ :rtype: :class:`KX_PolygonMaterial` or :class:`KX_BlenderMaterial`
+
+ .. method:: getTextureName()
+
+ :return: The texture name
+ :rtype: string
+
+ .. method:: getMaterialIndex()
+
+ Returns the material bucket index of the polygon.
+ This index and the ones returned by getVertexIndex() are needed to retrieve the vertex proxy from :class:`MeshProxy`.
+
+ :return: the material index in the mesh
+ :rtype: integer
+
+ .. method:: getNumVertex()
+
+ Returns the number of vertex of the polygon.
+
+ :return: number of vertex, 3 or 4.
+ :rtype: integer
+
+ .. method:: isVisible()
+
+ Returns whether the polygon is visible or not
+
+ :return: 0=invisible, 1=visible
+ :rtype: boolean
+
+ .. method:: isCollider()
+
+ Returns whether the polygon is receives collision or not
+
+ :return: 0=collision free, 1=receives collision
+ :rtype: integer
+
+ .. method:: getVertexIndex(vertex)
+
+ Returns the mesh vertex index of a polygon vertex
+ This index and the one returned by getMaterialIndex() are needed to retrieve the vertex proxy from :class:`MeshProxy`.
+
+ :arg vertex: index of the vertex in the polygon: 0->3
+ :arg vertex: integer
+ :return: mesh vertex index
+ :rtype: integer
+
+ .. method:: getMesh()
+
+ Returns a mesh proxy
+
+ :return: mesh proxy
+ :rtype: :class:`MeshProxy`
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_PolygonMaterial.rst b/doc/python_api/rst/bge_types/bge.types.KX_PolygonMaterial.rst
new file mode 100644
index 00000000000..3421e194d77
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_PolygonMaterial.rst
@@ -0,0 +1,250 @@
+KX_PolygonMaterial(PyObjectPlus)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: KX_PolygonMaterial(PyObjectPlus)
+
+ This is the interface to materials in the game engine.
+
+ Materials define the render state to be applied to mesh objects.
+
+ .. warning::
+
+ Some of the methods/variables are CObjects. If you mix these up, you will crash blender.
+
+ .. code-block:: python
+
+ from bge import logic
+
+ vertex_shader = """
+
+ void main(void)
+ {
+ // original vertex position, no changes
+ gl_Position = ftransform();
+ // coordinate of the 1st texture channel
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ // coordinate of the 2nd texture channel
+ gl_TexCoord[1] = gl_MultiTexCoord1;
+ }
+ """
+
+ fragment_shader ="""
+
+ uniform sampler2D color_0;
+ uniform sampler2D color_1;
+ uniform float factor;
+
+ void main(void)
+ {
+ vec4 color_0 = texture2D(color_0, gl_TexCoord[0].st);
+ vec4 color_1 = texture2D(color_1, gl_TexCoord[1].st);
+ gl_FragColor = mix(color_0, color_1, factor);
+ }
+ """
+
+ object = logic.getCurrentController().owner
+ object = cont.owner
+ for mesh in object.meshes:
+ for material in mesh.materials:
+ shader = material.getShader()
+ if shader != None:
+ if not shader.isValid():
+ shader.setSource(vertex_shader, fragment_shader, True)
+
+ # get the first texture channel of the material
+ shader.setSampler('color_0', 0)
+ # get the second texture channel of the material
+ shader.setSampler('color_1', 1)
+ # pass another uniform to the shader
+ shader.setUniform1f('factor', 0.3)
+
+
+ .. attribute:: texture
+
+ Texture name.
+
+ :type: string (read-only)
+
+ .. attribute:: gl_texture
+
+ OpenGL texture handle (eg for glBindTexture(GL_TEXTURE_2D, gl_texture).
+
+ :type: integer (read-only)
+
+ .. attribute:: material
+
+ Material name.
+
+ :type: string (read-only)
+
+ .. attribute:: tface
+
+ Texture face properties.
+
+ :type: CObject (read-only)
+
+ .. attribute:: tile
+
+ Texture is tiling.
+
+ :type: boolean
+
+ .. attribute:: tilexrep
+
+ Number of tile repetitions in x direction.
+
+ :type: integer
+
+ .. attribute:: tileyrep
+
+ Number of tile repetitions in y direction.
+
+ :type: integer
+
+ .. attribute:: drawingmode
+
+ Drawing mode for the material.
+ - 2 (drawingmode & 4) Textured
+ - 4 (drawingmode & 16) Light
+ - 14 (drawingmode & 16384) 3d Polygon Text.
+
+ :type: bitfield
+
+ .. attribute:: transparent
+
+ This material is transparent. All meshes with this
+ material will be rendered after non transparent meshes from back
+ to front.
+
+ :type: boolean
+
+ .. attribute:: zsort
+
+ Transparent polygons in meshes with this material will be sorted back to
+ front before rendering.
+ Non-Transparent polygons will be sorted front to back before rendering.
+
+ :type: boolean
+
+ .. attribute:: diffuse
+
+ The diffuse color of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
+
+ :type: list [r, g, b]
+
+ .. attribute:: specular
+
+ The specular color of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
+
+ :type: list [r, g, b]
+
+ .. attribute:: shininess
+
+ The shininess (specular exponent) of the material. 0.0 <= shininess <= 128.0.
+
+ :type: float
+
+ .. attribute:: specularity
+
+ The amount of specular of the material. 0.0 <= specularity <= 1.0.
+
+ :type: float
+
+ .. method:: updateTexture(tface, rasty)
+
+ Updates a realtime animation.
+
+ :arg tface: Texture face (eg mat.tface)
+ :type tface: CObject
+ :arg rasty: Rasterizer
+ :type rasty: CObject
+
+ .. method:: setTexture(tface)
+
+ Sets texture render state.
+
+ :arg tface: Texture face
+ :type tface: CObject
+
+ .. code-block:: python
+
+ mat.setTexture(mat.tface)
+
+ .. method:: activate(rasty, cachingInfo)
+
+ Sets material parameters for this object for rendering.
+
+ Material Parameters set:
+
+ #. Texture
+ #. Backface culling
+ #. Line drawing
+ #. Specular Colour
+ #. Shininess
+ #. Diffuse Colour
+ #. Polygon Offset.
+
+ :arg rasty: Rasterizer instance.
+ :type rasty: CObject
+ :arg cachingInfo: Material cache instance.
+ :type cachingInfo: CObject
+
+ .. method:: setCustomMaterial(material)
+
+ Sets the material state setup object.
+
+ Using this method, you can extend or completely replace the gameengine material
+ to do your own advanced multipass effects.
+
+ Use this method to register your material class. Instead of the normal material,
+ your class's activate method will be called just before rendering the mesh.
+ This should setup the texture, material, and any other state you would like.
+ It should return True to render the mesh, or False if you are finished. You should
+ clean up any state Blender does not set before returning False.
+
+ Activate Method Definition:
+
+ .. code-block:: python
+
+ def activate(self, rasty, cachingInfo, material):
+
+ :arg material: The material object.
+ :type material: instance
+
+ .. code-block:: python
+
+ class PyMaterial:
+ def __init__(self):
+ self.pass_no = -1
+
+ def activate(self, rasty, cachingInfo, material):
+ # Activate the material here.
+ #
+ # The activate method will be called until it returns False.
+ # Every time the activate method returns True the mesh will
+ # be rendered.
+ #
+ # rasty is a CObject for passing to material.updateTexture()
+ # and material.activate()
+ # cachingInfo is a CObject for passing to material.activate()
+ # material is the KX_PolygonMaterial instance this material
+ # was added to
+
+ # default material properties:
+ self.pass_no += 1
+ if self.pass_no == 0:
+ material.activate(rasty, cachingInfo)
+ # Return True to do this pass
+ return True
+
+ # clean up and return False to finish.
+ self.pass_no = -1
+ return False
+
+ # Create a new Python Material and pass it to the renderer.
+ mat.setCustomMaterial(PyMaterial())
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_RadarSensor.rst b/doc/python_api/rst/bge_types/bge.types.KX_RadarSensor.rst
new file mode 100644
index 00000000000..4274c1142f4
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_RadarSensor.rst
@@ -0,0 +1,44 @@
+KX_RadarSensor(KX_NearSensor)
+=============================
+
+.. module:: bge.types
+
+base class --- :class:`KX_NearSensor`
+
+.. class:: KX_RadarSensor(KX_NearSensor)
+
+ Radar sensor is a near sensor with a conical sensor object.
+
+ .. attribute:: coneOrigin
+
+ The origin of the cone with which to test. The origin is in the middle of the cone. (read-only).
+
+ :type: list of floats [x, y, z]
+
+ .. attribute:: coneTarget
+
+ The center of the bottom face of the cone with which to test. (read-only).
+
+ :type: list of floats [x, y, z]
+
+ .. attribute:: distance
+
+ The height of the cone with which to test.
+
+ :type: float
+
+ .. attribute:: angle
+
+ The angle of the cone (in degrees) with which to test.
+
+ :type: float
+
+ .. attribute:: axis
+
+ The axis on which the radar cone is cast.
+
+ :type: integer from 0 to 5
+
+ KX_RADAR_AXIS_POS_X, KX_RADAR_AXIS_POS_Y, KX_RADAR_AXIS_POS_Z,
+ KX_RADAR_AXIS_NEG_X, KX_RADAR_AXIS_NEG_Y, KX_RADAR_AXIS_NEG_Z
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_RaySensor.rst b/doc/python_api/rst/bge_types/bge.types.KX_RaySensor.rst
new file mode 100644
index 00000000000..2ff989729f5
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_RaySensor.rst
@@ -0,0 +1,72 @@
+KX_RaySensor(SCA_ISensor)
+=========================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: KX_RaySensor(SCA_ISensor)
+
+ A ray sensor detects the first object in a given direction.
+
+ .. attribute:: propName
+
+ The property the ray is looking for.
+
+ :type: string
+
+ .. attribute:: range
+
+ The distance of the ray.
+
+ :type: float
+
+ .. attribute:: useMaterial
+
+ Whether or not to look for a material (false = property).
+
+ :type: boolean
+
+ .. attribute:: useXRay
+
+ Whether or not to use XRay.
+
+ :type: boolean
+
+ .. attribute:: hitObject
+
+ The game object that was hit by the ray. (read-only).
+
+ :type: :class:`KX_GameObject`
+
+ .. attribute:: hitPosition
+
+ The position (in worldcoordinates) where the object was hit by the ray. (read-only).
+
+ :type: list [x, y, z]
+
+ .. attribute:: hitNormal
+
+ The normal (in worldcoordinates) of the object at the location where the object was hit by the ray. (read-only).
+
+ :type: list [x, y, z]
+
+ .. attribute:: rayDirection
+
+ The direction from the ray (in worldcoordinates). (read-only).
+
+ :type: list [x, y, z]
+
+ .. attribute:: axis
+
+ The axis the ray is pointing on.
+
+ :type: integer from 0 to 5
+
+ * KX_RAY_AXIS_POS_X
+ * KX_RAY_AXIS_POS_Y
+ * KX_RAY_AXIS_POS_Z
+ * KX_RAY_AXIS_NEG_X
+ * KX_RAY_AXIS_NEG_Y
+ * KX_RAY_AXIS_NEG_Z
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_SCA_AddObjectActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_SCA_AddObjectActuator.rst
new file mode 100644
index 00000000000..fecc863909d
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_SCA_AddObjectActuator.rst
@@ -0,0 +1,55 @@
+KX_SCA_AddObjectActuator(SCA_IActuator)
+=======================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_SCA_AddObjectActuator(SCA_IActuator)
+
+ Edit Object Actuator (in Add Object Mode)
+
+ .. warning::
+
+ An Add Object actuator will be ignored if at game start, the linked object doesn't exist (or is empty) or the linked object is in an active layer.
+
+ .. code-block:: none
+
+ Error: GameObject 'Name' has a AddObjectActuator 'ActuatorName' without object (in 'nonactive' layer)
+
+ .. attribute:: object
+
+ the object this actuator adds.
+
+ :type: :class:`KX_GameObject` or None
+
+ .. attribute:: objectLastCreated
+
+ the last added object from this actuator (read-only).
+
+ :type: :class:`KX_GameObject` or None
+
+ .. attribute:: time
+
+ the lifetime of added objects, in frames. Set to 0 to disable automatic deletion.
+
+ :type: integer
+
+ .. attribute:: linearVelocity
+
+ the initial linear velocity of added objects.
+
+ :type: list [vx, vy, vz]
+
+ .. attribute:: angularVelocity
+
+ the initial angular velocity of added objects.
+
+ :type: list [vx, vy, vz]
+
+ .. method:: instantAddObject()
+
+ adds the object without needing to calling SCA_PythonController.activate()
+
+ .. note:: Use objectLastCreated to get the newly created object.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_SCA_DynamicActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_SCA_DynamicActuator.rst
new file mode 100644
index 00000000000..055c4098253
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_SCA_DynamicActuator.rst
@@ -0,0 +1,29 @@
+KX_SCA_DynamicActuator(SCA_IActuator)
+=====================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_SCA_DynamicActuator(SCA_IActuator)
+
+ Dynamic Actuator.
+
+ .. attribute:: mode
+
+ :type: integer
+
+ the type of operation of the actuator, 0-4
+
+ * KX_DYN_RESTORE_DYNAMICS(0)
+ * KX_DYN_DISABLE_DYNAMICS(1)
+ * KX_DYN_ENABLE_RIGID_BODY(2)
+ * KX_DYN_DISABLE_RIGID_BODY(3)
+ * KX_DYN_SET_MASS(4)
+
+ .. attribute:: mass
+
+ the mass value for the KX_DYN_SET_MASS operation.
+
+ :type: float
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_SCA_EndObjectActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_SCA_EndObjectActuator.rst
new file mode 100644
index 00000000000..8d9221febb0
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_SCA_EndObjectActuator.rst
@@ -0,0 +1,13 @@
+KX_SCA_EndObjectActuator(SCA_IActuator)
+=======================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_SCA_EndObjectActuator(SCA_IActuator)
+
+ Edit Object Actuator (in End Object mode)
+
+ This actuator has no python methods.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_SCA_ReplaceMeshActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_SCA_ReplaceMeshActuator.rst
new file mode 100644
index 00000000000..137c63ea829
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_SCA_ReplaceMeshActuator.rst
@@ -0,0 +1,89 @@
+KX_SCA_ReplaceMeshActuator(SCA_IActuator)
+=========================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_SCA_ReplaceMeshActuator(SCA_IActuator)
+
+ Edit Object actuator, in Replace Mesh mode.
+
+ .. warning::
+
+ Replace mesh actuators will be ignored if at game start, the named mesh doesn't exist.
+
+ This will generate a warning in the console
+
+ .. code-block:: none
+
+ Error: GameObject 'Name' ReplaceMeshActuator 'ActuatorName' without object
+
+ .. code-block:: python
+
+ # Level-of-detail
+ # Switch a game object's mesh based on its depth in the camera view.
+ # +----------+ +-----------+ +-------------------------------------+
+ # | Always +-----+ Python +-----+ Edit Object (Replace Mesh) LOD.Mesh |
+ # +----------+ +-----------+ +-------------------------------------+
+ from bge import logic
+
+ # List detail meshes here
+ # Mesh (name, near, far)
+ # Meshes overlap so that they don't 'pop' when on the edge of the distance.
+ meshes = ((".Hi", 0.0, -20.0),
+ (".Med", -15.0, -50.0),
+ (".Lo", -40.0, -100.0)
+ )
+
+ cont = logic.getCurrentController()
+ object = cont.owner
+ actuator = cont.actuators["LOD." + obj.name]
+ camera = logic.getCurrentScene().active_camera
+
+ def Depth(pos, plane):
+ return pos[0]*plane[0] + pos[1]*plane[1] + pos[2]*plane[2] + plane[3]
+
+ # Depth is negative and decreasing further from the camera
+ depth = Depth(object.position, camera.world_to_camera[2])
+
+ newmesh = None
+ curmesh = None
+ # Find the lowest detail mesh for depth
+ for mesh in meshes:
+ if depth < mesh[1] and depth > mesh[2]:
+ newmesh = mesh
+ if "ME" + object.name + mesh[0] == actuator.getMesh():
+ curmesh = mesh
+
+ if newmesh != None and "ME" + object.name + newmesh[0] != actuator.mesh:
+ # The mesh is a different mesh - switch it.
+ # Check the current mesh is not a better fit.
+ if curmesh == None or curmesh[1] < depth or curmesh[2] > depth:
+ actuator.mesh = object.name + newmesh[0]
+ cont.activate(actuator)
+
+ .. attribute:: mesh
+
+ :class:`MeshProxy` or the name of the mesh that will replace the current one.
+
+ Set to None to disable actuator.
+
+ :type: :class:`MeshProxy` or None if no mesh is set
+
+ .. attribute:: useDisplayMesh
+
+ when true the displayed mesh is replaced.
+
+ :type: boolean
+
+ .. attribute:: usePhysicsMesh
+
+ when true the physics mesh is replaced.
+
+ :type: boolean
+
+ .. method:: instantReplaceMesh()
+
+ Immediately replace mesh without delay.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_Scene.rst b/doc/python_api/rst/bge_types/bge.types.KX_Scene.rst
new file mode 100644
index 00000000000..75630ae4d26
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_Scene.rst
@@ -0,0 +1,172 @@
+KX_Scene(PyObjectPlus)
+======================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: KX_Scene(PyObjectPlus)
+
+ An active scene that gives access to objects, cameras, lights and scene attributes.
+
+ The activity culling stuff is supposed to disable logic bricks when their owner gets too far
+ from the active camera. It was taken from some code lurking at the back of KX_Scene - who knows
+ what it does!
+
+ .. code-block:: python
+
+ from bge import logic
+
+ # get the scene
+ scene = logic.getCurrentScene()
+
+ # print all the objects in the scene
+ for object in scene.objects:
+ print(object.name)
+
+ # get an object named 'Cube'
+ object = scene.objects["Cube"]
+
+ # get the first object in the scene.
+ object = scene.objects[0]
+
+ .. code-block:: python
+
+ # Get the depth of an object in the camera view.
+ from bge import logic
+
+ object = logic.getCurrentController().owner
+ cam = logic.getCurrentScene().active_camera
+
+ # Depth is negative and decreasing further from the camera
+ depth = object.position[0]*cam.world_to_camera[2][0] + object.position[1]*cam.world_to_camera[2][1] + object.position[2]*cam.world_to_camera[2][2] + cam.world_to_camera[2][3]
+
+ @bug: All attributes are read only at the moment.
+
+ .. attribute:: name
+
+ The scene's name, (read-only).
+
+ :type: string
+
+ .. attribute:: objects
+
+ A list of objects in the scene, (read-only).
+
+ :type: :class:`CListValue` of :class:`KX_GameObject`
+
+ .. attribute:: objectsInactive
+
+ A list of objects on background layers (used for the addObject actuator), (read-only).
+
+ :type: :class:`CListValue` of :class:`KX_GameObject`
+
+ .. attribute:: lights
+
+ A list of lights in the scene, (read-only).
+
+ :type: :class:`CListValue` of :class:`KX_LightObject`
+
+ .. attribute:: cameras
+
+ A list of cameras in the scene, (read-only).
+
+ :type: :class:`CListValue` of :class:`KX_Camera`
+
+ .. attribute:: active_camera
+
+ The current active camera.
+
+ :type: :class:`KX_Camera`
+
+ .. note::
+
+ This can be set directly from python to avoid using the :class:`KX_SceneActuator`.
+
+ .. attribute:: suspended
+
+ True if the scene is suspended, (read-only).
+
+ :type: boolean
+
+ .. attribute:: activity_culling
+
+ True if the scene is activity culling.
+
+ :type: boolean
+
+ .. attribute:: activity_culling_radius
+
+ The distance outside which to do activity culling. Measured in manhattan distance.
+
+ :type: float
+
+ .. attribute:: dbvt_culling
+
+ True when Dynamic Bounding box Volume Tree is set (read-only).
+
+ :type: boolean
+
+ .. attribute:: pre_draw
+
+ A list of callables to be run before the render step.
+
+ :type: list
+
+ .. attribute:: post_draw
+
+ A list of callables to be run after the render step.
+
+ :type: list
+
+ .. attribute:: gravity
+
+ The scene gravity using the world x, y and z axis.
+
+ :type: list [fx, fy, fz]
+
+ .. method:: addObject(object, other, time=0)
+
+ Adds an object to the scene like the Add Object Actuator would.
+
+ :arg object: The object to add
+ :type object: :class:`KX_GameObject` or string
+ :arg other: The object's center to use when adding the object
+ :type other: :class:`KX_GameObject` or string
+ :arg time: The lifetime of the added object, in frames. A time of 0 means the object will last forever.
+ :type time: integer
+ :return: The newly added object.
+ :rtype: :class:`KX_GameObject`
+
+ .. method:: end()
+
+ Removes the scene from the game.
+
+ .. method:: restart()
+
+ Restarts the scene.
+
+ .. method:: replace(scene)
+
+ Replaces this scene with another one.
+
+ :arg scene: The name of the scene to replace this scene with.
+ :type scene: string
+
+ .. method:: suspend()
+
+ Suspends this scene.
+
+ .. method:: resume()
+
+ Resume this scene.
+
+ .. method:: get(key, default=None)
+
+ Return the value matching key, or the default value if its not found.
+ :return: The key value or a default.
+
+ .. method:: drawObstacleSimulation()
+
+ Draw debug visualization of obstacle simulation.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_SceneActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_SceneActuator.rst
new file mode 100644
index 00000000000..9d073ff5b19
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_SceneActuator.rst
@@ -0,0 +1,49 @@
+KX_SceneActuator(SCA_IActuator)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_SceneActuator(SCA_IActuator)
+
+ Scene Actuator logic brick.
+
+ .. warning::
+
+ Scene actuators that use a scene name will be ignored if at game start, the named scene doesn't exist or is empty
+
+ This will generate a warning in the console:
+
+ .. code-block:: none
+
+ Error: GameObject 'Name' has a SceneActuator 'ActuatorName' (SetScene) without scene
+
+ .. attribute:: scene
+
+ the name of the scene to change to/overlay/underlay/remove/suspend/resume.
+
+ :type: string
+
+ .. attribute:: camera
+
+ the camera to change to.
+
+ :type: :class:`KX_Camera` on read, string or :class:`KX_Camera` on write
+
+ .. note::
+
+ When setting the attribute, you can use either a :class:`KX_Camera` or the name of the camera.
+
+ .. attribute:: useRestart
+
+ Set flag to True to restart the sene.
+
+ :type: boolean
+
+ .. attribute:: mode
+
+ The mode of the actuator.
+
+ :type: integer from 0 to 5.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_SoundActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_SoundActuator.rst
new file mode 100644
index 00000000000..aa85bd663b8
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_SoundActuator.rst
@@ -0,0 +1,115 @@
+KX_SoundActuator(SCA_IActuator)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_SoundActuator(SCA_IActuator)
+
+ Sound Actuator.
+
+ The :data:`startSound`, :data:`pauseSound` and :data:`stopSound` do not require the actuator to be activated - they act instantly provided that the actuator has been activated once at least.
+
+ .. attribute:: volume
+
+ The volume (gain) of the sound.
+
+ :type: float
+
+ .. attribute:: time
+
+ The current position in the audio stream (in seconds).
+
+ :type: float
+
+ .. attribute:: pitch
+
+ The pitch of the sound.
+
+ :type: float
+
+ .. attribute:: mode
+
+ The operation mode of the actuator. Can be one of :ref:`these constants<logic-sound-actuator>`
+
+ :type: integer
+
+ .. attribute:: sound
+
+ The sound the actuator should play.
+
+ :type: Audaspace factory
+
+ .. attribute:: is3D
+
+ Whether or not the actuator should be using 3D sound. (read-only)
+
+ :type: boolean
+
+ .. attribute:: volume_maximum
+
+ The maximum gain of the sound, no matter how near it is.
+
+ :type: float
+
+ .. attribute:: volume_minimum
+
+ The minimum gain of the sound, no matter how far it is away.
+
+ :type: float
+
+ .. attribute:: distance_reference
+
+ The distance where the sound has a gain of 1.0.
+
+ :type: float
+
+ .. attribute:: distance_maximum
+
+ The maximum distance at which you can hear the sound.
+
+ :type: float
+
+ .. attribute:: attenuation
+
+ The influence factor on volume depending on distance.
+
+ :type: float
+
+ .. attribute:: cone_angle_inner
+
+ The angle of the inner cone.
+
+ :type: float
+
+ .. attribute:: cone_angle_outer
+
+ The angle of the outer cone.
+
+ :type: float
+
+ .. attribute:: cone_volume_outer
+
+ The gain outside the outer cone (the gain in the outer cone will be interpolated between this value and the normal gain in the inner cone).
+
+ :type: float
+
+ .. method:: startSound()
+
+ Starts the sound.
+
+ :return: None
+
+ .. method:: pauseSound()
+
+ Pauses the sound.
+
+ :return: None
+
+ .. method:: stopSound()
+
+ Stops the sound.
+
+ :return: None
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_StateActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_StateActuator.rst
new file mode 100644
index 00000000000..c9d08457cc6
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_StateActuator.rst
@@ -0,0 +1,29 @@
+KX_StateActuator(SCA_IActuator)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_StateActuator(SCA_IActuator)
+
+ State actuator changes the state mask of parent object.
+
+ .. attribute:: operation
+
+ Type of bit operation to be applied on object state mask.
+
+ You can use one of :ref:`these constants <state-actuator-operation>`
+
+ :type: integer
+
+ .. attribute:: mask
+
+ Value that defines the bits that will be modified by the operation.
+
+ The bits that are 1 in the mask will be updated in the object state.
+
+ The bits that are 0 are will be left unmodified expect for the Copy operation which copies the mask to the object state.
+
+ :type: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_SteeringActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_SteeringActuator.rst
new file mode 100644
index 00000000000..f0ce248f069
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_SteeringActuator.rst
@@ -0,0 +1,71 @@
+KX_SteeringActuator(SCA_IActuator)
+==================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_SteeringActuator(SCA_IActuator)
+
+ Steering Actuator for navigation.
+
+ .. attribute:: behavior
+
+ The steering behavior to use.
+
+ :type: one of :ref:`these constants <logic-steering-actuator>`
+
+ .. attribute:: velocity
+
+ Velocity magnitude
+
+ :type: float
+
+ .. attribute:: acceleration
+
+ Max acceleration
+
+ :type: float
+
+ .. attribute:: turnspeed
+
+ Max turn speed
+
+ :type: float
+
+ .. attribute:: distance
+
+ Relax distance
+
+ :type: float
+
+ .. attribute:: target
+
+ Target object
+
+ :type: :class:`KX_GameObject`
+
+ .. attribute:: navmesh
+
+ Navigation mesh
+
+ :type: :class:`KX_GameObject`
+
+ .. attribute:: selfterminated
+
+ Terminate when target is reached
+
+ :type: boolean
+
+ .. attribute:: enableVisualization
+
+ Enable debug visualization
+
+ :type: boolean
+
+ .. attribute:: pathUpdatePeriod
+
+ Path update period
+
+ :type: int
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_TouchSensor.rst b/doc/python_api/rst/bge_types/bge.types.KX_TouchSensor.rst
new file mode 100644
index 00000000000..fd8f319f6f3
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_TouchSensor.rst
@@ -0,0 +1,41 @@
+KX_TouchSensor(SCA_ISensor)
+===========================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: KX_TouchSensor(SCA_ISensor)
+
+ Touch sensor detects collisions between objects.
+
+ .. attribute:: propName
+
+ The property or material to collide with.
+
+ :type: string
+
+ .. attribute:: useMaterial
+
+ Determines if the sensor is looking for a property or material. KX_True = Find material; KX_False = Find property.
+
+ :type: boolean
+
+ .. attribute:: usePulseCollision
+
+ When enabled, changes to the set of colliding objects generate a pulse.
+
+ :type: boolean
+
+ .. attribute:: hitObject
+
+ The last collided object. (read-only).
+
+ :type: :class:`KX_GameObject` or None
+
+ .. attribute:: hitObjectList
+
+ A list of colliding objects. (read-only).
+
+ :type: :class:`CListValue` of :class:`KX_GameObject`
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst
new file mode 100644
index 00000000000..070243c6a05
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_TrackToActuator.rst
@@ -0,0 +1,39 @@
+KX_TrackToActuator(SCA_IActuator)
+=================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_TrackToActuator(SCA_IActuator)
+
+ Edit Object actuator in Track To mode.
+
+ .. warning::
+
+ Track To Actuators will be ignored if at game start, the object to track to is invalid.
+
+ This will generate a warning in the console:
+
+ .. code-block:: none
+
+ GameObject 'Name' no object in EditObjectActuator 'ActuatorName'
+
+ .. attribute:: object
+
+ the object this actuator tracks.
+
+ :type: :class:`KX_GameObject` or None
+
+ .. attribute:: time
+
+ the time in frames with which to delay the tracking motion.
+
+ :type: integer
+
+ .. attribute:: use3D
+
+ the tracking motion to use 3D.
+
+ :type: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_VehicleWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_VehicleWrapper.rst
new file mode 100644
index 00000000000..9340d33f8a9
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_VehicleWrapper.rst
@@ -0,0 +1,161 @@
+KX_VehicleWrapper(PyObjectPlus)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: KX_VehicleWrapper(PyObjectPlus)
+
+ KX_VehicleWrapper
+
+ TODO - description
+
+ .. method:: addWheel(wheel, attachPos, attachDir, axleDir, suspensionRestLength, wheelRadius, hasSteering)
+
+ Add a wheel to the vehicle
+
+ :arg wheel: The object to use as a wheel.
+ :type wheel: :class:`KX_GameObject` or a KX_GameObject name
+ :arg attachPos: The position that this wheel will attach to.
+ :type attachPos: vector of 3 floats
+ :arg attachDir: The direction this wheel points.
+ :type attachDir: vector of 3 floats
+ :arg axleDir: The direction of this wheels axle.
+ :type axleDir: vector of 3 floats
+ :arg suspensionRestLength: TODO - Description
+ :type suspensionRestLength: float
+ :arg wheelRadius: The size of the wheel.
+ :type wheelRadius: float
+
+ .. method:: applyBraking(force, wheelIndex)
+
+ Apply a braking force to the specified wheel
+
+ :arg force: the brake force
+ :type force: float
+
+ :arg wheelIndex: index of the wheel where the force needs to be applied
+ :type wheelIndex: integer
+
+ .. method:: applyEngineForce(force, wheelIndex)
+
+ Apply an engine force to the specified wheel
+
+ :arg force: the engine force
+ :type force: float
+
+ :arg wheelIndex: index of the wheel where the force needs to be applied
+ :type wheelIndex: integer
+
+ .. method:: getConstraintId()
+
+ Get the constraint ID
+
+ :return: the constraint id
+ :rtype: integer
+
+ .. method:: getConstraintType()
+
+ Returns the constraint type.
+
+ :return: constraint type
+ :rtype: integer
+
+ .. method:: getNumWheels()
+
+ Returns the number of wheels.
+
+ :return: the number of wheels for this vehicle
+ :rtype: integer
+
+ .. method:: getWheelOrientationQuaternion(wheelIndex)
+
+ Returns the wheel orientation as a quaternion.
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+
+ :return: TODO Description
+ :rtype: TODO - type should be quat as per method name but from the code it looks like a matrix
+
+ .. method:: getWheelPosition(wheelIndex)
+
+ Returns the position of the specified wheel
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+ :return: position vector
+ :rtype: list[x, y, z]
+
+ .. method:: getWheelRotation(wheelIndex)
+
+ Returns the rotation of the specified wheel
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+
+ :return: the wheel rotation
+ :rtype: float
+
+ .. method:: setRollInfluence(rollInfluece, wheelIndex)
+
+ Set the specified wheel's roll influence.
+ The higher the roll influence the more the vehicle will tend to roll over in corners.
+
+ :arg rollInfluece: the wheel roll influence
+ :type rollInfluece: float
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+
+ .. method:: setSteeringValue(steering, wheelIndex)
+
+ Set the specified wheel's steering
+
+ :arg steering: the wheel steering
+ :type steering: float
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+
+ .. method:: setSuspensionCompression(compression, wheelIndex)
+
+ Set the specified wheel's compression
+
+ :arg compression: the wheel compression
+ :type compression: float
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+
+ .. method:: setSuspensionDamping(damping, wheelIndex)
+
+ Set the specified wheel's damping
+
+ :arg damping: the wheel damping
+ :type damping: float
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+
+ .. method:: setSuspensionStiffness(stiffness, wheelIndex)
+
+ Set the specified wheel's stiffness
+
+ :arg stiffness: the wheel stiffness
+ :type stiffness: float
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+
+ .. method:: setTyreFriction(friction, wheelIndex)
+
+ Set the specified wheel's tyre friction
+
+ :arg friction: the tyre friction
+ :type friction: float
+
+ :arg wheelIndex: the wheel index
+ :type wheelIndex: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_VertexProxy.rst b/doc/python_api/rst/bge_types/bge.types.KX_VertexProxy.rst
new file mode 100644
index 00000000000..9c0d1169d49
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_VertexProxy.rst
@@ -0,0 +1,209 @@
+KX_VertexProxy(SCA_IObject)
+===========================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IObject`
+
+.. class:: KX_VertexProxy(SCA_IObject)
+
+ A vertex holds position, UV, color and normal information.
+
+ Note:
+ The physics simulation is NOT currently updated - physics will not respond
+ to changes in the vertex position.
+
+ .. attribute:: XYZ
+
+ The position of the vertex.
+
+ :type: list [x, y, z]
+
+ .. attribute:: UV
+
+ The texture coordinates of the vertex.
+
+ :type: list [u, v]
+
+ .. attribute:: normal
+
+ The normal of the vertex.
+
+ :type: list [nx, ny, nz]
+
+ .. attribute:: color
+
+ The color of the vertex.
+
+ :type: list [r, g, b, a]
+
+ Black = [0.0, 0.0, 0.0, 1.0], White = [1.0, 1.0, 1.0, 1.0]
+
+ .. attribute:: x
+
+ The x coordinate of the vertex.
+
+ :type: float
+
+ .. attribute:: y
+
+ The y coordinate of the vertex.
+
+ :type: float
+
+ .. attribute:: z
+
+ The z coordinate of the vertex.
+
+ :type: float
+
+ .. attribute:: u
+
+ The u texture coordinate of the vertex.
+
+ :type: float
+
+ .. attribute:: v
+
+ The v texture coordinate of the vertex.
+
+ :type: float
+
+ .. attribute:: u2
+
+ The second u texture coordinate of the vertex.
+
+ :type: float
+
+ .. attribute:: v2
+
+ The second v texture coordinate of the vertex.
+
+ :type: float
+
+ .. attribute:: r
+
+ The red component of the vertex color. 0.0 <= r <= 1.0.
+
+ :type: float
+
+ .. attribute:: g
+
+ The green component of the vertex color. 0.0 <= g <= 1.0.
+
+ :type: float
+
+ .. attribute:: b
+
+ The blue component of the vertex color. 0.0 <= b <= 1.0.
+
+ :type: float
+
+ .. attribute:: a
+
+ The alpha component of the vertex color. 0.0 <= a <= 1.0.
+
+ :type: float
+
+ .. method:: getXYZ()
+
+ Gets the position of this vertex.
+
+ :return: this vertexes position in local coordinates.
+ :rtype: list [x, y, z]
+
+ .. method:: setXYZ(pos)
+
+ Sets the position of this vertex.
+
+ :type: list [x, y, z]
+
+ :arg pos: the new position for this vertex in local coordinates.
+
+ .. method:: getUV()
+
+ Gets the UV (texture) coordinates of this vertex.
+
+ :return: this vertexes UV (texture) coordinates.
+ :rtype: list [u, v]
+
+ .. method:: setUV(uv)
+
+ Sets the UV (texture) coordinates of this vertex.
+
+ :type: list [u, v]
+
+ .. method:: getUV2()
+
+ Gets the 2nd UV (texture) coordinates of this vertex.
+
+ :return: this vertexes UV (texture) coordinates.
+ :rtype: list [u, v]
+
+ .. method:: setUV2(uv, unit)
+
+ Sets the 2nd UV (texture) coordinates of this vertex.
+
+ :type: list [u, v]
+
+ :arg unit: optional argument, FLAT==1, SECOND_UV==2, defaults to SECOND_UV
+ :arg unit: integer
+
+ .. method:: getRGBA()
+
+ Gets the color of this vertex.
+
+ The color is represented as four bytes packed into an integer value. The color is
+ packed as RGBA.
+
+ Since Python offers no way to get each byte without shifting, you must use the struct module to
+ access color in an machine independent way.
+
+ Because of this, it is suggested you use the r, g, b and a attributes or the color attribute instead.
+
+ .. code-block:: python
+
+ import struct;
+ col = struct.unpack('4B', struct.pack('I', v.getRGBA()))
+ # col = (r, g, b, a)
+ # black = ( 0, 0, 0, 255)
+ # white = (255, 255, 255, 255)
+
+ :return: packed color. 4 byte integer with one byte per color channel in RGBA format.
+ :rtype: integer
+
+ .. method:: setRGBA(col)
+
+ Sets the color of this vertex.
+
+ See getRGBA() for the format of col, and its relevant problems. Use the r, g, b and a attributes
+ or the color attribute instead.
+
+ setRGBA() also accepts a four component list as argument col. The list represents the color as [r, g, b, a]
+ with black = [0.0, 0.0, 0.0, 1.0] and white = [1.0, 1.0, 1.0, 1.0]
+
+ .. code-block:: python
+
+ v.setRGBA(0xff0000ff) # Red
+ v.setRGBA(0xff00ff00) # Green on little endian, transparent purple on big endian
+ v.setRGBA([1.0, 0.0, 0.0, 1.0]) # Red
+ v.setRGBA([0.0, 1.0, 0.0, 1.0]) # Green on all platforms.
+
+ :arg col: the new color of this vertex in packed RGBA format.
+ :type col: integer or list [r, g, b, a]
+
+ .. method:: getNormal()
+
+ Gets the normal vector of this vertex.
+
+ :return: normalized normal vector.
+ :rtype: list [nx, ny, nz]
+
+ .. method:: setNormal(normal)
+
+ Sets the normal vector of this vertex.
+
+ :type: sequence of floats [r, g, b]
+
+ :arg normal: the new normal of this vertex.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_VisibilityActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_VisibilityActuator.rst
new file mode 100644
index 00000000000..4beb6539e0e
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.KX_VisibilityActuator.rst
@@ -0,0 +1,29 @@
+KX_VisibilityActuator(SCA_IActuator)
+====================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: KX_VisibilityActuator(SCA_IActuator)
+
+ Visibility Actuator.
+
+ .. attribute:: visibility
+
+ whether the actuator makes its parent object visible or invisible.
+
+ :type: boolean
+
+ .. attribute:: useOcclusion
+
+ whether the actuator makes its parent object an occluder or not.
+
+ :type: boolean
+
+ .. attribute:: useRecursion
+
+ whether the visibility/occlusion should be propagated to all children of the object.
+
+ :type: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.PyObjectPlus.rst b/doc/python_api/rst/bge_types/bge.types.PyObjectPlus.rst
new file mode 100644
index 00000000000..e035f457a96
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.PyObjectPlus.rst
@@ -0,0 +1,21 @@
+PyObjectPlus
+============
+
+.. module:: bge.types
+
+.. class:: PyObjectPlus
+
+ PyObjectPlus base class of most other types in the Game Engine.
+
+ .. attribute:: invalid
+
+ Test if the object has been freed by the game engine and is no longer valid.
+
+ Normally this is not a problem but when storing game engine data in the GameLogic module,
+ KX_Scenes or other KX_GameObjects its possible to hold a reference to invalid data.
+ Calling an attribute or method on an invalid object will raise a SystemError.
+
+ The invalid attribute allows testing for this case without exception handling.
+
+ :type: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_2DFilterActuator.rst b/doc/python_api/rst/bge_types/bge.types.SCA_2DFilterActuator.rst
new file mode 100644
index 00000000000..291ee8426cf
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_2DFilterActuator.rst
@@ -0,0 +1,49 @@
+SCA_2DFilterActuator(SCA_IActuator)
+===================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: SCA_2DFilterActuator(SCA_IActuator)
+
+ Create, enable and disable 2D filters
+
+ The following properties don't have an immediate effect.
+ You must active the actuator to get the result.
+ The actuator is not persistent: it automatically stops itself after setting up the filter
+ but the filter remains active. To stop a filter you must activate the actuator with 'type'
+ set to :data:`~bge.logic.RAS_2DFILTER_DISABLED` or :data:`~bge.logic.RAS_2DFILTER_NOFILTER`.
+
+ .. attribute:: shaderText
+
+ shader source code for custom shader.
+
+ :type: string
+
+ .. attribute:: disableMotionBlur
+
+ action on motion blur: 0=enable, 1=disable.
+
+ :type: integer
+
+ .. attribute:: mode
+
+ Type of 2D filter, use one of :ref:`these constants <Two-D-FilterActuator-mode>`
+
+ :type: integer
+
+ .. attribute:: passNumber
+
+ order number of filter in the stack of 2D filters. Filters are executed in increasing order of passNb.
+
+ Only be one filter can be defined per passNb.
+
+ :type: integer (0-100)
+
+ .. attribute:: value
+
+ argument for motion blur filter.
+
+ :type: float (0.0-100.0)
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_ANDController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_ANDController.rst
new file mode 100644
index 00000000000..0942f715231
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_ANDController.rst
@@ -0,0 +1,13 @@
+SCA_ANDController(SCA_IController)
+==================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IController`
+
+.. class:: SCA_ANDController(SCA_IController)
+
+ An AND controller activates only when all linked sensors are activated.
+
+ There are no special python methods for this controller.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_ActuatorSensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_ActuatorSensor.rst
new file mode 100644
index 00000000000..54916389298
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_ActuatorSensor.rst
@@ -0,0 +1,19 @@
+SCA_ActuatorSensor(SCA_ISensor)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: SCA_ActuatorSensor(SCA_ISensor)
+
+ Actuator sensor detect change in actuator state of the parent object.
+ It generates a positive pulse if the corresponding actuator is activated
+ and a negative pulse if the actuator is deactivated.
+
+ .. attribute:: actuator
+
+ the name of the actuator that the sensor is monitoring.
+
+ :type: string
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_AlwaysSensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_AlwaysSensor.rst
new file mode 100644
index 00000000000..a217b114d62
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_AlwaysSensor.rst
@@ -0,0 +1,11 @@
+SCA_AlwaysSensor(SCA_ISensor)
+=============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: SCA_AlwaysSensor(SCA_ISensor)
+
+ This sensor is always activated.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_DelaySensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_DelaySensor.rst
new file mode 100644
index 00000000000..ce2b8e52eec
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_DelaySensor.rst
@@ -0,0 +1,39 @@
+SCA_DelaySensor(SCA_ISensor)
+============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: SCA_DelaySensor(SCA_ISensor)
+
+ The Delay sensor generates positive and negative triggers at precise time,
+ expressed in number of frames. The delay parameter defines the length of the initial OFF period. A positive trigger is generated at the end of this period.
+
+ The duration parameter defines the length of the ON period following the OFF period.
+ There is a negative trigger at the end of the ON period. If duration is 0, the sensor stays ON and there is no negative trigger.
+
+ The sensor runs the OFF-ON cycle once unless the repeat option is set: the OFF-ON cycle repeats indefinately (or the OFF cycle if duration is 0).
+
+ Use :class:`SCA_ISensor.reset` at any time to restart sensor.
+
+ .. attribute:: delay
+
+ length of the initial OFF period as number of frame, 0 for immediate trigger.
+
+ :type: integer.
+
+ .. attribute:: duration
+
+ length of the ON period in number of frame after the initial OFF period.
+
+ If duration is greater than 0, a negative trigger is sent at the end of the ON pulse.
+
+ :type: integer
+
+ .. attribute:: repeat
+
+ 1 if the OFF-ON cycle should be repeated indefinately, 0 if it should run once.
+
+ :type: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_IActuator.rst b/doc/python_api/rst/bge_types/bge.types.SCA_IActuator.rst
new file mode 100644
index 00000000000..1432d5166ef
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_IActuator.rst
@@ -0,0 +1,11 @@
+SCA_IActuator(SCA_ILogicBrick)
+==============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ILogicBrick`
+
+.. class:: SCA_IActuator(SCA_ILogicBrick)
+
+ Base class for all actuator logic bricks.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_IController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_IController.rst
new file mode 100644
index 00000000000..5eb225ed329
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_IController.rst
@@ -0,0 +1,55 @@
+SCA_IController(SCA_ILogicBrick)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ILogicBrick`
+
+.. class:: SCA_IController(SCA_ILogicBrick)
+
+ Base class for all controller logic bricks.
+
+ .. attribute:: state
+
+ The controllers state bitmask. This can be used with the GameObject's state to test if the controller is active.
+
+ :type: int bitmask
+
+ .. attribute:: sensors
+
+ A list of sensors linked to this controller.
+
+ :type: sequence supporting index/string lookups and iteration.
+
+ .. note::
+
+ The sensors are not necessarily owned by the same object.
+
+ .. note::
+
+ When objects are instanced in dupligroups links may be lost from objects outside the dupligroup.
+
+ .. attribute:: actuators
+
+ A list of actuators linked to this controller.
+
+ :type: sequence supporting index/string lookups and iteration.
+
+ .. note::
+
+ The sensors are not necessarily owned by the same object.
+
+ .. note::
+
+ When objects are instanced in dupligroups links may be lost from objects outside the dupligroup.
+
+ .. attribute:: useHighPriority
+
+ When set the controller executes always before all other controllers that dont have this set.
+
+ :type: boolen
+
+ .. note::
+
+ Order of execution between high priority controllers is not guaranteed.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_ILogicBrick.rst b/doc/python_api/rst/bge_types/bge.types.SCA_ILogicBrick.rst
new file mode 100644
index 00000000000..5ed44c4bb38
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_ILogicBrick.rst
@@ -0,0 +1,29 @@
+SCA_ILogicBrick(CValue)
+=======================
+
+.. module:: bge.types
+
+base class --- :class:`CValue`
+
+.. class:: SCA_ILogicBrick(CValue)
+
+ Base class for all logic bricks.
+
+ .. attribute:: executePriority
+
+ This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first).
+
+ :type: executePriority: int
+
+ .. attribute:: owner
+
+ The game object this logic brick is attached to (read-only).
+
+ :type: :class:`KX_GameObject` or None in exceptional cases.
+
+ .. attribute:: name
+
+ The name of this logic brick (read-only).
+
+ :type: string
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_IObject.rst b/doc/python_api/rst/bge_types/bge.types.SCA_IObject.rst
new file mode 100644
index 00000000000..22065944542
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_IObject.rst
@@ -0,0 +1,11 @@
+SCA_IObject(CValue)
+===================
+
+.. module:: bge.types
+
+base class --- :class:`CValue`
+
+.. class:: SCA_IObject(CValue)
+
+ This class has no python functions
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_ISensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_ISensor.rst
new file mode 100644
index 00000000000..9efd2e2d63a
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_ISensor.rst
@@ -0,0 +1,95 @@
+SCA_ISensor(SCA_ILogicBrick)
+============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ILogicBrick`
+
+.. class:: SCA_ISensor(SCA_ILogicBrick)
+
+ Base class for all sensor logic bricks.
+
+ .. attribute:: usePosPulseMode
+
+ Flag to turn positive pulse mode on and off.
+
+ :type: boolean
+
+ .. attribute:: useNegPulseMode
+
+ Flag to turn negative pulse mode on and off.
+
+ :type: boolean
+
+ .. attribute:: frequency
+
+ The frequency for pulse mode sensors.
+
+ :type: integer
+
+ .. attribute:: level
+
+ level Option whether to detect level or edge transition when entering a state.
+ It makes a difference only in case of logic state transition (state actuator).
+ A level detector will immediately generate a pulse, negative or positive
+ depending on the sensor condition, as soon as the state is activated.
+ A edge detector will wait for a state change before generating a pulse.
+ note: mutually exclusive with :data:`tap`, enabling will disable :data:`tap`.
+
+ :type: boolean
+
+ .. attribute:: tap
+
+ When enabled only sensors that are just activated will send a positive event,
+ after this they will be detected as negative by the controllers.
+ This will make a key thats held act as if its only tapped for an instant.
+ note: mutually exclusive with :data:`level`, enabling will disable :data:`level`.
+
+ :type: boolean
+
+ .. attribute:: invert
+
+ Flag to set if this sensor activates on positive or negative events.
+
+ :type: boolean
+
+ .. attribute:: triggered
+
+ True if this sensor brick is in a positive state. (read-only).
+
+ :type: boolean
+
+ .. attribute:: positive
+
+ True if this sensor brick is in a positive state. (read-only).
+
+ :type: boolean
+
+ .. attribute:: pos_ticks
+
+ The number of ticks since the last positive pulse (read-only).
+
+ :type: int
+
+ .. attribute:: neg_ticks
+
+ The number of ticks since the last negative pulse (read-only).
+
+ :type: int
+
+ .. attribute:: status
+
+ The status of the sensor (read-only): can be one of :ref:`these constants<sensor-status>`.
+
+ :type: int
+
+ .. note::
+
+ This convenient attribute combines the values of triggered and positive attributes.
+
+ .. method:: reset()
+
+ Reset sensor internal state, effect depends on the type of sensor and settings.
+
+ The sensor is put in its initial state as if it was just activated.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_JoystickSensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_JoystickSensor.rst
new file mode 100644
index 00000000000..5b6628f60be
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_JoystickSensor.rst
@@ -0,0 +1,133 @@
+SCA_JoystickSensor(SCA_ISensor)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: SCA_JoystickSensor(SCA_ISensor)
+
+ This sensor detects player joystick events.
+
+ .. attribute:: axisValues
+
+ The state of the joysticks axis as a list of values :data:`numAxis` long. (read-only).
+
+ :type: list of ints.
+
+ Each specifying the value of an axis between -32767 and 32767 depending on how far the axis is pushed, 0 for nothing.
+ The first 2 values are used by most joysticks and gamepads for directional control. 3rd and 4th values are only on some joysticks and can be used for arbitary controls.
+
+ * left:[-32767, 0, ...]
+ * right:[32767, 0, ...]
+ * up:[0, -32767, ...]
+ * down:[0, 32767, ...]
+
+ .. attribute:: axisSingle
+
+ like :data:`axisValues` but returns a single axis value that is set by the sensor. (read-only).
+
+ :type: integer
+
+ .. note::
+
+ Only use this for "Single Axis" type sensors otherwise it will raise an error.
+
+ .. attribute:: hatValues
+
+ The state of the joysticks hats as a list of values :data:`numHats` long. (read-only).
+
+ :type: list of ints
+
+ Each specifying the direction of the hat from 1 to 12, 0 when inactive.
+
+ Hat directions are as follows...
+
+ * 0:None
+ * 1:Up
+ * 2:Right
+ * 4:Down
+ * 8:Left
+ * 3:Up - Right
+ * 6:Down - Right
+ * 12:Down - Left
+ * 9:Up - Left
+
+ .. attribute:: hatSingle
+
+ Like :data:`hatValues` but returns a single hat direction value that is set by the sensor. (read-only).
+
+ :type: integer
+
+ .. attribute:: numAxis
+
+ The number of axes for the joystick at this index. (read-only).
+
+ :type: integer
+
+ .. attribute:: numButtons
+
+ The number of buttons for the joystick at this index. (read-only).
+
+ :type: integer
+
+ .. attribute:: numHats
+
+ The number of hats for the joystick at this index. (read-only).
+
+ :type: integer
+
+ .. attribute:: connected
+
+ True if a joystick is connected at this joysticks index. (read-only).
+
+ :type: boolean
+
+ .. attribute:: index
+
+ The joystick index to use (from 0 to 7). The first joystick is always 0.
+
+ :type: integer
+
+ .. attribute:: threshold
+
+ Axis threshold. Joystick axis motion below this threshold wont trigger an event. Use values between (0 and 32767), lower values are more sensitive.
+
+ :type: integer
+
+ .. attribute:: button
+
+ The button index the sensor reacts to (first button = 0). When the "All Events" toggle is set, this option has no effect.
+
+ :type: integer
+
+ .. attribute:: axis
+
+ The axis this sensor reacts to, as a list of two values [axisIndex, axisDirection]
+
+ * axisIndex: the axis index to use when detecting axis movement, 1=primary directional control, 2=secondary directional control.
+ * axisDirection: 0=right, 1=up, 2=left, 3=down.
+
+ :type: [integer, integer]
+
+ .. attribute:: hat
+
+ The hat the sensor reacts to, as a list of two values: [hatIndex, hatDirection]
+
+ * hatIndex: the hat index to use when detecting hat movement, 1=primary hat, 2=secondary hat (4 max).
+ * hatDirection: 1-12.
+
+ :type: [integer, integer]
+
+ .. method:: getButtonActiveList()
+
+ :return: A list containing the indicies of the currently pressed buttons.
+ :rtype: list
+
+ .. method:: getButtonStatus(buttonIndex)
+
+ :arg buttonIndex: the button index, 0=first button
+ :type buttonIndex: integer
+ :return: The current pressed state of the specified button.
+ :rtype: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_KeyboardSensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_KeyboardSensor.rst
new file mode 100644
index 00000000000..91613068ad0
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_KeyboardSensor.rst
@@ -0,0 +1,64 @@
+SCA_KeyboardSensor(SCA_ISensor)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: SCA_KeyboardSensor(SCA_ISensor)
+
+ A keyboard sensor detects player key presses.
+
+ See module :mod:`bge.events` for keycode values.
+
+ .. attribute:: key
+
+ The key code this sensor is looking for.
+
+ :type: keycode from :mod:`bge.events` module
+
+ .. attribute:: hold1
+
+ The key code for the first modifier this sensor is looking for.
+
+ :type: keycode from :mod:`bge.events` module
+
+ .. attribute:: hold2
+
+ The key code for the second modifier this sensor is looking for.
+
+ :type: keycode from :mod:`bge.events` module
+
+ .. attribute:: toggleProperty
+
+ The name of the property that indicates whether or not to log keystrokes as a string.
+
+ :type: string
+
+ .. attribute:: targetProperty
+
+ The name of the property that receives keystrokes in case in case a string is logged.
+
+ :type: string
+
+ .. attribute:: useAllKeys
+
+ Flag to determine whether or not to accept all keys.
+
+ :type: boolean
+
+ .. attribute:: events
+
+ a list of pressed keys that have either been pressed, or just released, or are active this frame. (read-only).
+
+ :type: list [[:ref:`keycode<keyboard-keys>`, :ref:`status<input-status>`], ...]
+
+ .. method:: getKeyStatus(keycode)
+
+ Get the status of a key.
+
+ :arg keycode: The code that represents the key you want to get the state of, use one of :ref:`these constants<keyboard-keys>`
+ :type keycode: integer
+ :return: The state of the given key, can be one of :ref:`these constants<input-status>`
+ :rtype: int
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_MouseSensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_MouseSensor.rst
new file mode 100644
index 00000000000..bbc695e4cbf
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_MouseSensor.rst
@@ -0,0 +1,39 @@
+SCA_MouseSensor(SCA_ISensor)
+============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: SCA_MouseSensor(SCA_ISensor)
+
+ Mouse Sensor logic brick.
+
+ .. attribute:: position
+
+ current [x, y] coordinates of the mouse, in frame coordinates (pixels).
+
+ :type: [integer, interger]
+
+ .. attribute:: mode
+
+ sensor mode.
+
+ :type: integer
+
+ * KX_MOUSESENSORMODE_LEFTBUTTON(1)
+ * KX_MOUSESENSORMODE_MIDDLEBUTTON(2)
+ * KX_MOUSESENSORMODE_RIGHTBUTTON(3)
+ * KX_MOUSESENSORMODE_WHEELUP(4)
+ * KX_MOUSESENSORMODE_WHEELDOWN(5)
+ * KX_MOUSESENSORMODE_MOVEMENT(6)
+
+ .. method:: getButtonStatus(button)
+
+ Get the mouse button status.
+
+ :arg button: The code that represents the key you want to get the state of, use one of :ref:`these constants<mouse-keys>`
+ :type button: int
+ :return: The state of the given key, can be one of :ref:`these constants<input-status>`
+ :rtype: int
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_NANDController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_NANDController.rst
new file mode 100644
index 00000000000..4bd67fb22ee
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_NANDController.rst
@@ -0,0 +1,13 @@
+SCA_NANDController(SCA_IController)
+===================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IController`
+
+.. class:: SCA_NANDController(SCA_IController)
+
+ An NAND controller activates when all linked sensors are not active.
+
+ There are no special python methods for this controller.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_NORController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_NORController.rst
new file mode 100644
index 00000000000..5a567c84ece
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_NORController.rst
@@ -0,0 +1,13 @@
+SCA_NORController(SCA_IController)
+==================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IController`
+
+.. class:: SCA_NORController(SCA_IController)
+
+ An NOR controller activates only when all linked sensors are de-activated.
+
+ There are no special python methods for this controller.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_ORController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_ORController.rst
new file mode 100644
index 00000000000..ed57b0dbaf2
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_ORController.rst
@@ -0,0 +1,13 @@
+SCA_ORController(SCA_IController)
+=================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IController`
+
+.. class:: SCA_ORController(SCA_IController)
+
+ An OR controller activates when any connected sensor activates.
+
+ There are no special python methods for this controller.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_PropertyActuator.rst b/doc/python_api/rst/bge_types/bge.types.SCA_PropertyActuator.rst
new file mode 100644
index 00000000000..36a4ea7fefe
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_PropertyActuator.rst
@@ -0,0 +1,29 @@
+SCA_PropertyActuator(SCA_IActuator)
+===================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: SCA_PropertyActuator(SCA_IActuator)
+
+ Property Actuator
+
+ .. attribute:: propName
+
+ the property on which to operate.
+
+ :type: string
+
+ .. attribute:: value
+
+ the value with which the actuator operates.
+
+ :type: string
+
+ .. attribute:: mode
+
+ TODO - add constants to game logic dict!.
+
+ :type: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_PropertySensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_PropertySensor.rst
new file mode 100644
index 00000000000..3c41e4679db
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_PropertySensor.rst
@@ -0,0 +1,41 @@
+SCA_PropertySensor(SCA_ISensor)
+===============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: SCA_PropertySensor(SCA_ISensor)
+
+ Activates when the game object property matches.
+
+ .. attribute:: mode
+
+ Type of check on the property. Can be one of :ref:`these constants <logic-property-sensor>`
+
+ :type: integer.
+
+ .. attribute:: propName
+
+ the property the sensor operates.
+
+ :type: string
+
+ .. attribute:: value
+
+ the value with which the sensor compares to the value of the property.
+
+ :type: string
+
+ .. attribute:: min
+
+ the minimum value of the range used to evaluate the property when in interval mode.
+
+ :type: string
+
+ .. attribute:: max
+
+ the maximum value of the range used to evaluate the property when in interval mode.
+
+ :type: string
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst
new file mode 100644
index 00000000000..a00e9c29ad4
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_PythonController.rst
@@ -0,0 +1,48 @@
+SCA_PythonController(SCA_IController)
+=====================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IController`
+
+.. class:: SCA_PythonController(SCA_IController)
+
+ A Python controller uses a Python script to activate it's actuators,
+ based on it's sensors.
+
+ .. attribute:: script
+
+ The value of this variable depends on the execution methid.
+
+ * When 'Script' execution mode is set this value contains the entire python script as a single string (not the script name as you might expect) which can be modified to run different scripts.
+ * When 'Module' execution mode is set this value will contain a single line string - module name and function "module.func" or "package.modile.func" where the module names are python textblocks or external scripts.
+
+ :type: string
+
+ .. note::
+
+ Once this is set the script name given for warnings will remain unchanged.
+
+ .. attribute:: mode
+
+ the execution mode for this controller (read-only).
+
+ * Script: 0, Execite the :data:`script` as a python code.
+ * Module: 1, Execite the :data:`script` as a module and function.
+
+ :type: integer
+
+ .. method:: activate(actuator)
+
+ Activates an actuator attached to this controller.
+
+ :arg actuator: The actuator to operate on.
+ :type actuator: actuator or the actuator name as a string
+
+ .. method:: deactivate(actuator)
+
+ Deactivates an actuator attached to this controller.
+
+ :arg actuator: The actuator to operate on.
+ :type actuator: actuator or the actuator name as a string
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_PythonJoystick.rst b/doc/python_api/rst/bge_types/bge.types.SCA_PythonJoystick.rst
new file mode 100644
index 00000000000..2b97b5939e2
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_PythonJoystick.rst
@@ -0,0 +1,75 @@
+SCA_PythonJoystick(PyObjectPlus)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: SCA_PythonJoystick(PyObjectPlus)
+
+ A Python interface to a joystick.
+
+ .. attribute:: name
+
+ The name assigned to the joystick by the operating system. (read-only)
+
+ :type: string
+
+ .. attribute:: activeButtons
+
+ A list of active button values. (read-only)
+
+ :type: list
+
+ .. attribute:: axisValues
+
+ The state of the joysticks axis as a list of values :data:`numAxis` long. (read-only).
+
+ :type: list of ints.
+
+ Each specifying the value of an axis between -1.0 and 1.0 depending on how far the axis is pushed, 0 for nothing.
+ The first 2 values are used by most joysticks and gamepads for directional control. 3rd and 4th values are only on some joysticks and can be used for arbitary controls.
+
+ * left:[-1.0, 0.0, ...]
+ * right:[1.0, 0.0, ...]
+ * up:[0.0, -1.0, ...]
+ * down:[0.0, 1.0, ...]
+
+ .. attribute:: hatValues
+
+ The state of the joysticks hats as a list of values :data:`numHats` long. (read-only).
+
+ :type: list of ints
+
+ Each specifying the direction of the hat from 1 to 12, 0 when inactive.
+
+ Hat directions are as follows...
+
+ * 0:None
+ * 1:Up
+ * 2:Right
+ * 4:Down
+ * 8:Left
+ * 3:Up - Right
+ * 6:Down - Right
+ * 12:Down - Left
+ * 9:Up - Left
+
+ .. attribute:: numAxis
+
+ The number of axes for the joystick at this index. (read-only).
+
+ :type: integer
+
+ .. attribute:: numButtons
+
+ The number of buttons for the joystick at this index. (read-only).
+
+ :type: integer
+
+ .. attribute:: numHats
+
+ The number of hats for the joystick at this index. (read-only).
+
+ :type: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst b/doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst
new file mode 100644
index 00000000000..6cfef2f80f1
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_PythonKeyboard.rst
@@ -0,0 +1,37 @@
+SCA_PythonKeyboard(PyObjectPlus)
+================================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: SCA_PythonKeyboard(PyObjectPlus)
+
+ The current keyboard.
+
+ .. attribute:: events
+
+ A dictionary containing the status of each keyboard event or key. (read-only).
+
+ :type: dictionary {:ref:`keycode<keyboard-keys>`::ref:`status<input-status>`, ...}
+
+ .. attribute:: active_events
+
+ A dictionary containing the status of only the active keyboard events or keys. (read-only).
+
+ :type: dictionary {:ref:`keycode<keyboard-keys>`::ref:`status<input-status>`, ...}
+
+
+ .. function:: getClipboard()
+
+ Gets the clipboard text.
+
+ :rtype: string
+
+ .. function:: setClipboard(text)
+
+ Sets the clipboard text.
+
+ :arg text: New clipboard text
+ :type text: string
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_PythonMouse.rst b/doc/python_api/rst/bge_types/bge.types.SCA_PythonMouse.rst
new file mode 100644
index 00000000000..b1c6e5d1487
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_PythonMouse.rst
@@ -0,0 +1,35 @@
+SCA_PythonMouse(PyObjectPlus)
+=============================
+
+.. module:: bge.types
+
+base class --- :class:`PyObjectPlus`
+
+.. class:: SCA_PythonMouse(PyObjectPlus)
+
+ The current mouse.
+
+ .. attribute:: events
+
+ a dictionary containing the status of each mouse event. (read-only).
+
+ :type: dictionary {:ref:`keycode<mouse-keys>`::ref:`status<input-status>`, ...}
+
+ .. attribute:: active_events
+
+ a dictionary containing the status of only the active mouse events. (read-only).
+
+ :type: dictionary {:ref:`keycode<mouse-keys>`::ref:`status<input-status>`, ...}
+
+ .. attribute:: position
+
+ The normalized x and y position of the mouse cursor.
+
+ :type: list [x, y]
+
+ .. attribute:: visible
+
+ The visibility of the mouse cursor.
+
+ :type: boolean
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst b/doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst
new file mode 100644
index 00000000000..68357229262
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst
@@ -0,0 +1,127 @@
+SCA_RandomActuator(SCA_IActuator)
+=================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: SCA_RandomActuator(SCA_IActuator)
+
+ Random Actuator
+
+ .. attribute:: seed
+
+ Seed of the random number generator.
+
+ :type: integer.
+
+ Equal seeds produce equal series. If the seed is 0, the generator will produce the same value on every call.
+
+ .. attribute:: para1
+
+ the first parameter of the active distribution.
+
+ :type: float, read-only.
+
+ Refer to the documentation of the generator types for the meaning of this value.
+
+ .. attribute:: para2
+
+ the second parameter of the active distribution.
+
+ :type: float, read-only
+
+ Refer to the documentation of the generator types for the meaning of this value.
+
+ .. attribute:: distribution
+
+ Distribution type. (read-only). Can be one of :ref:`these constants <logic-random-distributions>`
+
+ :type: integer
+
+ .. attribute:: propName
+
+ the name of the property to set with the random value.
+
+ :type: string
+
+ If the generator and property types do not match, the assignment is ignored.
+
+ .. method:: setBoolConst(value)
+
+ Sets this generator to produce a constant boolean value.
+
+ :arg value: The value to return.
+ :type value: boolean
+
+ .. method:: setBoolUniform()
+
+ Sets this generator to produce a uniform boolean distribution.
+
+ The generator will generate True or False with 50% chance.
+
+ .. method:: setBoolBernouilli(value)
+
+ Sets this generator to produce a Bernouilli distribution.
+
+ :arg value: Specifies the proportion of False values to produce.
+
+ * 0.0: Always generate True
+ * 1.0: Always generate False
+ :type value: float
+
+ .. method:: setIntConst(value)
+
+ Sets this generator to always produce the given value.
+
+ :arg value: the value this generator produces.
+ :type value: integer
+
+ .. method:: setIntUniform(lower_bound, upper_bound)
+
+ Sets this generator to produce a random value between the given lower and
+ upper bounds (inclusive).
+
+ :type lower_bound: integer
+ :type upper_bound: integer
+
+ .. method:: setIntPoisson(value)
+
+ Generate a Poisson-distributed number.
+
+ This performs a series of Bernouilli tests with parameter value.
+ It returns the number of tries needed to achieve succes.
+
+ :type value: float
+
+ .. method:: setFloatConst(value)
+
+ Always generate the given value.
+
+ :type value: float
+
+ .. method:: setFloatUniform(lower_bound, upper_bound)
+
+ Generates a random float between lower_bound and upper_bound with a
+ uniform distribution.
+
+ :type lower_bound: float
+ :type upper_bound: float
+
+ .. method:: setFloatNormal(mean, standard_deviation)
+
+ Generates a random float from the given normal distribution.
+
+ :arg mean: The mean (average) value of the generated numbers
+ :type mean: float
+ :arg standard_deviation: The standard deviation of the generated numbers.
+ :type standard_deviation: float
+
+ .. method:: setFloatNegativeExponential(half_life)
+
+ Generate negative-exponentially distributed numbers.
+
+ The half-life 'time' is characterized by half_life.
+
+ :type half_life: float
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_RandomSensor.rst b/doc/python_api/rst/bge_types/bge.types.SCA_RandomSensor.rst
new file mode 100644
index 00000000000..05e61ccf118
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_RandomSensor.rst
@@ -0,0 +1,23 @@
+SCA_RandomSensor(SCA_ISensor)
+=============================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_ISensor`
+
+.. class:: SCA_RandomSensor(SCA_ISensor)
+
+ This sensor activates randomly.
+
+ .. attribute:: lastDraw
+
+ The seed of the random number generator.
+
+ :type: integer
+
+ .. attribute:: seed
+
+ The seed of the random number generator.
+
+ :type: integer
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_XNORController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_XNORController.rst
new file mode 100644
index 00000000000..d0235f29a20
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_XNORController.rst
@@ -0,0 +1,13 @@
+SCA_XNORController(SCA_IController)
+===================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IController`
+
+.. class:: SCA_XNORController(SCA_IController)
+
+ An XNOR controller activates when all linked sensors are the same (activated or inative).
+
+ There are no special python methods for this controller.
+
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_XORController.rst b/doc/python_api/rst/bge_types/bge.types.SCA_XORController.rst
new file mode 100644
index 00000000000..98ccf142f63
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_XORController.rst
@@ -0,0 +1,13 @@
+SCA_XORController(SCA_IController)
+==================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IController`
+
+.. class:: SCA_XORController(SCA_IController)
+
+ An XOR controller activates when there is the input is mixed, but not when all are on or off.
+
+ There are no special python methods for this controller.
+
diff --git a/doc/python_api/rst/info_tutorial_addon.rst b/doc/python_api/rst/info_tutorial_addon.rst
index 2a101041227..5637cf2f638 100644
--- a/doc/python_api/rst/info_tutorial_addon.rst
+++ b/doc/python_api/rst/info_tutorial_addon.rst
@@ -486,16 +486,14 @@ using :kbd:`Ctrl-Shift-Space` as the key shortcut to activate it.
kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
kmi.properties.total = 4
- addon_keymaps.append(km)
+ addon_keymaps.append((km, kmi))
def unregister():
# handle the keymap
- wm = bpy.context.window_manager
- for km in addon_keymaps:
- wm.keyconfigs.addon.keymaps.remove(km)
- # clear the list
+ for km, kmi in addon_keymaps:
+ km.keymap_items.remove(kmi)
addon_keymaps.clear()
@@ -568,18 +566,16 @@ Bringing it all together
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
kmi.properties.total = 4
- addon_keymaps.append(km)
+ addon_keymaps.append((km, kmi))
def unregister():
bpy.utils.unregister_class(ObjectCursorArray)
bpy.types.VIEW3D_MT_object.remove(menu_func)
# handle the keymap
- wm = bpy.context.window_manager
- for km in addon_keymaps:
- wm.keyconfigs.addon.keymaps.remove(km)
- # clear the list
- del addon_keymaps[:]
+ for km, kmi in addon_keymaps:
+ km.keymap_items.remove(kmi)
+ addon_keymaps.clear()
if __name__ == "__main__":
diff --git a/doc/python_api/rst_from_bmesh_opdefines.py b/doc/python_api/rst_from_bmesh_opdefines.py
index c1b6643389d..3776ef7ce56 100644
--- a/doc/python_api/rst_from_bmesh_opdefines.py
+++ b/doc/python_api/rst_from_bmesh_opdefines.py
@@ -65,10 +65,10 @@ def main():
fsrc = open(FILE_OP_DEFINES_C, 'r', encoding="utf-8")
blocks = []
-
+
is_block = False
is_comment = False # /* global comments only */
-
+
comment_ctx = None
block_ctx = None
@@ -82,7 +82,7 @@ def main():
elif l.strip().startswith("/*"):
is_comment = True
comment_ctx = []
-
+
if is_block:
if l.strip().startswith("//"):
pass
@@ -93,11 +93,11 @@ def main():
l = l[:cpp_comment]
block_ctx.append(l)
-
+
if l.strip() == "};":
is_block = False
comment_ctx = None
-
+
if is_comment:
c_comment_start = l.find("/*")
if c_comment_start != -1:
@@ -113,7 +113,6 @@ def main():
fsrc.close()
del fsrc
-
# namespace hack
vars = (
"BMO_OP_SLOT_ELEMENT_BUF",
@@ -124,7 +123,7 @@ def main():
"BMO_OP_SLOT_VEC",
"BMO_OP_SLOT_PTR",
"BMO_OP_SLOT_MAPPING",
-
+
"BMO_OP_SLOT_SUBTYPE_MAP_ELEM",
"BMO_OP_SLOT_SUBTYPE_MAP_BOOL",
"BMO_OP_SLOT_SUBTYPE_MAP_INT",
@@ -157,23 +156,23 @@ def main():
for comment, b in blocks:
# magic, translate into python
b[0] = b[0].replace("static BMOpDefine ", "")
-
+
for i, l in enumerate(b):
l = l.strip()
l = l.replace("{", "(")
l = l.replace("}", ")")
-
+
if l.startswith("/*"):
l = l.replace("/*", "'''own <")
else:
l = l.replace("/*", "'''inline <")
l = l.replace("*/", ">''',")
-
+
# exec func. eg: bmo_rotate_edges_exec,
if l.startswith("bmo_") and l.endswith("_exec,"):
l = "None,"
b[i] = l
-
+
#for l in b:
# print(l)
@@ -182,7 +181,7 @@ def main():
"__file__": "generated",
"__name__": "__main__",
}
-
+
global_namespace.update(vars_dict)
text_a, text_b = text.split("=", 1)
@@ -191,7 +190,6 @@ def main():
# print(global_namespace["result"])
blocks_py.append((comment, global_namespace["result"]))
-
# ---------------------
# Now convert into rst.
fout = open(OUT_RST, 'w', encoding="utf-8")
@@ -217,7 +215,7 @@ def main():
args_out_index[:] = [i for (i, a) in enumerate(args_out) if type(a) == tuple]
fw(".. function:: %s(bm, %s)\n\n" % (b[0], ", ".join([args_in[i][0] for i in args_in_index])))
-
+
# -- wash the comment
comment_washed = []
for i, l in enumerate(comment):
@@ -236,7 +234,6 @@ def main():
fw("\n")
# -- done
-
# get the args
def get_args_wash(args, args_index, is_ret):
args_wash = []
@@ -268,7 +265,7 @@ def main():
comment_next = comment_next[8:-1] # strip inline <...>
else:
comment_next = ""
-
+
comment = ""
if comment_prev:
comment += comment_prev.strip()
@@ -304,18 +301,21 @@ def main():
elif tp == BMO_OP_SLOT_ELEMENT_BUF:
assert(tp_sub is not None)
-
+
ls = []
- if tp_sub & BM_VERT: ls.append(":class:`bmesh.types.BMVert`")
- if tp_sub & BM_EDGE: ls.append(":class:`bmesh.types.BMEdge`")
- if tp_sub & BM_FACE: ls.append(":class:`bmesh.types.BMFace`")
+ if tp_sub & BM_VERT:
+ ls.append(":class:`bmesh.types.BMVert`")
+ if tp_sub & BM_EDGE:
+ ls.append(":class:`bmesh.types.BMEdge`")
+ if tp_sub & BM_FACE:
+ ls.append(":class:`bmesh.types.BMFace`")
assert(ls) # must be at least one
if tp_sub & BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE:
tp_str = "/".join(ls)
else:
tp_str = ("list of (%s)" % ", ".join(ls))
-
+
del ls
elif tp == BMO_OP_SLOT_MAPPING:
if tp_sub & BMO_OP_SLOT_SUBTYPE_MAP_EMPTY:
@@ -356,21 +356,21 @@ def main():
fw(" :arg %s: %s\n" % (name, comment))
fw(" :type %s: %s\n" % (name, tp))
-
+
if args_out_wash:
fw(" :return:\n\n")
-
+
for (name, tp, comment) in args_out_wash:
assert(name.endswith(".out"))
name = name[:-4]
fw(" - ``%s``: %s\n\n" % (name, comment))
fw(" **type** %s\n" % tp)
-
+
fw("\n")
fw(" :rtype: dict with string keys\n")
fw("\n\n")
-
+
fout.close()
del fout
print(OUT_RST)
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 441a6c04efe..72e92e5855f 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -262,6 +262,7 @@ else:
"mathutils",
"mathutils.geometry",
"mathutils.noise",
+ "Freestyle",
]
# ------
@@ -449,6 +450,7 @@ if ARGS.sphinx_build_pdf:
ClassMethodDescriptorType = type(dict.__dict__['fromkeys'])
MethodDescriptorType = type(dict.get)
GetSetDescriptorType = type(int.real)
+StaticMethodType = type(staticmethod(lambda: None))
from types import MemberDescriptorType
_BPY_STRUCT_FAKE = "bpy_struct"
@@ -612,6 +614,10 @@ def pyfunc2sphinx(ident, fw, identifier, py_func, is_class=True):
'''
function or class method to sphinx
'''
+
+ if type(py_func) == type(bpy.types.Space.draw_handler_add):
+ return
+
arg_str = inspect.formatargspec(*inspect.getargspec(py_func))
if not is_class:
@@ -692,6 +698,8 @@ def pyprop2sphinx(ident, fw, identifier, py_prop):
write_indented_lines(ident + " ", fw, py_prop.__doc__)
if py_prop.fset is None:
fw(ident + " (readonly)\n\n")
+ else:
+ fw("\n")
def pymodule2sphinx(basepath, module_name, module, title):
@@ -909,6 +917,12 @@ def pymodule2sphinx(basepath, module_name, module, title):
if type(descr) == GetSetDescriptorType:
py_descr2sphinx(" ", fw, descr, module_name, type_name, key)
+ for key, descr in descr_items:
+ if type(descr) == StaticMethodType:
+ descr = getattr(value, key)
+ write_indented_lines(" ", fw, descr.__doc__ or "Undocumented", False)
+ fw("\n")
+
fw("\n\n")
file.close()
@@ -980,6 +994,7 @@ context_type_map = {
"world": ("World", False),
}
+
def pycontext2sphinx(basepath):
# Only use once. very irregular
@@ -1007,7 +1022,6 @@ def pycontext2sphinx(basepath):
"sequencer_context_dir",
)
-
unique = set()
blend_cdll = ctypes.CDLL("")
for ctx_str in context_strings:
@@ -1477,7 +1491,9 @@ def write_sphinx_conf_py(basepath):
def execfile(filepath):
global_namespace = {"__file__": filepath, "__name__": "__main__"}
- exec(compile(open(filepath).read(), filepath, 'exec'), global_namespace)
+ file_handle = open(filepath)
+ exec(compile(file_handle.read(), filepath, 'exec'), global_namespace)
+ file_handle.close()
def write_rst_contents(basepath):
@@ -1539,7 +1555,7 @@ def write_rst_contents(basepath):
# mathutils
"mathutils", "mathutils.geometry", "mathutils.noise",
# misc
- "bgl", "blf", "gpu", "aud", "bpy_extras",
+ "Freestyle", "bgl", "blf", "gpu", "aud", "bpy_extras",
# bmesh, submodules are in own page
"bmesh",
)
@@ -1687,6 +1703,7 @@ def write_rst_importable_modules(basepath):
"mathutils" : "Math Types & Utilities",
"mathutils.geometry": "Geometry Utilities",
"mathutils.noise" : "Noise Utilities",
+ "Freestyle" : "Freestyle Data Types & Operators",
}
for mod_name, mod_descr in importable_modules.items():
if mod_name not in EXCLUDE_MODULES:
@@ -1704,7 +1721,6 @@ def copy_handwritten_rsts(basepath):
# TODO put this docs in blender's code and use import as per modules above
handwritten_modules = [
- "bge.types",
"bge.logic",
"bge.render",
"bge.texture",
@@ -1723,6 +1739,14 @@ def copy_handwritten_rsts(basepath):
# copy2 keeps time/date stamps
shutil.copy2(os.path.join(RST_DIR, "%s.rst" % mod_name), basepath)
+ if "bge.types" not in EXCLUDE_MODULES:
+ shutil.copy2(os.path.join(RST_DIR, "bge.types.rst"), basepath)
+
+ bge_types_dir = os.path.join(RST_DIR, "bge_types")
+
+ for i in os.listdir(bge_types_dir):
+ shutil.copy2(os.path.join(bge_types_dir, i), basepath)
+
# changelog
shutil.copy2(os.path.join(RST_DIR, "change_log.rst"), basepath)
@@ -1810,8 +1834,19 @@ def refactor_sphinx_log(sphinx_logfile):
refactored_logfile.write("%-12s %s\n %s\n" % log)
+def monkey_patch():
+ filepath = os.path.join(SCRIPT_DIR, "sphinx_doc_gen_monkeypatch.py")
+ global_namespace = {"__file__": filepath, "__name__": "__main__"}
+ file = open(filepath, 'rb')
+ exec(compile(file.read(), filepath, 'exec'), global_namespace)
+ file.close()
+
+
def main():
+ # first monkey patch to load in fake members
+ monkey_patch()
+
# eventually, create the dirs
for dir_path in [ARGS.output_dir, SPHINX_IN]:
if not os.path.exists(dir_path):
diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh
index 92461961920..14919f678be 100755
--- a/doc/python_api/sphinx_doc_gen.sh
+++ b/doc/python_api/sphinx_doc_gen.sh
@@ -32,8 +32,7 @@ blender_version_char=$(grep BLENDER_VERSION_CHAR $blender_srcdir/source/blender/
blender_version_cycle=$(grep BLENDER_VERSION_CYCLE $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
-if [ "$blender_version_cycle" == "release" ]
-then
+if [ "$blender_version_cycle" == "release" ] ; then
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)$blender_version_char"_release"
else
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)_$blender_subversion
@@ -109,6 +108,11 @@ if $DO_UPLOAD ; then
# better redirect
ssh $SSH_USER@emo.blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/250PythonDoc/index.html'
+ # redirect for release only so wiki can point here
+ if [ "$blender_version_cycle" == "release" ] ; then
+ ssh $SSH_USER@emo.blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/blender_python_api/index.html'
+ fi
+
if $DO_OUT_PDF ; then
# rename so local PDF has matching name.
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
diff --git a/doc/python_api/sphinx_doc_gen_monkeypatch.py b/doc/python_api/sphinx_doc_gen_monkeypatch.py
new file mode 100644
index 00000000000..1167ece05b7
--- /dev/null
+++ b/doc/python_api/sphinx_doc_gen_monkeypatch.py
@@ -0,0 +1,47 @@
+ # ***** BEGIN GPL LICENSE BLOCK *****
+ #
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License
+ # as published by the Free Software Foundation; either version 2
+ # of the License, or (at your option) any later version.
+ #
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software Foundation,
+ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #
+ # Contributor(s): Campbell Barton
+ #
+ # #**** END GPL LICENSE BLOCK #****
+
+# <pep8 compliant>
+
+bpy_types_Operator_bl_property__doc__ = (
+"""
+The name of a property to use as this operators primary property.
+Currently this is only used to select the default property when
+expanding an operator into a menu.
+:type: string
+""")
+
+
+def main():
+ import bpy
+ from bpy.types import Operator
+
+ def dummy_func(test):
+ pass
+
+ kw_dummy = dict(fget=dummy_func, fset=dummy_func, fdel=dummy_func)
+
+ # bpy registration handles this,
+ # but its only checked for and not existing in the base class.
+ Operator.bl_property = property(doc=bpy_types_Operator_bl_property__doc__, **kw_dummy)
+
+
+if __name__ == "__main__":
+ main()