Commit Graph

620 Commits

Author SHA1 Message Date
Joerg Mueller
813d09cb59 BGE fix: ignore sounds that cannot be opened instead of crashing. ;-) 2011-09-06 21:02:26 +00:00
Campbell Barton
0991bed413 fix some complier warnings and add -Wundef to CMake's default GCC warnings. 2011-09-05 23:40:52 +00:00
Mitchell Stokes
103b06d4df BGE animations: fixing initialization order issues for BL_ActionActuator and BL_ArmatureObject. Thanks to z0r for pointing them out and providing a fix. 2011-09-04 01:42:47 +00:00
Mitchell Stokes
70e3541f3a BGE animations: Fixing a potential crash when using camera IPOs. The IPOs were being created off of blendercamera->adt->action when they should have been using the supplied action. Thanks to z0r for pointing out the problem and a potential fix. 2011-09-04 01:27:16 +00:00
Mitchell Stokes
8295480bbe BGE animations: Fixing a crash that would happen if the property for a property mode action actuator was invalid. 2011-09-03 19:33:07 +00:00
Campbell Barton
0cd5dce245 whitespace edits 2011-09-03 02:15:49 +00:00
Mitchell Stokes
99d5fa70de BGE animations: This is an attempt to help smooth out some more compatibility issues with the new action actuator. It now has a similar pulse behavior to the old actuator. This has worked well in most of my tests, but YoFrankie still has problems, and it appears to have gotten a little worse. 2011-09-01 21:47:46 +00:00
Campbell Barton
2365c64014 whitespace bge edits 2011-09-01 02:12:53 +00:00
Campbell Barton
471c005137 typo fix: end of lines ;; --> ; 2011-08-31 01:07:55 +00:00
Joerg Mueller
947d4a654b Fix for [#25062] Sound Actuator - Positional Audio.
Now all sounds that are not mono but have 3D checked automatically get reduced to mono during BGE conversion time.
Also removed the now unneeded function sound_get_channels and added a missing header file to audaspace's CMakeLists.txt.
2011-08-30 10:09:10 +00:00
Joerg Mueller
43ab8e8624 * Merge trunk up to r39790.
* Subversion bump (also for init_userdef_do_versions).
* Minor fix for compilation without ffmpeg.
2011-08-30 08:22:03 +00:00
Mitchell Stokes
296cc41b03 BGE Animations: Various changes to make code reviewers happy:
* Naming/style changes
  * Taking advantage of switch statements
  * Removing unneeded NULL checks
  * etc
2011-08-29 06:19:55 +00:00
Dalai Felinto
ea07e367c5 bge bugfix: [#28362] Controllers names appear incorrectly with a python query
the uniquename was never fully implemented for sensors and actuators, only for controllers.
at some point we either get rid of all of them, or bring them all on.

For now removing the "unique name" of controllers
2011-08-29 03:20:15 +00:00
Campbell Barton
c73d5b939d check for unlikely error when freeing a library blend file from the BGE. 2011-08-28 05:01:16 +00:00
Campbell Barton
94b3e83b6c fix for bug with all rotation modes being treated as euler by the BGE, this bug is in trunk too but fixing here because this code will replace whats in trunk.
also make initializers less verbose for ipo transform assignment.
2011-08-27 03:13:54 +00:00
Mitchell Stokes
7fc26e0123 Committing patch #25675 "Make "Cast Buffer Shadows" option work in viewport and BGE" by me.
Description from the tracker:
"It's really handy to be able to prevent an object/material from casting a shadow. So, I made use of the Cast Buffer Shadows option in the material settings, and made it work in the viewport and the BGE."
2011-08-24 20:28:54 +00:00
Mitchell Stokes
db4071d2b6 BGE Animations: Lamp and Camera IPOs are now handled like object IPOs, which means lamps and cameras are no longer stuck to just their active action. However, the Blender UI seems a little restrictive in this area. 2011-08-17 09:38:50 +00:00
Mitchell Stokes
17e88915fd BGE Animations: Updating BL_ActionActuator.frame to work with the new actuator. 2011-08-11 03:27:47 +00:00
Mitchell Stokes
7707140fd1 BGE Animations: Always update the localtime used for continuous animations. Previously this was only done on a positive or negative pulse, which could lead to some issues with a continuous flipper animation. 2011-08-10 20:05:30 +00:00
Mitchell Stokes
802f69df78 BGE Animations: Fixing issues with initialization order in BL_ShapeDeformer 2011-08-09 03:27:05 +00:00
Mitchell Stokes
88786f6fca BGE Animations: Fixing the Continue option when using the Flipper play type. Also removing a couple of debug prints. 2011-08-09 03:06:22 +00:00
Mitchell Stokes
8883702f8a BGE Animations: Various compatibility fixes:
* Blendin for Loop End works even after a negative pulse. Flipper could still use some work in this area.
  * Continuous works a lot better.
  * BL_Action::SetFrame() should work a little smoother.
2011-08-08 04:28:30 +00:00
Joerg Mueller
daab78bc61 Merging trunk up to r39145. 2011-08-07 15:25:06 +00:00
Joerg Mueller
2d884fc035 3D Audio GSoC:
* Pepper depends on ffmpeg 0.7.1 or higher now, windows and mac build systems set to ffmpeg-0.8
* Fixed orientation retrieval in OpenAL device code.
* Added stopAll() method to AUD_IDevice (also for Python) and call it on BGE exit
* Changed BGE to use audaspace via native C++ instead over the C API.
* Made AUD_SequencerFactory and AUD_SequencerEntry thread safe.
* Changed sound caching into a flag which fixes problems on file loading, especially with undo.
* Removed unused parameter from sound_mute_scene_sound
* Fixed bug: changing FPS didn't update the sequencer sound positions.
* Fixed bug: Properties of sequencer strips weren't set correctly.
* Minor warning fixes.
2011-08-07 11:54:58 +00:00
Mitchell Stokes
5cc0bb0d1b BGE Animations: The IPO conversion code relied on objects having an adt, but this isn't always the case. object->adt can be NULL, which causes a crash. Now BL_InterpolatorLists are cached by action instead of adt. 2011-08-07 04:57:23 +00:00
Mitchell Stokes
7e0049d27a BGE Animations: Making the ping pong mode for action actuators behave more like trunk. The behavior is a lot closer, but there are still differences when interrupting a ping pong action. I'm still trying to decide if these are acceptable differences as they don't look all that simple to fix. 2011-08-06 00:35:16 +00:00
Campbell Barton
f77af0a8ce change BLO_library_append_begin to take a main argument rather then a context, means the BGE doesnt need to make a new empty context just to pass as an arg.
added doxygen description too.

this quiets the print when the BGE does linking.
2011-08-05 05:26:19 +00:00
Mitchell Stokes
03c1585e3a BGE Animations: BGEDeformVerts() now handles normals instead of relying on BL_MeshDeformer::RecalcNormals(), which BlenderDeformVerts() still uses. As expected, the BGEDeformVerts() version isn't as accurate, but it avoids a sqrt per vertex. This gives about a 15~20% improvement in time spent on the rasterizer in my test scene, which resulted in about 5 more fps. However, the main reason for the new normal code is it will be easier to do on the GPU (doesn't rely on neighbor information). 2011-08-01 23:02:10 +00:00
Mitchell Stokes
e4a512351d BGE Animations: Save the deform number to pose channel map created by BL_SkinDeformer::BGEDeformVerts() so it isn't recreated on every update. This gives minor speed ups, but I mostly did it because I thought it was a little cleaner this way. 2011-07-29 01:59:36 +00:00
Mitchell Stokes
eb7b1f0c58 This allows the game engine to build again, but I'm not sure if it's the best approach. Aligorith: feel free to revert this if there is a better solution. 2011-07-28 15:07:32 +00:00
Mitchell Stokes
1f65b3b1a8 BGE Animations: Adding a new choice for vertex deformation for armatures, which can be found in the Armature's Skeleton panel by the Deform options. Before only Blender's armature_deform_verts() was used. Now users can choose a vertex deformation function that is optimized for the BGE. At the moment it is mostly a copy of armature_deform_verts() with various chunks of code removed, and the BLI_math code was replaced with Eigen2. In my test scene, the new function offered about a 40% improvement over armature_deform_verts() (17~19ms rasterizer to 11~12ms). The only current limitation that I'm aware of if that B-Bone segments are not supported in the BGE version, and I will probably leave it out. I would like to also limit the BGE version to 4 weights to make things easier for a GPU version, but this may just make things slower (sorting weights to find the top 4). 2011-07-26 06:10:05 +00:00
Joerg Mueller
4532bd731d Merge with trunk up to r38584. 2011-07-21 21:11:58 +00:00
Dalai Felinto
f2e055f4a4 bugfix: [#27348] blenderplayer showing a different viewport size in 2.57b
I believe this bug was there since we (me) moved the game settings to scene->gm
Since I was here I added support for x/y non square aspect pixels (i.e. anamorphic)
we were already using it for videotexture so I don't know why we were not here.

Tested in OSX, but it should be working in all OSs.
2011-07-19 01:41:45 +00:00
Mitchell Stokes
7e72356b8d BGE Animations: Allow the Copy Transform constraint to work with external targets in the game engine. 2011-07-17 20:06:50 +00:00
Campbell Barton
5792bd7cc7 cmake: cleanup include paths, some duplicates and going up some unneeded dirs. 2011-07-17 09:11:13 +00:00
Mitchell Stokes
0eacdc94ba BGE Animations: Removing unused code and adding some more comments. 2011-07-07 03:53:24 +00:00
Joerg Mueller
3f3c6f5f1f Merging from trunk up to r38119. 2011-07-05 13:54:25 +00:00
Mitchell Stokes
ceabc6d119 BGE Animations: Various fixes and bits of cleanup to get the action actuator to behave more like it did in trunk. The Pepper version is still more sensitive to pulses than the trunk version, but this is more accurate. I might try to address this, but I'm not sure. 2011-07-05 05:22:02 +00:00
Mitchell Stokes
46d12b480e BGE Animations: Making the action actuator's loop end play mode work better. 2011-07-03 02:57:50 +00:00
Mitchell Stokes
5d7921691b BGE Animations: Reimplementing support for the "Flipper" play mode of the action actuator. 2011-07-03 02:51:14 +00:00
Mitchell Stokes
5f4f75c51a BGE Animations: Adding in layer weights to allow for layer blending. 2011-07-03 01:59:17 +00:00
Mitchell Stokes
b4b26b735c BGE Animations: Fixing a bug where an action actuator could update a frame property when it wasn't active. 2011-06-30 20:08:05 +00:00
Mitchell Stokes
12596969af BGE Animations: Shape drivers are now working again. 2011-06-30 19:33:13 +00:00
Mitchell Stokes
3afe0e9c88 BGE Animations: Beginning work on layer blending. Blending armature actions works, but needs more testing. Also, currently the mode is forced to ADD and the weight to 1. 2011-06-29 02:42:46 +00:00
Mitchell Stokes
d122f24c1a BGE Animations: Fixing a bug with priority and non continuous animations. 2011-06-29 01:53:17 +00:00
Mitchell Stokes
de3c95a09c BGE Animations: Adding blendin for Shape Actions. 2011-06-29 01:05:12 +00:00
Dalai Felinto
0c8311fdf9 revert commit 27133: Committing patch [#27133] "Fix for for Object Color in BGE" by Kupoman
This was causing a lot of backward compatibility problems and side effects.

It has to be done properly, linked with Material ObjectColor shader_flag or at least the TF OBCOLOR (which apparently worked at some point so I've been told).
If you need to use OBCOLOR simply keyframe the obcolor and it will work as before.
2011-06-23 22:29:02 +00:00
Mitchell Stokes
f1a2d46aa0 BGE Animations: Adding the concept of priority back. Priority is handled on a per layer basis. 2011-06-23 22:12:49 +00:00
Mitchell Stokes
0fbca841ef BGE Animations: Making the play modes for the Acton Actuator behave more like they have in the past. The only one that still needs work now is Flipper. Property, Loop End, Loop Stop, Play, and Ping Pong should all now be behaving as they used to. 2011-06-23 22:00:54 +00:00
Mitchell Stokes
2d2aa95227 BGE Animations: Making shape actions work again:
* BL_DeformableGameObject is no longer responsible for handling keys, BL_ShapeDeformer is
  * BL_ShapeDeformer also creates a copy of the key on construction and puts it back on the mesh when destructed. This avoids us permanently modifying Blender data.
  * I'm not too fond of clearing out the key every frame, but this works and I can't think of another alternative at the moment (something may be possible with some key juggling)
2011-06-23 19:09:09 +00:00