Commit Graph

15107 Commits

Author SHA1 Message Date
Benoit Bolsee
b0cca7de26 BGE API cleanup: StateActuator. 2009-04-09 21:15:44 +00:00
Benoit Bolsee
09a5ffdf07 BGE API cleanup: sound actuator. 2009-04-09 20:40:12 +00:00
Campbell Barton
4669fa48a8 Added GameKeys.EventToCharacter(event, is_shift) so you can get the character that would be types when pressing a key.
Last commit was made in the pydocs folder only, so this includes changes mentioned in rev 19620.
2009-04-09 16:00:45 +00:00
Campbell Barton
e14e66f041 BGE Py API
- added keyboard senser attribute "events" to replace getEventList()
- fix 2 memory leaks in the python api (was making a list but not returning it)
- setting readonly attributes didnt give a good error message.
2009-04-09 12:53:56 +00:00
Benoit Bolsee
3be2b8995e Remove redundant include GL/glu.h in KX_Dome.cpp. 2009-04-09 10:29:07 +00:00
Campbell Barton
65f65a729a key logging didnt work for alphanum keys -=_+ and |\ since revision 2 and nobody noticed! 2009-04-09 10:28:14 +00:00
Campbell Barton
c29d51f1e8 BGE Text - fix for tab drawing as an @ and not adding white space.
Tab width is always space*4.
2009-04-09 10:05:17 +00:00
Campbell Barton
eacf5b5d6d BGE Text
- multi-line strings for bitmap text 
- keyboard sensor now logs return and pad enter as "\n"

BGE std::vector use in Value.cpp and RAS_MaterialBucket.cpp
The size of a new list is known before making them, reduce re-allocs, though probably not a noticeable speedup.
2009-04-09 09:50:17 +00:00
Campbell Barton
ba4ad93ead Python 2.3 wouldn't compile with BGL. 2009-04-09 01:52:29 +00:00
Benoit Bolsee
5b0d75e831 BGE API cleanup: 2DFilterActuator. 2009-04-08 21:40:55 +00:00
Benoit Bolsee
24f1355d4f Fix gcc compiling problem with C++ syntax in KX_Dome.cpp. 2009-04-08 20:10:27 +00:00
Campbell Barton
1ee970e03b small bge edits
- Only try and remove light objects from the light list.
- Only loop over mesh verts once when getting the bounding box
- dont return None from python attribute localInertia when theres no physics objects. better return a vector still.
- add names to send message PyArg_ParseTuple functions.
2009-04-08 17:40:09 +00:00
Benoit Bolsee
db33320df7 BGE patch #18350: Add sendMessage() to GameLogic. Added sendMessage to both GameLogic and KX_GameObject. 2009-04-08 16:57:08 +00:00
Benoit Bolsee
370850146f BGE patch #18051: add localInertia attribute to GameObject. 2009-04-08 16:25:00 +00:00
Benoit Bolsee
2074128fad Patch #18462: Fisheye (Dome) and Spherical Panoramic mode in BGE.
User guide:
http://wiki.blender.org/index.php/Dev:Source/GameEngine/Fisheye_Dome_Camera

Fixed two bugs from original patch:
- deleting a text will clear the warp field from Game framing settings
- removed spurious black dots along the edge of the cube map in the gameplayer 

Known limitation:
- resizing of the screen doesn't work in the gameplayer

Known bugs:
- Texture with reflexion are not rendered correctly
- Spurious problems with light
2009-04-08 15:06:20 +00:00
Benoit Bolsee
4b77f9504c Fixed scons and cmake after BGE scenegraph and culling improvements. 2009-04-08 08:22:03 +00:00
Campbell Barton
e063682ed3 gcc wouldn't compile using a reference 2009-04-07 23:21:30 +00:00
Benoit Bolsee
51b4145841 BGE Scenegraph and View frustrum culling improvement.
This commit contains a number of performance improvements for the
BGE in the Scenegraph (parent relation between objects in the
scene) and view frustrum culling.

The scenegraph improvement consists in avoiding position update
if the object has not moved since last update and the removal
of redundant updates and synchronization with the physics engine.

The view frustrum culling improvement consists in using the DBVT
broadphase facility of Bullet to build a tree of graphical objects
in the scene. The elements of the tree are Aabb boxes (Aligned 
Axis Bounding Boxes) enclosing the objects. This provides good
precision in closed and opened scenes. This new culling system
is enabled by default but just in case, it can be disabled with
a button in the World settings. There is no do_version in this
commit but it will be added before the 2.49 release. For now you
must manually enable the DBVT culling option in World settings
when you open an old file.

The above improvements speed up scenegraph and culling up to 5x.
However, this performance improvement is only visible when
you have hundreds or thousands of objects.

The main interest of the DBVT tree is to allow easy occlusion
culling and automatic LOD system. This will be the object of further
improvements.
2009-04-07 22:14:06 +00:00
Martin Poirier
486985762a etch-a-ton
Use head not tail normal for bone orientation.
Simplify roll to normal a bit.
2009-04-07 20:05:32 +00:00
Benoit Bolsee
14e3b041ba MSVC9 project file update 2009-04-07 19:57:30 +00:00
Campbell Barton
d012a222a2 Some users have odd joysticks with more then 8 axises, increased to 16 (so 4 joysticks)
Ideally there would be no limit but I dont think its worth the effort.
Also had a bug in last commit for the pytyhon api's "axisSingle" attribute, UI index starts at 1 not zero.
2009-04-07 19:21:48 +00:00
Campbell Barton
ca1c3be302 BGE Py API
- Added OpenGL access to the game engine as a module so you can import BGL directly.
2009-04-07 18:55:35 +00:00
Campbell Barton
bdfa61fbbe BGE api added place holder docs and CListValue docs. 2009-04-07 17:54:56 +00:00
Guillermo S. Romero
afb2670246 Emacs has some rules about where and how to look for settings. 2009-04-07 17:17:47 +00:00
Campbell Barton
18511c56d3 BGE Python API (small changes)
- Make BGE's ListValue types convert to python lists for printing since the CValue GetText() function didnt work well- printing lists as [,,,,,] for scene objects and mesh materials for eg.
- Check attributes are descriptor types before casting.
- py_getattr_dict use the Type dict rather then Method and Attribute array.
2009-04-07 16:00:32 +00:00
Campbell Barton
1534eca60f Updated bge_api_validate_py.txt to check for undocumented attributes
All types methods and attributes are now documented (except for some types have no epydoc .py files for at all)
2009-04-07 11:45:48 +00:00
Campbell Barton
5d64dd019e BGE Python API
Use each types dictionary to store attributes PyAttributeDef's so it uses pythons hash lookup (which it was already doing for methods) rather then doing a string lookup on the array each time.

This also means attributes can be found in the type without having to do a dir() on the instance.
2009-04-07 11:06:35 +00:00
Campbell Barton
c054ea0203 [#18407] Trouble w/ Bevel_Center.py
add python encoding info
2009-04-07 10:16:26 +00:00
Ton Roosendaal
6b1ccddc0d bugfix #18196
Halos for objects (not particles) can get texture color, but they skipped
the alpha mapt-to channel when that was set. Actually bug from ehh 1995!
2009-04-07 07:46:58 +00:00
Campbell Barton
885fa49aa4 BGE Joystick Sensor
- Raised limit of 2 axis to 4 axis pairs (4==8 joysticks axis pairs)
- Added a new Joystick Sensor type "Single Axis", so you can detect horizontal or vertical movement, rather then just Up/Down/Left/Right
- added Python attribute "axisSingle" so you can get the value from the selected axis (rather then getting it out of the axis list)
- renamed Py attribute "axisPosition" to "axisValues" (was never in a release)

If we need to increase the axis limit again just change JOYAXIS_MAX and the button limits.
2009-04-07 06:23:45 +00:00
Campbell Barton
816a9f3acb error in last commit 2009-04-07 03:20:59 +00:00
Janne Karhu
a127f259da Fix for: [#18027] Strange behaviour of Explode modifier in combination with SubSurf
- Explode didn't use the dmcache index for getting the particles emitter position.
- One "tri or quad"-comparison tested the wrong index. Leading to one quad converting into a tri.
2009-04-07 03:00:32 +00:00
Janne Karhu
7e23b7dc54 Texture effector nabla didn't have a correct initial value and it's button explanation needed some work. 2009-04-07 00:15:58 +00:00
Janne Karhu
b8270db75c Harmonic effector force wasn't working properly at all. A silly vector normalization where it shouldn't have been. 2009-04-06 23:23:36 +00:00
Janne Karhu
30ce01f23f Fix for: [#18354] Controlling with a texture the particles DENSITY parameter doesn't work.
If the density texture was taken into account with hair parent particles there were cases when there weren't any parents left to interpolate children from. Now a density texture is only taken into account for hair child particles.
2009-04-06 19:32:23 +00:00
Ton Roosendaal
445ca000bc bugfix #18398
When using 'angle' display for camera, the 'lens' ipo didn't update this
button. Implementation still lacks a bit... having both variables in the
camera struct is asking for troubles. Put on the re-think list for 2.5!
2009-04-06 18:08:15 +00:00
Campbell Barton
46a440c7a5 BGE Python API
- added a module for the BGE - GameTypes, only contains types.
- added KX_PYATTRIBUTE_DUMMY attributes for KX_Light, KX_PolyProxy, KX_VertexProxy, so all types should give correct results from a dir().
- added a script to check for missing methods in the epydocs - bge_api_validate_py.txt
2009-04-06 13:27:28 +00:00
Campbell Barton
960fa534b7 BGE Epydocs were missing some functions
renamed KX_Light -> KX_LightObject
added some missing controllers
2009-04-06 13:13:25 +00:00
Campbell Barton
64fe09ab20 - remove debug printf
- remove test for importing the module rather then creating a new one (didnt mean to commit)
- added constants for the mouse sensor to use.
2009-04-06 12:47:15 +00:00
Ton Roosendaal
fdceee0088 Bugfix #18266
Mipmap creation for render crashed, in this case:
- use Curves tool on an Image, which is UV mapped on object
- Save the image to disk, under new name
- Render (F12)

This fix is only for the crash, there's something not well coded
for Curves tool, how it manages float buffers. That's for 2.5.
2009-04-06 09:05:37 +00:00
Campbell Barton
c10d1c2853 Python ref-counting fixes 2009-04-06 08:17:04 +00:00
Kent Mein
a95f97cb28 cast needed to get things compiling again on my machine.
Kent
2009-04-06 01:43:01 +00:00
Janne Karhu
fe562f0dd4 Fix for: [#18482] Mixed object and halo visualization for particles needs "Emitter" to be activated. 2009-04-06 00:43:59 +00:00
Joshua Leung
ab467e7238 2.4x Bugfix #18279 - Copy Vertex Group Location doesn't work with subsurf modifier 2009-04-06 00:22:58 +00:00
Janne Karhu
58b1e04fe0 Fix for: [#18371] VParent breaks fur effects.
-Virtual parents were not randomly selected due to optimization in child particle distribution code.
-Wave-kink had a wrong matrix multiplication.
-Amount of virtual parents wasn't scaled properly to the amount of children rendered.
-Calculating virtual parents is now thread safe.
2009-04-06 00:10:52 +00:00
Joshua Leung
9a1e1912e1 2.4x Bugfix - #18188: "Clear user transform" does not work as described
For the record, "Clear user transform" is supposed to restore selected bones to the transforms defined by Actions/NLA, not back to rest position.
2009-04-06 00:04:04 +00:00
Campbell Barton
b4e4ccf92d BGE PyAPI can now import text (within the blend-file)
Previously this only worked with the Blender API.
- bpy_internal_import small C file that Blender scripting and the game engine use.
- Tested with blender, blenderplayer, loading files
- Needed to use a hack to override the Main struct since the game engine doesn't set G.main
- when the sandbox is set, only internal scripts can be imported.
2009-04-05 19:37:13 +00:00
Campbell Barton
3dacfbb231 BGE Python API
- action attribute wasnt checking for NULL (own fault)
- KX_Scene getCamera wasnt checking for NULL
- CListValue had asserts for not yet implimented functionality, this would close blender. Better to print an error if the user manages to run this functions (I managed to by CListValue.count([1,2,3]))
2009-04-05 14:55:50 +00:00
Campbell Barton
033a63f858 BGE Bugfixes (mostly in the py api)
KX_PolygonMaterial and KX_BlenderMaterial - Added a print function (would raise a python error on printing)

* Crashes *
KX_GameObject SetParent - Disallowed setting a parent to its self, caused a recursion crash.
KX_MeshProxy "materials" attribute was segfaulting because of my recent change - I was wrong, you do need to check material types (no idea why since they are both PyObject * at the base)
KX_VisibilityActuator - Wasn't initialized with PyType_Ready() making it crash on access (own fault) 

* Crashes because of missing NULL checks *
KX_PolygonMaterial's "gl_texture" attribute wasnt checking for a valid m_tface
KX_GameObject - added checks for GetPhysicsController()
KX_RayCast::RayTest - didnt check for a valid physics_environment
KX_SceneActuator's getCamera python function wasnt checking if there was a camera.
2009-04-05 14:01:49 +00:00
Campbell Barton
7d4dc4f0f5 - fixed errors with bge epydocs
- changed epy_docgen.sh so inherited attributes & methods are included inline for each type, removed source option since its not useful and makes the download bigger.
2009-04-05 10:03:23 +00:00