Commit Graph

2425 Commits

Author SHA1 Message Date
Mitchell Stokes
8ce864784c Fix for [#31701] "radar causes collision" reported by Markus Rietz (afeature).
The problem was that the physics shapes for the near and radar sensor were getting turned into characters because CcdConstructionInfo::m_bCharacter was defaulting to true. Now it defaults to false and is explicitly set to true for only Character physics types.
2012-07-08 05:00:16 +00:00
Campbell Barton
3a0593cc3d code cleanup: dont use function calls like dot_v3v3, pow and sqrt within macros which results in calling the function multiple times needlessly.
also added some comments.
2012-07-06 22:48:28 +00:00
Mitchell Stokes
b41561a406 Fix for [#31978] "Horizon colour drawn on two edges of screen when a 2D filter is active" reported by Alex Fraser.
The glViewport used for 2D Filters wasn't quite matching the 3d view. It seems the height and width were both off by one. There may be a deeper bug with the canvas rectangle having slightly wrong dimensions, but this at least fixes the 2D Filters.
2012-07-05 21:03:29 +00:00
Mitchell Stokes
9f7db7f3ea Fix for [#31122] "Properties cant have Spaces in names when using interval as a evaluation. Or else it'll fail to activate actuator." reported by Auuman Anubis.
I cleaned up the INTERVAL check to do a much cleaner (and saner) range check that doesn't get messed up by spaces.
2012-07-05 20:34:42 +00:00
Campbell Barton
21bf13989f code cleanup: remove Python.h include from blenkernel. 2012-07-04 20:13:39 +00:00
Bastien Montagne
558721ab59 More spell checking. 2012-07-04 15:04:38 +00:00
Bastien Montagne
468ef74ed7 More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). 2012-07-03 19:09:07 +00:00
Campbell Barton
1597ad9377 style cleanup 2012-07-01 09:54:44 +00:00
Campbell Barton
8b865c01cd style cleanup: comments 2012-06-30 22:49:33 +00:00
Mitchell Stokes
436f02ab9c Finally committing support for compressed textures on the GPU (DDS+DXT). This patch started out as a patch by me, then cleaned up by Kupoman during his work on Cucumber.
One important thing to keep in mind when using this feature is that you'll need to flip your textures vertically (both the GIMP and Photoshop DDS tools I've seen have support for this on export). This is a quirk in using a texture format originally made for DirectX/DirectDraw, and flipping the compressed data is a real headache. Another quick fix for this issue is to change the Y value for the Size in the Mapping panel in the Texture properties to -1 (default is 1).
2012-06-30 04:34:34 +00:00
Campbell Barton
aeee798143 code cleanup: bge builds with clang without warnings / errors. 2012-06-29 09:16:59 +00:00
Mitchell Stokes
a9a92ae323 Fix for [#23375] "texture2D in custom 2D filters can get texture outside of game, resulting in ugliness" reported by Jacob F.
The 2D Filter system now only copies the game viewport instead of the whole window. This prevents 2D Filters from grabbing data outside of the game viewport. The textures for 2D filters are now also not forced to be powers of two (if NPOT textures are supported), which can save a little bit of VRAM.
2012-06-28 09:37:30 +00:00
Mitchell Stokes
ecc15e53bd Removing channel manipulation from the Action Actuator Python API since this has been broken since the animation changes from Pepper. BL_ArmatureObject.channels should be used instead. For more information see bug #28843 for more info:
http://projects.blender.org/tracker/index.php?func=detail&aid=28843&group_id=9&atid=306
2012-06-28 06:22:47 +00:00
Dalai Felinto
7016538974 bge.logic.keyboard.getClipboard() and .setClipboard methods
the idea of using methods instead of attributes is to avoid users abusing of the system calls.

Thanks Campbell Barton for reviewing and small corrections
2012-06-27 21:57:33 +00:00
Campbell Barton
9beef7442c style cleanup: also some spelling correction. 2012-06-27 05:59:41 +00:00
Campbell Barton
3c8a4c458b more guardedalloc use in C++, also make compositorMutex a static var, was allocated and never freed. 2012-06-25 10:35:24 +00:00
Campbell Barton
cc0784c1b9 optionally use guarded alloc for tiles compositor, also replace allocation functions with a macro. 2012-06-25 09:14:37 +00:00
Mitchell Stokes
79fb3311a3 Fix for [#29412] "Priority 0 cause problems with pulse mode" reported by Guillaume Côté.
Right now this is being fixed by not allowing the exact same action (action, start/end frames, speed, etc) to be played if it's already playing. Hopefully this will not cause more issues than it solves.
2012-06-23 03:39:03 +00:00
Mitchell Stokes
d8e2c475a0 Fix for [#31396] "bge.logic.LibLoad fails to import text blocks" reported by Leonard Ritter.
Blender's import function check's the Text datablocks in main for additional modules for importing. However, libloaded scenes were 1) not loading Text datablocks and 2) not letting bpy know about them. Text datablocks are now loaded if a Scene is loaded and bpy can now looking through extra Mains to find additional modules.
2012-06-21 05:41:06 +00:00
Campbell Barton
a744fed46c style cleanup 2012-06-20 16:43:48 +00:00
Sergey Sharybin
0d64e050ea Reduce amount of deprecated symbols used from FFmpeg
This switches some areas of Blender which are related on FFmpeg stuff
from deprecated symbols to currently supported one.

Pretty straightforward changes based on documentation of FFmpeg's
API which symbols should be now used.

This should make Blender compatible with recent FFmpeg 0.11.

Should be no functional changes.
2012-06-18 10:29:11 +00:00
Campbell Barton
f5f25b81e8 style cleanup:
also fix for building ghost test and fix double free in one of the tests
2012-06-17 09:58:26 +00:00
Mitchell Stokes
245c94a75e Fix for [#31848] "BGE: Commit r47628 breaks custom GLSL material shaders" reported by Alex Fraser.
Custom shaders is a case where the BGE can be using GLSL materials and still need to upload textures without bf_gpu. I tweaked some logic to handle this special case and added more comments.
2012-06-17 07:59:22 +00:00
Campbell Barton
b5b8306685 code cleanup: includes, also correct some py example typos 2012-06-16 20:20:07 +00:00
Sergey Sharybin
a164b7ed25 Comment numberoffilters in constructor too.
Otherwise it'll for sure give compilation error.
2012-06-14 11:26:46 +00:00
Campbell Barton
a57c8a37a1 comment unused vars 2012-06-14 11:05:15 +00:00
Mitchell Stokes
c07c572373 Fix for [#31813] "bge.types.KX_RadarSensor incorrect attributes" reported by Monster.
KX_RadarSensor.angle was returning the angle that was used to construct Bullet's physics shape, which is calculated from the logic brick gui. KX_RadarSensor.angle now recalculates the original value from the gui. However, m_coneradius isn't actually used by KX_RadarSensor that I can see, so it might be better to just assign the original angle to m_coneradius instead of the calculated value. I've also made KX_RadarSensor.angle read-only, since setting m_coneradius does not appear to have any affect, which means writing to KX_RadarSensor.angle never worked properly.
2012-06-14 08:01:20 +00:00
Mitchell Stokes
298feff390 Committing patch [#31704] "Patch to fix keyboard sensor from blocking quit game key binding" by Jay Parker. This patch fixes [#31671] "Keyboard Sensor blocks Quit Game Key Binding" 2012-06-10 19:32:57 +00:00
Campbell Barton
5534701e5d style cleanup: use capital camel case names for typedef's 2012-06-10 15:20:10 +00:00
Mitchell Stokes
8a4f16739a Fixing a BGE bug where textures could get loaded into VRAM twice. 2012-06-08 19:57:28 +00:00
Mitchell Stokes
ebb2dc84fc Some slight refactoring of the BGE's LibLoad code to make things a bit cleaner (no functional changes). 2012-06-07 01:46:28 +00:00
Campbell Barton
d5032657ed style cleanup 2012-06-06 22:38:39 +00:00
Campbell Barton
cb0b3558af style cleanup 2012-06-05 22:12:17 +00:00
Campbell Barton
5189356d58 style cleanup 2012-06-04 20:11:09 +00:00
Campbell Barton
1aa27e240c code cleanup: replace some non utf8 chars 2012-06-03 11:16:13 +00:00
Mitchell Stokes
0e73b64d62 Fix for [#27472] "preserve volume for armature modifier does not work" based on code provided by Sergey Kurdakov. Now more deformation flags are being passed to armature_deform_verts(). Note: this fix is only for the Blender vertex deformer, not the BGE deformer. 2012-06-01 02:17:35 +00:00
Benoit Bolsee
58bc424b3c BGE #30734: add support for physics linear and angular thresholds and deactivation time from python and GUI.
========================
The linear and angular thresholds set the speed limit (in m/s) and rotation limit (in rad/s)
under which a rigid body will go to sleep (stop moving) if it stays below the limits for a 
time equal or longer than the deactivation time (sleeping is disabled is deactivation time is 
set to 0).
These settings help reducing the processing spent on Physics during the game.

Previously they were only accessible from python but not working because of a bug. 
Now the python functions are working and the settings are available in the Physics panel
of the World settings when using the Blender Game render engine.

Python API:
  import PhysicsConstraints
  PhysicsConstraints.setDeactivationLinearTreshold(float)
  PhysicsConstraints.setDeactivationAngularTreshold(float)
2012-05-29 20:30:33 +00:00
Benoit Bolsee
dfc19a1ff7 BGE patch #28476: Character object physics type
===============================================
This patch adds a new "Character" BGE physics type which uses Bullet's btKinematicCharacter for simulation instead of full-blown dynamics. It is appropiate for (player-controlled) characters, for which the other physics types often result unexpected results (bouncing off walls, sliding etc.) and for which simple kinematics offers much more precision.

"Character" can be chosen like any other physics type in the "Physics" section of the properties window. Current settings for tweaking are "Step Height" (to make the object automatically climb small steps if it collides with them), "Fall Speed" (the maximum speed that the object can have when falling) and "Jump Speed", which is currently not used.

See http://projects.blender.org/tracker/?func=detail&atid=127&aid=28476&group_id=9
for sample blends and a discussion on the patch: how to use it and what influences the behavior of the character object.

Known problem: there is a crash if the "compound" option is set in the physics panel of the Character object.
2012-05-28 21:36:29 +00:00
Campbell Barton
1e45042396 code cleanup: remove mode comments, these were applied very un-evenly across a few files. 2012-05-27 13:22:43 +00:00
Campbell Barton
ba5e13912d fix for own error in applying patch 2012-05-26 13:08:42 +00:00
Campbell Barton
e727056c2e patch [#31265] Warning Fixes 02/05/2012
from Jason Wilkins (jwilkins) 

only applied some parts:
* const correctness
* moved a variable into a move local scope so it is also inside a #if/endif and does not end up conditionally unused
2012-05-26 10:05:22 +00:00
Mitchell Stokes
f6d5b7ffd7 Fix for [#31276] Action Actuator, Priorities higher than 1 break Playback:
The code was looking to see if the priority was strictly greater than the current priority, but it seems that an equal priority should also override (at least the report seems to suggest that this is the behavior from 2.49).
2012-05-23 04:01:05 +00:00
Mitchell Stokes
f76419d6de Fix for [#31367] render.drawLine not 2D filter aware:
The lines from render.drawLine() are now drawn before motion blur and 2D Filters.
2012-05-21 18:35:31 +00:00
Campbell Barton
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
Campbell Barton
181f3670c9 patch [#31507] site not automatically imported when using external python package
made some modificatons to normal python startup also.
2012-05-18 10:19:49 +00:00
Campbell Barton
9dd981a440 style cleanup: block comments 2012-05-16 23:37:23 +00:00
Bastien Montagne
2e89e0096a Spell check fix (lenght -> length)
Note: two remains, in comments in extern/bullet2/src/LinearMath/btVector3.h and extern/libmv/libmv/image/tuple.h.
2012-05-16 14:25:25 +00:00
Sergey Sharybin
a7a79322bf Make blender compilable by gcc-4.7 and strict compilation flags:
- Remove strict flags from files, which are using FFmpeg stuff
  We're still using some symbols which are marked as deprecated.
  Ideally, we shall switch to new API, but it's a bit larger challenge
  because we don't want to break compatibility withotu actual need.
- Replace MAKE_ID with BT_MAKE_ID in bullet library.
  This is needed to prevent re-definition of MAKE_ID in bullet library.
  Seems it's only used to read blender files, so should be quite safe
  change.
2012-05-14 13:31:38 +00:00
Campbell Barton
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +00:00
Brecht Van Lommel
e45530ef8f Fix #31366: check to enable opengl quadbuffer stereo was wrong, causing it to
not work and making other stereo modes not work when the graphics card did not
support quadbuffer stereo.
2012-05-09 11:11:35 +00:00