Commit Graph

921 Commits

Author SHA1 Message Date
Campbell Barton
1dd1cea06e fix for error when changing DISBALE_PYTHON -> WITH_PYTHON,
This define wasn't set in some parts of the BGE causing problems with the view matrix.
in CMake define for the entire BGE fixes this.
2010-11-29 07:56:45 +00:00
Campbell Barton
e8397e6193 include headers in cmake source, added a script to check for consistency, reporting missing headers & C files.
this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
2010-11-29 04:35:56 +00:00
Dalai Felinto
9d9a88348e BGE Bugfix: [#24926] Sensor 'Radar' les axes X+ et Y+ ont été inversé. (oui, a french bug report :)
we were using SENSOR_RAY for the radar sensor axis. However the Ray axis is inverted (God knows why) so I created a set of defines only for radar sensor.

Also I thought it was a good idea to replace some hardcoded values in Radar and Ray codes by their defines in DNA_sensor_types.h (similar to what Benoit did for Armature Sensor, so I see no problem on that).
2010-11-26 03:37:08 +00:00
Mitchell Stokes
32eba0898b Reverting revision 33120, which added vram monitoring. The method used had some problems (especially in the freeing function). I will research an alternative solution and submit it to the tracker. 2010-11-24 06:27:07 +00:00
Mitchell Stokes
8abb58b7ce Changing KX_Camera.perspective didn't actually change the camera's perspective because the camera's matrix was cached. The setter for KX_Camera.perspective now invalidates the camera's matrix so it's recomputed with the change. 2010-11-21 01:55:08 +00:00
Mitchell Stokes
844e63f3b6 Fixing a crash when dynamically loading a scene that contains a bone parent. 2010-11-19 04:06:06 +00:00
Campbell Barton
da1f288f50 rename libs internal libs for CMake + SCons (used in MSVC project files)
for game engine use "ge_" prefix & make names generally more descriptive.
2010-11-18 11:42:05 +00:00
Mitchell Stokes
1bb98b4194 Adding monitoring for (approximate) VRAM used by textures. The information is currently only used in the profiling data of the BGE.
Here is a image of it in action:
http://www.pasteall.org/pic/show.php?id=6351

What it monitors:
  * VRAM used by textures created via bf_gpu and BL_Textures

What it does not monitor:
  * VRAM used by the Blender ui
  * VRAM used by 2d filters
  * VRAM allocated by the user via KX_Scene.pre_draw and KX_Scene.pre_draw
2010-11-17 05:28:25 +00:00
Campbell Barton
1f1c0b8027 patch #24737] PyCObject depreciated in py3k [patch]
from Dan Eicher (dna), use PyCapsule rather then PyCObject
2010-11-16 02:18:50 +00:00
Campbell Barton
0876fce009 rename and negate DISABLE_PYTHON --> WITH_PYTHON 2010-10-31 04:11:39 +00:00
Campbell Barton
bae43df4ec building the BGE without bullet works again. 2010-10-31 01:04:31 +00:00
Daniel Salazar
bd8758561f Build fix by Mike S 2010-10-30 02:59:42 +00:00
Campbell Barton
676829ccba workaround for python bug [#24400] If Script is executed with TEXT Editor, it becomes an error.
having the blend file as a part of the __file__ variable is not essential, this is fixed in python 3.2 so add an ifdef and don't use the blend file path for py older then 3.2.
2010-10-27 06:05:22 +00:00
Campbell Barton
3264ced377 move geometry python module into mathutils.geometry, since it provides utility functions using mathutils types. 2010-10-25 22:44:01 +00:00
Campbell Barton
29605fc06d Added function RNA_property_update_check() to check if an update call is needed,
Simple python benchmark shows this to be about 3x faster in the case where an update isn't needed.

This also speeds up rna function argument parsing, since each arg in a function call did 2 string lookups on the context which were never needed.
2010-10-25 21:57:45 +00:00
Campbell Barton
c6976e7351 use explicit file paths for CMake rather then globing, This is recommended by cmake devs.
globbing vs explicit is discussed here.
http://www.cmake.org/pipermail/cmake/2008-December/025694.html

Practical implications are:
- developers need to keep CMakeLists.txt files up to date.
- Users wont get strange linking errors if they build after a file is added, since CMake detects CMakeLists.txt is modified and automatically reconfigure.
2010-10-23 04:05:55 +00:00
Campbell Barton
a9f79ee536 Quiet compiler warnings. 2010-10-20 12:33:00 +00:00
Campbell Barton
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
Dalai Felinto
4814ffa07b BGE object.life - gives you the life countdown for temporary objects.
Whenever using AddObject actuator, this feature gives you control over morbid events (a.k.a. trigger events before the object ends).

Demo file here:  
http://blenderecia.orgfree.com/blender/tmp/cube_life.blend

Feature implemented as part of the BGE development workshop in BlenderPRO 2010 - Fortaleza, Brazil
2010-10-11 10:47:20 +00:00
Campbell Barton
a20843bf34 building without python works again for the BGE 2010-10-10 20:59:30 +00:00
Campbell Barton
f49fc58df6 enable building the game engine without bullet for scons & cmake 2010-10-10 07:01:56 +00:00
Mitchell Stokes
f7fb4e70b3 Fixing a memory leak with SCA_PythonKeyboard and SCA_PythonMouse. 2010-10-09 01:31:20 +00:00
Nathan Letwory
663ce490e0 Enable CXX_GUARDEDALLOC support through SCons. 2010-10-08 20:39:56 +00:00
Mitchell Stokes
02d97e4da2 Campbell requested that I remove one of the bge.events.RETKEY aliases, so I'm removing bge.events.RETURNKEY. 2010-10-06 00:36:12 +00:00
Mitchell Stokes
3cf2d2fd4e A bit of bge.events work:
* A few places in the bge.events docs mentioned bge.keys, when it should have been bge.events
  * Created two aliases to bge.events.RETKEY: ENTERKEY and RETURNKEY
  * ENTERKEY and RETURNKEY have been added to the docs and RETKEY marked as deprecated
  * Added an example of using bge.logic.keyboard to the bge.events docs
2010-10-05 05:44:15 +00:00
Campbell Barton
ab8aa13b82 bugfix [#24087] Blender can not install add-ons unless running with root priviledges
now addon path is created using the same path functions and selecting where to save the startup.blend

also made some minor changes to path handling funcs.
2010-10-03 20:00:22 +00:00
Guillermo S. Romero
fbe1b518f0 Fix attribution, as noticed by Dalai Felinto. 2010-10-03 16:39:07 +00:00
Campbell Barton
90665eb107 use constant rather then sqrt(2.0) 2010-09-30 07:06:00 +00:00
Nathan Letwory
ab5b95d148 * Update BGE for change in r32001
* Fix var declaration in bpy_interface.c
* Remove forward declarations from py_capi_utils.h: they are unnecessary and break compiles (there were probably many warnings about this during compile with GCC).
2010-09-18 19:38:27 +00:00
Campbell Barton
9b518710c6 update for MingW/CMake
- ignore MSVC warnings when FREE_WINDOWS is defined to quiet warnings.
- the CMake flags were not being set correctly making blender have weirdo colors (no -funsigned-char).
2010-09-15 16:13:32 +00:00
Dalai Felinto
ee7a2ccb22 BGE Dome: fix for "objects parented to the camera will be rendered multiple times in Dome mode"
The funny thing is: I only spotted this bug in March of this year. Almost one year after the original release. I think I don't parent objects to the camera often.

In terms of code I think that I can even think in a more elegant solution. I don't really need to rotate the camera, but simply to calculate its Modelview Matrix.
"""
m_rasterizer->SetViewMatrix(viewmat, cam->NodeGetWorldOrientation(), cam->NodeGetWorldPosition(), 1.0);
cam->SetModelviewMatrix(viewmat);
"""
The reason why I originally was rotating the camera was to make sure the frustum calculation was using the right camera frustum. For the frustum it takes the camera modelviewmatrix so the rotation really shouldn't be necessary. Leaving as it's for the time being.

* Note: the bug was never officially reported
2010-09-15 07:05:55 +00:00
Dalai Felinto
3a2fc4d6dc BGE module reshuffling - VideoTexture -> bge.texture
this was the one module left to be renamed.

We didn't get to any conclusion in the mailing list, but Campbell suggested texture and I think its a good name. We can change any time before next Beta, but for now I think it's handy to have something.

The original proposal is from May:
http://lists.blender.org/pipermail/bf-committers/2010-May/027587.html
2010-09-11 19:38:11 +00:00
Campbell Barton
2406ebe1a4 - added back zlib include (needed for win32).
- use list append in more places.
- remove non existing include dir.
2010-09-07 01:13:10 +00:00
Guillermo S. Romero
a8269c8946 SVN maintenance. 2010-09-03 03:30:20 +00:00
Nathan Letwory
6c113b54b3 Finally change SConscript tabs to spaces. 2010-08-29 20:52:05 +00:00
Benoit Bolsee
ad70072009 BGE patch #22623 applied: new bound type: Capsule. 2010-08-28 20:56:54 +00:00
Mitchell Stokes
b1302c3c04 After talking with Campbell, we came to the conclusion that it was probably best not to auto-import modules. To this end, I'm removing the automatic import of the bge module. 2010-08-28 08:00:37 +00:00
Mitchell Stokes
5c23537daa Committing patch [#23278] (by me)
This patch allows a user to pass binary data to LibLoad() to load a blend file from memory instead of a file path. I don't know how useful this will be for others, but I've used it so far for:
  * Decrypting .blend files and loading them without having to store the .blend on the hard drive
  * Pulling .blend data out of an archive and loading it (again skipping the hard drive)

So, it seems the biggest use for this is skipping a bit of file IO (and possibly some security problems).

Example usage:
import bge

with f as open('myfile.blend', 'rb'):
    data = f.read()

bge.logic.LibLoad('Name', 'Scene', data)
2010-08-28 02:07:55 +00:00
Campbell Barton
c20bb3ec43 own rna naming commits r31439 r31472 also renamed BGE vars unintentionally 2010-08-26 23:49:46 +00:00
Campbell Barton
4f5f868a52 rna data path names which are more likely to break animations.
Added an operator "Update Animation Data",
access from the search menu to update drivers and fcurves.
2010-08-20 06:09:58 +00:00
Joerg Mueller
26809f38aa Audaspace: This should fix all missing python includes now once for all... 2010-08-16 20:05:59 +00:00
Joerg Mueller
a3837b617b Audaspace: Fixing quaternion and relativeness of 3D sounds error. 2010-08-16 14:55:45 +00:00
Joerg Mueller
0be08725ad Py API (GSoC): Second merging commit
Rough summary of fixes/changes:
- Blender Py API: GameLogic -> bge.logic
- Blender Py API: Implemented missing KX_PYATTRIBUTE_TODOs and -DUMMYs.
- Fix for [#22924] KX_PolygonMaterial.diffuse does not return expected list[r,g,b]
- Py API: Renaming _owner attribute of mathutils classes to owner.
- Fix some minor errors in mathutils and blf.
- Enabling game engine autoplay again based on a patch by Dalai:
  * The biggest 3D view in the open scene is used, if there is none, blender opens the file normally and raises an error.
  * The 3D view are is made fullscreen.
  * Quad view, header, properties and toolbox panel are all hidden to get the maximum view.
  * If the game engine full screen setting is set, the game starts in fullscreen.
- Fix for ipo conversion on file transition in the game engine.
2010-08-16 12:14:09 +00:00
Joerg Mueller
25fec1592e Audaspace (GSoC): First merging commit
* All audaspace changes from the GSoC branch including the aud Python module
* This commit also includes some minor changes in source/gameengine/Ketsji/KX_PythonInit.cpp:
  - Fixing names of some constants
  - removing outdated stopDSP() python function
  - Autoinclusion of bge instead of GameLogic
  - Fix for some error messages: GameLogic -> bge.logic
2010-08-16 11:41:07 +00:00
Joerg Mueller
47d38dbd20 svn merge -r 31211:31313 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2010-08-13 10:50:29 +00:00
Joerg Mueller
fd2a9a0ed0 Blender Py API: GameLogic -> bge.logic 2010-08-11 12:14:16 +00:00
Joerg Mueller
d48991c6c6 Blender Py API: Implemented missing KX_PYATTRIBUTE_TODOs and -DUMMYs. 2010-08-11 10:36:16 +00:00
Guillermo S. Romero
95aa8cfa4a Update address in license block. 2010-08-10 21:22:26 +00:00
Campbell Barton
ad4fc20ec9 moved idcode functions into their own file (was added as a todo in the comments), these were mixed in with file reading code - BLO_readfile.h bot these functions are not spesific to reading. 2010-08-10 15:14:19 +00:00
Joerg Mueller
4eadcdc389 Fix for [#22924] KX_PolygonMaterial.diffuse does not return expected list[r,g,b] 2010-08-10 10:26:25 +00:00