Commit Graph

2391 Commits

Author SHA1 Message Date
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
Campbell Barton
1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
Campbell Barton
34b18fcbc1 code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image. (not use existing one) 2012-05-05 14:52:04 +00:00
Campbell Barton
299ff91ea1 code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
2012-05-05 14:33:36 +00:00
Campbell Barton
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
Brecht Van Lommel
885c4a6e78 Fix #31273: videotexture ImageRender not working in blenderplayer. 2012-05-03 14:59:42 +00:00
Campbell Barton
6327c9aae1 style cleanup: whitespace, braces 2012-05-01 20:08:23 +00:00
Campbell Barton
933b3166fc style cleanup: guys - set your editors to tabs! 2012-05-01 17:51:03 +00:00
Daniel Stokes
ae4fda82b0 Merging phase 1 of the BGE Harmony branch:
* Shadow color now usable in the BGE
 * Simplified the shadow panel while "Blender Game" renderer is active
 * Added variance shadow maps for the BGE
 * Buffered shadows on sun lamps in the BGE (orthographic)
 * Light textures in the BGE
2012-05-01 02:50:17 +00:00
Campbell Barton
112162e09e code cleanup: header cleanup 2012-04-30 14:24:11 +00:00
Mitchell Stokes
0331c77df1 Fix for [#31166] 2.63 applyRotation() makes Dynamic and Rigid object spin very fast
This bug was caused by r45902. CcdPhysicsController::RelativeRotate() was reading 2 values past the input because it was actually being passed a float[12] when it asked for a float[9] by KX_BulletPhysicsController::RelativeRotate(). Now KX_BulletPhysicsController::RelativeRotate() passes in a float[9] like it should have done to begin with.
2012-04-29 17:23:19 +00:00
Campbell Barton
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
Campbell Barton
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
Nathan Letwory
b23186b2a4 compile fixes:
* near and far var names confused mingw64, renamed
* mingw defines a macro named DrawText, confusing the DrawText function usage from KX_FontObject.
2012-04-29 00:44:49 +00:00
Joerg Mueller
88750597c7 Also updating CMakeLists.txt. 2012-04-28 23:40:38 +00:00
Nathan Letwory
72ec4c813a fix pthread path for windows builds 2012-04-28 23:15:34 +00:00
Joerg Mueller
5abadf1f75 Fix for windows compile. 2012-04-28 22:59:55 +00:00
Antony Riakiotakis
4e6590067d revert 45924, not a very clean solution, especially for external libraries and looks like -fpermissive is used in linux too 2012-04-24 16:14:23 +00:00
Antony Riakiotakis
0db3c5f743 Remove mingw-w64 errors from loss of precision by converting 64bit pointers to ints. All cases found were harmless and the error behaviour could be turned off by the -fpermissive flag but I'd rather keep that off to detect any real problems should they arise. 2012-04-24 14:33:44 +00:00
Antony Riakiotakis
4782522379 Add libMV and Scons support for MinGW-w64, patches by Caleb Joseph with slight modifications.
Thanks!
2012-04-24 12:57:58 +00:00
Campbell Barton
b374d9b20f fix for CcdPhysicsController::RelativeRotate reading 2 values past the input.
note: this function isn't used but may as well fix.
2012-04-24 01:52:59 +00:00
Antony Riakiotakis
8b476d0275 First MinGW-w64 support for cmake has been added. To test I recommend this build:
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ray_linn/GCC-4.7.0-with-ada/mingw-w64-gcc-4.7.0-runtime-2.0.1-static-ada-20120330.7z/download

Other builds may also work but due to the constantly changing nature of the compiler this cannot be guaranteed. I often had to change compilers while building the libraries and this one is the one that did the job for most of them.

This first support is experimental and considered "advanced". To enable pass -DWITH_MINGW64 during cmake configuration. Also make sure to extract the compiler on C:/MinGW and that MinGW/bin is in your path. To build check out lib/mingw64.

Initially the support is lacking until I get every library compiled correctly. For now you should disable WITH_CYCLES(sorry, I know some people are dying to do benchmarks, but still a few libs to go), WITH_IMAGE_OPENEXR, WITH_OPENCOLLADA, WITH_LIBMV and WITH_CODEC_FFMPEG(links but hangs on startup).

Still the tools are working, the memory limit is increased and due to the experimental nature of the setup, full optimization with SSE2 is available, which makes the build quite fast. Also the compiler and especially, the linker are way faster than regular MinGW.

The wiki docs have also updated. Happy testing!
2012-04-23 20:09:59 +00:00
Campbell Barton
b9a2741f68 code cleanup: remove unused defines 2012-04-23 08:05:02 +00:00
Mitchell Stokes
2912314838 Missed this file in my last commit. 2012-04-22 04:01:14 +00:00
Mitchell Stokes
3b686116ea Fix for bug #30219: "Obstacle Simulation of Steering Actuator does not work with added objects"
The steering actuator was filling its m_obstacle member when it was created (i.e., conversion time), which meant it had the wrong pointer after the actuator was replicated. Now m_obstacle is reassigned when the actuator is replicated.
2012-04-22 02:16:33 +00:00
Campbell Barton
64fe7139ec fix [#31045]
the blender game engine could reference a freed texface or mcolor array.
2012-04-21 15:56:50 +00:00
Campbell Barton
1615b46963 style cleanup 2012-04-21 13:37:26 +00:00
Brecht Van Lommel
6b006059ec Fix #31016: rigid body joint constraint in game engine did not respect constraint
enable/disable option.
2012-04-19 15:14:28 +00:00
Sergey Sharybin
caafc8184b Fix #30720: Creating Navmesh crashes blender
In fact there were several issues fixed (all of them regressions since bmesh merge):

- Creating navmesh crashed because creating new faces for mesh was trying to set
  default values for all customdata layers in this face. This requires memory
  pool created for this datablock.
  Usually this pool is creating on creating datablock if there're some elements
  to be stored in this block. In cases of regular primitive creating it wasn't
  an issue because they doesn't create customdata layers, they only creates
  geometry.
  Navigation mesh creates geometry and customdata layers (CD_RECAST layer)
  which used to confuse a bit custom data functions. Solved by ensuring there's
  memory pool created for polygons datablock after adding new custom data layer.
  Most probably it's better to be resolved on CD level (like smarter track on
  changed amount of stored data and so) but prefer not to make such global changes
  so close to the release.
- Toggling edit mode lead to loosing recast datalayer. Solved by adding recast
  layer to bmesh mask so it'll be copied to/from edit mesh.
- Some part of code assumed raycast layer is in face datablock, some that it's in
  polygon datablock. Made it to be in polygons datablock.
  Kind of temporary solution to make navmesh working, probably it'll fail if one
  will want to edit navmesh by hand after it was generated.
  Proper way would be to ensure the whole navmesh things are using ngons.
2012-04-16 13:53:30 +00:00
Benoit Bolsee
6627fe3f75 BGE bug #30555: crash in Replace Mesh when physics shape is triangle mesh and new mesh has no collision faces. The fix consists in keeping the previous physics shape, which is not quite correct, but the situation is unusual anyway. 2012-04-15 12:49:34 +00:00
Campbell Barton
5aaf3ede76 code cleanup: remove unused var for windows and style edit (remove spaces between 'var[num]') 2012-04-12 00:15:02 +00:00
Sergey Sharybin
bb0a3e1d90 Game engine: pass string length to BLI_str_cursor_step_prev_utf8 rather than NULL
That's what this function expect (but somehow does not use) and it gave compilation
error when using gcc-4.6.3 from debian linux.
2012-04-11 13:17:13 +00:00
Campbell Barton
b4a0152e76 code cleanup: float formatting was confusing in some cases - eg: (0.,0.,0.) 2012-04-11 08:15:13 +00:00
Campbell Barton
5061f2eb62 fix [#30839] Blender crashes while open/close a scene and deletes .blend-file 2012-04-10 13:10:44 +00:00
Thomas Dinges
c3fc0faae2 Game Engine:
* Scons compile fix for svn 45479.
2012-04-09 11:03:58 +00:00