Commit Graph

13 Commits

Author SHA1 Message Date
Campbell Barton
3038fb1a01 [#18606] Writing to KX_GameObject.orientation causes crash
Own bug, conversion function to get an orientation from python - PyOrientationTo() ignored user input completely :| (breaking the orientation attribute)

Also made KX_GameObject worldOrientation writable and minor doc fixes.
2009-04-25 07:17:36 +00:00
Campbell Barton
dee32d0b3f BGE Python API
- initialize pythons sys.argv in the blenderplayer
- ignore all arguments after a single " - " in the blenderplayer (like in blender), so args can be passed to the game.
- add a utility function PyOrientationTo() - to take a Py euler, quat or 3x3 matrix and convert into a C++ MT_Matrix3x3.
- add utility function ConvertPythonToMesh to get a RAS_MeshObject from a KX_MeshProxy or a name.
- Added error prefix arguments to ConvertPythonToGameObject, ConvertPythonToMesh and PyOrientationTo so the error messages can include what function they came from.
- deprecated brick.getOwner() for the "owner" attribute.
2009-04-20 09:13:59 +00:00
Campbell Barton
53e721305e BGE Python API
- made camera use PyAttributeDef's
- removed unneeded duplicate matrix type checks
- fixed own bug (added since 2.48a) that broke a converting 4x4 matrix to a PyObject
2009-04-05 06:08:41 +00:00
Campbell Barton
5488175d0b BGE Python API
* fixed segfaults in CListValue.index(val) and CListValue.count(val) when the pyTypes could not be converted into a CValue.
* added scene.objects to replace scene.getObjectList()
* added function names to PyArg_ParseTuple() so errors will include the function names 
* removed cases of PyArg_ParseTuple(args,"O",&pyobj) where METH_O ensures a single argument.
* Made PyObjectFrom use ugly python api rather then Py_BuildValue(), approx %40 speedup for functions that return Python vector and matrix types like ob.orientation.
2009-02-23 06:41:10 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
Jean-Luc Peurière
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
Kent Mein
48bc598658 More warning cleanups...
added a casts to:
   blender/blenlib/intern/BLI_memarena.c
   gameengine/Rasterizer/RAS_TexVert.cpp

Removed unused vars from:
   blender/python/api2_2x/vector.c
   gameengine/Ketsji/KX_PyMath.cpp gameengine/Ketsji/KX_Scene.cpp
   gameengine/Physics/Sumo/Fuzzics/src/SM_Object.cpp
   gameengine/Rasterizer/RAS_FramingManager.cpp
   gameengine/Rasterizer/RAS_Polygon.cpp
   gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp

Kent
2005-01-03 18:05:24 +00:00
Kester Maddock
3d8a485fb9 Fixed PyObject_IsMT_Matrix 2004-09-18 06:03:15 +00:00
Kester Maddock
baa2f99f07 Port Python updates from Tuhopuu2:
getType/setType to action/sound actuator (sgefant)
Use a more generic python -> math conversion.
2004-07-17 05:28:23 +00:00
Kester Maddock
d38329b5aa Added Python module for Lights.
Added attributes to the vertex class.
2004-05-30 11:09:46 +00:00
Kester Maddock
8253d3e041 Python fixes:
Reenabled the setScript/getScript methods for python controller bricks.
Set the ray source point to MouseFocusSensor.getRaySource works.
Added: Python -> MT_Quaternion
MT_Matrix4x4, MT_Matrix3x3, MT_Vector3, MT_Point3 -> Python

Correct transform of frustum bound sphere centre point to world coordinates
2004-05-26 12:09:17 +00:00
Kester Maddock
1217928e66 Fixes for Camera objects and python:
Normalise clip planes for sphere testing.
Do a frustum-sphere <-> sphere test
Reference count all python objects (!)
2004-05-21 09:18:42 +00:00
Kester Maddock
3e6b05f607 Python utils for Python <-> MT_Vector, MT_Point & MT_Matrix 2004-05-16 12:53:54 +00:00