Commit Graph

1108 Commits

Author SHA1 Message Date
Benoit Bolsee
c1c4743696 svn merge -r 39975:40061 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-09 12:21:41 +00:00
Benoit Bolsee
dbd6658d73 svn merge -r 37306:39975 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-07 15:34:04 +00:00
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
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
Campbell Barton
0cd5dce245 whitespace edits 2011-09-03 02:15:49 +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
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
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
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
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
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
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
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
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
Joerg Mueller
4e8e502c02 Merging trunk up to r38932. 2011-08-02 12:16:06 +00:00
Dalai Felinto
5b3bb37343 reverting part of #38876 (whitespace edits)
the new if/else nesting introduced in the previous commit makes no sense.
(since I was here I add a comment for extrainfo and did some small cleanup)
2011-07-31 11:21:48 +00:00
Campbell Barton
c7a1a19153 whitespace edits, had odd space/tab mix 2011-07-31 07:54:24 +00:00
Campbell Barton
c19e88ac26 fix for building without bullet 2011-07-31 07:45:54 +00:00
Dalai Felinto
dfc661565a patch [#27909] Added constants in bge.constraints by Solano Felicio (solano) + some changes in rst
I named all the BGE modules with their actual names (e.g. Rasterizer, Video Texture, ...). so in the API index.html page they look more like the other Blender modules.
I did the same for the bgl module.

For bge.constraints this patch exposes the constants values for debug mode and createConstraints (they were hardcoded innts before).

+ making all the "todo" and #comments into rst comments (.. comments)
Thanks Solano, it's great to get help to those tasks :)
2011-07-30 23:16:22 +00:00
Mitchell Stokes
d3edf274b0 BGE Animations: This should solve the issue with NULL not being defined in BL_ActionManager.cpp 2011-07-30 17:27:54 +00:00
Mitchell Stokes
387439390d BGE Animations: Fixing some warnings from GCC about initialization order. 2011-07-29 21:58:31 +00:00
Joerg Mueller
29f214f7f3 Merging up to trunk r38834. 2011-07-29 21:28:18 +00:00
Dalai Felinto
fee1594a65 BGE BugFix for: [#23874] Custom projection matrix doesn't work in custom viewport
This was never highly tested, that's why I never committed (my patch for this was from September 2010).

But once again I got a report that this bug was a deal-break and the patch seems to work for this artist.
I believe it's working, but I will keep my eyes open for this.
2011-07-25 15:37:55 +00:00
Joerg Mueller
1193be6eaa 3D Audio GSoC:
* Reviewed and improved the linear resampler. Now it should work pretty good also for special cases that caused errors previously.
* Fixed a crash in the GE when a sound actuator doesn't have a sound assigned.
* Corrected the OpenAL device's threading code. This is a bugfix for #27913, thanks to Juha Mäki-Kanto for helping to resolve this.
2011-07-23 15:59:10 +00:00
Joerg Mueller
4532bd731d Merge with trunk up to r38584. 2011-07-21 21:11:58 +00:00
Mitchell Stokes
abb3f8c80b BGE Animations: Fixing a crash with "IPO" animations on an object with modifiers. 2011-07-20 06:20:49 +00:00
Mitchell Stokes
71eda5ca4d BGE Animations: BL_Action::m_action could be garbage, which can lead to odd problems. So, now I make sure it's set to NULL in the constructor. 2011-07-20 06:09:41 +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
Campbell Barton
410c5e3cd2 cmake source definitions:
remove missing includes and use more strict formatting.
2011-07-16 23:01:14 +00:00
Mitchell Stokes
c9c51776ee BGE Animations: Some updates to the Python api:
* Adding methods KX_GameObject.stopAction() and KX_GameObject.isPlayingAction().
  * Made all layer arguments optional. This means I had to change setActionFrame(layer, frame) to setActionFrame(frame, layer=0). This seems a little backwards to me, but I guess that's what you get with optional arguments. Also, this will break existing scripts.
  * Made sure to check user supplied layer values on all action methods. Previously this was only done for playAction().
  * Fixed a few newline issues.
2011-07-16 05:25:15 +00:00
Campbell Barton
3a6158a8bf move mathutils into its own lib. 2011-07-15 04:01:47 +00:00
Mitchell Stokes
ad08de4c2a BGE Animations: Now animations are only updated based on the set animation speed. This offers a significant performance increase (about 2x fps in my animation stress tests) for cases such as the defaults: 60fps logic and 30fps animations. This means that animations now only have to be updated half the time. I've also added Animations as a profiling category. This is the time spent in Blender's animation code, and not in the BL_ShapeDeformer (the mesh deformation). I'd like the add the deformation too, but right now it's counted in the rasterizer, and I don't see an obviously clean way to have it counted as animation instead. I'll investigate more. 2011-07-14 07:03:33 +00:00
Joerg Mueller
d9cf985730 Merging trunk up to r38329. 2011-07-12 13:09:22 +00:00
Campbell Barton
7370ba1839 fix for NULL pointer usages 2011-07-09 19:59:32 +00:00
Mitchell Stokes
a79fefee8c BGE Animations: Adding constants for the action play modes to bge.logic:
* KX_ACTION_MODE_PLAY
 * KX_ACTION_MODE_LOOP
 * KX_ACTION_MODE_PING_PONG
2011-07-08 07:32:45 +00:00
Mitchell Stokes
5a0f3690d0 BGE Animations: Fixing a crash when animating non-armature objects that didn't have shape keys. 2011-07-08 07:31:40 +00:00