Commit Graph

1704 Commits

Author SHA1 Message Date
Dalai Felinto
f1c4688e25 renaming blf_api.h to blf_py_api.h
In windows this was producing Linking dependence errors because we have BLF_api.h in the /blenfont/ and blf_api.h in /python/generic/. It doesn't produces crash out of the box but I was trying to link both "api" files to the same project (Ketjsi folder). For the linking order was determining what header to use. A workaround is to "include" the file using some ../../ relative folder. But renaming it is less error prone.

Probably Ketsji folder shouldn't link to BLF_api.h anyways, but this is something I will look better later before another commit. In the mean time it's not a good idea to have 2 api files with the same name (for non case-sensitive systems).
2010-12-09 17:31:42 +00:00
Campbell Barton
afacd18498 use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed. 2010-12-08 08:43:06 +00:00
Dalai Felinto
70df57df0f BGE BugFix: [#24052] Can't change dynamic object's orientation using python (fix by Benoit)
from the tracker:
"""The required functionality is provided by the localOrientation property: setting this value will change the dynamic object orientation. This is because dynamic object have no parent and thus the local and world orientation are identical. However, setting worldOrientation will only change the scenegraph node, which has no effect as the physics controller will reset the orientation on next physics synchronization."""
2010-12-08 06:59:13 +00:00
Dalai Felinto
fe0f78a669 BGE BugFix: [#21246] Some values for ipoactuator.frameEnd and frameStart make ipo not play the first time
This is a bug as old as the ability to change the actuator values through Python.

For the records: although Blender supports floats as frame values BGE doesn't. It could but it doesn't. So only integers (longs) will be valid start/end frames.
2010-12-07 01:54:25 +00:00
Campbell Barton
357826aa6e bugfix [#24967] bge.KX_GameObject.worldAngularVelocity does not work, breaks mathutils somehow
- Exceptions from reading vector values in the game engine where not being caught.
- Also wrote specific KX_GameObject exceptions, without these the errors are quite confusing.
2010-12-06 08:29:41 +00:00
Campbell Barton
4dceafc928 bugfix [#24995] Object rotation seems to be applied incorrectly
- Object actuator rotation was being scaled by: (1/0.02)*2*PI/360 == 0.872, since revision 2. 
- Remove scaling and use do_versions to adjust existing files.
2010-12-06 07:45:07 +00:00
Campbell Barton
cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
Campbell Barton
df6169dada bugfix [#23423] Multi-window : closing game windows cause blender crash
detect closing window while the BGE runs and exit without crashing, as if Esc was pressed.
2010-11-30 21:51:03 +00:00
Campbell Barton
a1b8bc93e2 remove unmaintained windows and unix game engine plugin code. 2010-11-30 19:08:44 +00:00
Campbell Barton
42d6603cae Add option for CMake to build libredcode, also use CODEC prefix for ffmpeg, quicktime & sndfile options. 2010-11-30 18:52:39 +00:00
Campbell Barton
51a66c27f3 replace overly verbose matrix creation for BGE camera, typo fix from MikeS. 2010-11-29 20:57:02 +00:00
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
Damien Plisson
49f63589ab OSX: Patch associated with Python update to 3.1.2.
Thanks to Jens Verwiebe for making the build and the patch to make the Game Engine build again with it.
2010-11-24 21:39:07 +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
Campbell Barton
5a37333053 fixes from r33127 2010-11-17 14:36:19 +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
7e0f9229d6 fix for fix, r33086.
- incorrect range check broke ZYX euler rotations, use MIN/MAX constants so this doesn't happen again.
- BGE Armature PyAPI also wasn't using correct min/max with rotation modes.
- clamp on file read rather then when calling the rotation functions, so developers don't use invalid args without realizing it.
- added assert() checks for debug builds so invalid axis constants don't slip through.
2010-11-16 01:19:37 +00:00
Mitchell Stokes
d43d5d7690 Getting BLF to work with the Blenderplayer. 2010-11-12 07:16:33 +00:00
Campbell Barton
030253cdf6 fix for building, also use const char in more places. 2010-11-11 07:51:12 +00:00
Campbell Barton
da402c937e fix for linking the player, also fixes building without python and bullet. 2010-11-05 01:47:55 +00:00
Mitchell Stokes
a6007d1a5c A couple of changes to 2D filters to make adding new built-in ones nicer:
* Built-in filters were not being analyzed, which means no depth or luminance textures for them
  * Removed an unnecessary if that becomes really hairy when new built-in filters are added (ie, when filters are defined beyond the value used for custom filters)
2010-11-01 00:15:12 +00:00
Brecht Van Lommel
12812e494f Fix cmake building of blender player. 2010-10-31 12:31:15 +00:00
Nathan Letwory
beb5f84991 stdint include needed on non-msvc platforms 2010-10-31 08:42:42 +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
e002bcd876 bugfix [#22277] Absolute Shapekeys crash (in BGE)
running a shape actuator on a softbody would crash because it assumed the deformer was a BL_MeshDeformer.
Added TODO note, since it would be nice if softbody would work with shape keys too.
2010-10-25 17:08:40 +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
8aa4f5ea14 fix for BGE define in recent math changes. 2010-10-22 06:00:12 +00:00
Campbell Barton
a9f79ee536 Quiet compiler warnings. 2010-10-20 12:33:00 +00:00
Nathan Letwory
a293f76cdf Use DEBUG instead of NDEBUG 2010-10-18 06:52:10 +00:00
Campbell Barton
4d37cf90b9 remove G.sce, use G.main->name instead.
Both stored the filename of the blend file, but G.sce stored the last opened file.
This will make blender act differently in some cases since a relative path to the last opened file will no longer resolve (which is correct IMHO since that file isnt open and the path might not even be valid anymore).

Tested linking with durian files and rendering to relative paths when no files is loaded however we may need to have some operators give an error if they are used on the default startup.blend.
2010-10-18 06:41:16 +00:00
Campbell Barton
30b79ddcc6 - fixed remaining unused warnings.
- omit render code from this warning (cmake only), until render branch is merged.
- moved -Wunused-parameter warning to apply to all C code in blender (not just ./source/blender), (cmake only).
2010-10-17 06:38:56 +00:00
Nathan Letwory
53ced0be29 Now sound init param removal revert should be fine (apparently my cmake project files missed rebuild hint for these, fortunately SCons did its job well). 2010-10-16 15:00:04 +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
Campbell Barton
1807beabf5 - UNUSED macro wasn't throwing an error with GCC if a var become used.
- made interface, windowmanager, readfile build without unused warnings.
- re-arranged CMake's source/blender build order so less changed libs are build later, eg: IK, avi
2010-10-16 02:40:31 +00:00
Luca Bonavita
996efebbe3 == python api doc ==
First commit to make some structure in doc/ directory.

- moved source/blender/python/doc -> doc/python_api
- moved source/gameengine/PyDoc/*.rst -> doc/python_api/rst
- modified accordingly sphinx_doc_gen.py and sphinx_doc_gen.sh
  (later on I'll try alternative/ scripts by neXyon as promised :)
- source/gameengine/PyDoc/ is still there because contains epydoc stuff for the bge, will ask more and look into it later
2010-10-13 10:42:33 +00:00
Dalai Felinto
3a369128b4 BGE Bugfix for [#22371] Alpha Planes affecting 2DFilters
disabling GL_Blend at the 2dfilter drawing routine makes the trick here. there is not a clear function invoked before the 2dfilter drawing routine. Therefore I found better to disable alpha blending while we are setting the other OpenGl attributes/matrixes.

We are not re-enabling GL_BLEND after we disable it. We could and it wouldn't hurt but I can't see why to. open to suggestions here of course.
2010-10-11 20:55:05 +00:00
Dalai Felinto
682740e7aa make file update for recent bge.render.makeScreenshot commit 2010-10-11 18:47:28 +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