Commit Graph

1982 Commits

Author SHA1 Message Date
Campbell Barton
9161d3ce4b use Py_ssize_t rather than int when dealing with list sizes (original patch from Fedora but applied changes elsewhere too), also replace PyList_Size with PyList_GET_SIZE where typechecking is already done. 2011-09-06 23:46:20 +00:00
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
Brecht Van Lommel
a6d9a5a972 Code cleanup: warning fixes. 2011-09-05 19:27:21 +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
1f8291f78d BGE animations: Adding a separate list to KX_Scene for animated objects. This makes scenes with a lot of non-animated objects faster. In my test scene with 8000 static, non-animated cubes my time spent on animations went from 1.5~1.7ms to 0.001ms. 2011-09-03 20:48:47 +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
60dcfe2526 fix [#28462] Tiled textures and 2D filters don't mix
patch by Juha Mäki-Kanto
2011-09-03 04:44:18 +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
Mitchell Stokes
0f2be67bbf BGE: Undoing r39729 and applying a simpler fix (ensuring that the viewport is correct for PostRenderScene()). This way both 2d filters and post_draw callbacks with with multiple viewports. 2011-09-01 19:53:14 +00:00
Campbell Barton
2365c64014 whitespace bge edits 2011-09-01 02:12:53 +00:00
Mitchell Stokes
812d5d2e5c BGE Animations: The return type for KX_GameObject.getActionFrame() was an integer when it should have been a float. I've fixed this and converted the tabs in the new BGE animation docs to space. I have also added more info on return types for KX_GameObject.getActionFrame() and KX_GameObject.isPlayingAction(). 2011-08-31 22:32:14 +00:00
Mitchell Stokes
f63d049adc BGE: Adding two new functions to bge.render to allow users to change the anisotropic filtering level used by textures:
* setAnisotropicFiltering(level)
  * getAnisotropicFiltering()
2011-08-31 05:51:51 +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
Joerg Mueller
b4b046995b * Removing mocap GSoC (is an addon already).
* Fixing ffmpeg-0.8 errors.
* Fixing Ketsji paths.
* Removing DoSound from BGE.
* Fixing audio scene update to use only current scene objects.
2011-08-28 14:21:44 +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
c96f28a718 - use %u rather tham %d for unsigned ints in string formatting funcs.
- replace (strlen(str) == 0) with str[0]=='\0'
2011-08-27 03:25:02 +00:00
Campbell Barton
6926060185 - fix for BL_Shader::SetUniform() missing out the last part of the matrix.
- particle.c wasn't setting all components of the vector when reading cache and setting dummy velocity values.
- some functions incorrectly took a float[3] argument when the 4th value was set.
- remove a few redundant lines of code.
2011-08-27 03:20:32 +00:00
Mitchell Stokes
555f6cbe08 BGE: Post drawing callbacks are now done per viewport instead of per scene. This is handy for things like having a different HUD for each player in a splitscreen game. To figure out what viewport you're drawing too, check the scene's active_camera. 2011-08-27 03:19:46 +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
Campbell Barton
974a06823e bge py api XK_GameObject.linVelocityMin was returning linVelocityMax. 2011-08-27 01:37:47 +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
Joerg Mueller
f0d5abfcb2 Merging trunk up to r39637. 2011-08-22 20:31:46 +00:00
Joerg Mueller
a71c215f22 3D Audio GSoC:
Final GSoC commit.

* Bugfix: Negative frames crashed
* Bugfix: JOS sample buffer size prediction error (wasted memory)
* Optimisation: for JOS upsampling (around 12 % difference measured here)
* Optimisation: Better filter for JOS resampling
* Bugfix: Error in relative 3D audio code.
* Removed Attenuation
* Bugfix: Multiple scenes in BGE lead to errors, BGE audio now all relative, to support multiple scenes.
2011-08-22 18:59:56 +00:00
Campbell Barton
17c8621cc8 fix [bf-blender-Patches][27924] Redundant applying of SetNetworkDevice
noticed by Jorge Bernal (lordloki)
2011-08-21 21:17:55 +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
9b5c0f65aa BGE Animations: Increasing the max layer count to 8 as per a user request. Also, layer checks were checking for values between 0 and MAX_ACTION_LAYERS when they should have been checking for values between 0 and MAX_ACTION_LAYERS - 1. 2011-08-16 19:59:08 +00:00
Joerg Mueller
23807d1fb4 Merging trunk up to r39447. 2011-08-16 14:11:58 +00:00
Joerg Mueller
a458de88b6 3D Audio GSoC:
High quality resampling on mixdown, linear for playback.

* Lots of improvements and fixes for the JOS resampler, now it works fine!
* High quality filter coefficients for the JOS resampler (sorry for the 5 MB source file).
* Fix for GE orientation bug. Note: moto uses x,y,z,w quaternion storage, while rest of blender uses w,x,y,z.
* Minor changes/fixes.
2011-08-15 21:50:09 +00:00
Dalai Felinto
5e968e36c5 bugfix:[#25603] bad shadows in stereo mode - patch by Juha Maki-Kanto 2011-08-14 04:37:53 +00:00
Mitchell Stokes
c5ef9b62c1 BGE Animations: Adding an option to let users choose whether or not to lock animation updates to the framerate. If this option is enabled, animations are only updated at the same speed as the animation framerate. This can give a significant speed up in performance, but at the cost of smoothness in animations. I'm defaulting this behavior to off for now, which is the behavior seen in trunk. 2011-08-12 20:53:29 +00:00
Mitchell Stokes
78f89c3bbf BGE Animations: Animation updates are now handled separately from logic/physics updates. This allows the animations to be updated at the full fps specified by the user. Before, updates were not happening frequently enough. For example, a 30fps animation my only update at 20~30fps, which would cause some noticeable lag. This my not be the best solution since at this point we may be dropping frames (not being in the while(frames) loop), and we're not updating as often as the physics engine might want for bone parented physics objects. 2011-08-11 07:19:37 +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
Joerg Mueller
4e8e502c02 Merging trunk up to r38932. 2011-08-02 12:16:06 +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