Commit Graph

2998 Commits

Author SHA1 Message Date
Campbell Barton
9f05588b68 Python: remove redundant casts 2014-07-01 14:10:59 +10:00
Mitchell Stokes
c92c3ef611 Fix T40761: Bone constraints broken in the BGE
Extra bonus: calculating bone constraints now happens parallel!
2014-06-30 21:00:46 -07:00
Campbell Barton
2e840e56cf CMake: correct include dirs 2014-07-01 09:36:28 +10:00
Jorge Bernal
7d99a4ded9 BGE: New Mouse Actuator
Disclaimer: The author of this patch is Geoffrey Gollmer (gomer). I only updated the patch to the current git master status, reworked several parts to fit well with current coding style and applied several fixes.

This actuator allows users to show/hide the mouse cursor using logic bricks, as well as control object rotation with a mouse in the BGE.
The mouse rotation is flexible enough to allow any type of mouse look, as well as banking for flight controls.

{F94520}

{F91859}

Blend file for testing Mouse actuator (with default parameters and crosshair): {F94920}

Reviewers: moguri

Reviewed By: moguri

CC: gomer, lordodin

Differential Revision: https://developer.blender.org/D559
2014-06-25 15:47:37 -07:00
Bastien Montagne
414c70435d T39690: Modifications to Blender's 'temp dir' system.
Current temporary data of Blender suffers one major issue - default 'temp' dir on Windows is never
automatically cleaned up, and can end being quite big when used by Blender, especially when we have
to store per-process data (using getpid() in file names).

To address this, this patch:
* Divides tempdir paths in two, one for 'base' temp dir (the same as previous unique tempdir path),
  the other is a mkdtemp-generated sub-dir, specific to each Blender instance.
* Only uses base tempdir when we need some shallow persistance accross Blender sessions - and we always
  reuse the same filename (quit.blend...) or generate small file (crash reports...).
* Uses temp sub-dir for heavy files like pointcache or renderEXRs (Save Buffer option).
* Erases temp sub-dir on quit or crash.

To get this working it also adds a working 'recursive delete' to BLI_delete() under Windows.

Note that, as in current code, the 'recover render result' hack-feature that was possible
with SaveBuffer option is still removed. A real renderresult cache feature will be added
soon, though.

Reviewers: campbellbarton, brecht, sergey

Reviewed By: campbellbarton, sergey

CC: sergey

Differential Revision: https://developer.blender.org/D531
2014-06-23 13:42:54 +02:00
Mitchell Stokes
84e8cabac6 Fix T40697: Skinned meshes with shapekeys crashing in the BGE 2014-06-19 18:20:56 -07:00
Campbell Barton
8f30414c29 Fix T40620: BGE Python - Ray sensor has wrong axis constants 2014-06-17 22:13:44 +10:00
Campbell Barton
a21caf32cc Fix for bad NULL check 2014-06-17 22:04:40 +10:00
Campbell Barton
10af70cef8 Support for building without Python 2014-06-17 22:00:13 +10:00
Jorge Bernal
8c16f4c7d0 BGE: New Property sensor evaluation types
This patch adds "Less Than" and "Greater Than" evaluation types to the property sensor.
The Wiki Docs modifications http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Sensors/Property
Also, I have attached a screenshot and a blend to check.

Reviewers: dfelinto, moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D476
2014-06-16 14:56:36 -07:00
Mitchell Stokes
6c9dd174a8 Fix T39053: Replace mesh actuator does not replace material (only mesh)
The replace mesh actuator was reconverting the mesh data which causes
conflicts with the LoD code. Instead, we just look for an already
converted mesh, which should already be in the scene.
2014-06-02 18:52:13 -07:00
Campbell Barton
2645660bed Correct last commit: workaround for BGE 2014-06-03 11:32:45 +10:00
IRIE Shinsuke
54e054cce4 Followup to rB1973b17fce65, partially bring back GLSL lamp's previous behavior.
Using layer visibility in active render layer makes more accurate
preview but can cause problems in some cases:

https://developer.blender.org/rB1973b17fce65a4dfececb45b19abec37898c1ab5#comment-1

GLSL lamps now ignore layer visibility if lock_camera_and_layers is
OFF or game engine is running. The material lamp group still works
unconditionally though.
2014-05-30 08:22:44 +09:00
Mitchell Stokes
7317b4fcf1 Fix 40343: Using replace mesh (e.g., LODs) on a skinned mesh crashes.
Need to use parent->AddRef() in a few places.
2014-05-27 17:05:35 -07:00
Mitchell Stokes
04623e8b1f BGE: Accidentally committed some debug code in 8dafbe. 2014-05-27 14:32:32 -07:00
Mitchell Stokes
3b3908020e BGE cleanup: Removing some potential memory leaks from KX_NavMeshObject when it fails to build a navmesh. 2014-05-27 14:19:45 -07:00
Mitchell Stokes
8dafbed4b5 BGE cleanup: Remove unused KX_TrackToActuator::m_tracktime member. 2014-05-27 14:12:53 -07:00
Mitchell Stokes
f469185f25 Fix T40344: Levels of Detail not smooth with Armature Modifier
Due to skinning changes for multi-threaded animations, the LOD check was
being done after skinning. Now the LOD check is run before animations.
This means the culling information is a frame old, but this should be
fine.
2014-05-27 12:52:56 -07:00
Mitchell Stokes
0865b4f48e BGE LibNew: Only warn about meshes with users in debug builds.
This information only really seems to be for helping developers track
down bugs, and isn't really something the user needs. So, lets not spam
their console.
2014-05-20 15:04:25 -07:00
Mitchell Stokes
3abb2e0a3d BGE cleanup: Removing the unused KX_Scene::UpdateMeshTransformations() function. 2014-05-19 21:14:18 -07:00
Mitchell Stokes
2e20c16897 Fix T38895: Unstable behavior using VehicleWrapper after Bullet 2.82 update
The Bullet 2.82 update uses a different method for ray casting that
seems incompatible with our older files. So, for now we just force the
vehicle physics to use the older ray casting method.
2014-05-16 10:44:01 -07:00
Mitchell Stokes
183b417cce BGE Physics: Better follow the old (pre-cleanup) logic for determining bounds types.
This prevents older files from breaking.
2014-05-15 13:28:56 -07:00
Mitchell Stokes
ff2ec05662 Fix T40199: bge.logic.LibFree() could cause crashes by leaving dangling pointers in the rasterizer. 2014-05-14 19:11:08 -07:00
Mitchell Stokes
064ef3f00f Fix T40182: Crash when using KX_GameObject.rayCast/rayCastTo().
Missed another parent->release().
2014-05-14 13:35:35 -07:00
Campbell Barton
48881ad1e0 Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
Mitchell Stokes
23b682d594 Fix T40172: LibFree() crashes with shared materials (e.g., from multiple LibNew() calls) 2014-05-13 15:52:07 -07:00
Mitchell Stokes
1d1560eec4 BGE: Fixing some NavMesh memory leaks. 2014-05-13 15:52:07 -07:00
Mitchell Stokes
2055e968df Fix T38379: Mesh vertices only update when in cone of last created spotlight
The shadow render passes could set a mesh's modified status to false
even if they were not rendered. This means their display lists do not
get updated. For now, just skip setting all buckets' modified to false
during shadow render passes.
2014-05-12 23:13:27 -07:00
Mitchell Stokes
43f3e79cee Fix T40111: replaceMesh() crashes BGE when used on a parented object
The replace mesh code was still calling release() on the parent object when it
no longer needed to (due to earlier commits).
2014-05-12 22:53:31 -07:00
Mitchell Stokes
d5588fd658 Fix T40113: Skinned meshes with non-animated shape keys crashes the BGE. 2014-05-09 16:05:23 -07:00
Mitchell Stokes
087bbe624f BGE: Fixing shape key animations on meshes with no armature.
Their transverts were not being updated after code changes for
multi-threaded skinning.
2014-05-09 16:03:54 -07:00
Mitchell Stokes
ff08acc556 BGE VideoTexture: Fix for loading PNG (and possibly other) files. 2014-05-09 13:53:42 -07:00
Campbell Barton
88e5705a3f Code Cleanup: remove unused m_contactProcessingThreshold 2014-05-08 14:22:47 +10:00
Mitchell Stokes
ee5284faf6 BGE: Dynamically-allocated action layers
This patch removes the limitations on the number of action layers in the BGE.

BL_ActionManager currently uses a fixed array to keep track of the action layers. This patch replaces the fixed array with a map which allows for dynamic allocation of action layers. Layers (map items) are automatically removed on BL_ActionManager's update function. The maximum number of layers is roughly the value of a short. Backwards functionality is maintained and there are no changes to the Python API.

Task Discussion:
https://developer.blender.org/T39572

Author: Kevin Ednalino

Reviewers: moguri

Differential Revision: https://developer.blender.org/D491
2014-05-07 20:32:50 -07:00
Mitchell Stokes
362b25b382 Fix T39928: Blender crash/freeze when game engine is started with animation played directly on camera object with parents.
Updating object IPOs is not currently thread-safe since it also updates
children. This leads to problems when parents and children are both
animated. For now, updating object IPOs is done in its own loop to avoid
threading issues.
2014-05-04 15:39:15 -07:00
Mitchell Stokes
1a8b17661f Fix T35552: LibLoading objects with Collision sensors gives an error
The collision sensors were not being properly unregistered from the
physics system before they were merged into the current scene.
2014-05-02 00:08:00 -07:00
Mitchell Stokes
27cbb28659 BGE cleanup: Removing the unused SCA_EventManager::Replace_PhysicsScene(). 2014-05-01 19:43:07 -07:00
Mitchell Stokes
685316b406 BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment() 2014-05-01 18:34:25 -07:00
Mitchell Stokes
9f16428cb5 BGE cleanup: Moving the PHY_* includes in BL_BlenderDataConversion.cpp
These includes are now with the rest of the includes instead of in the
middle of the file. This should also help building on OS X.
2014-05-01 15:26:05 -07:00
Mitchell Stokes
5f80a7ffe2 Fix T39932: LibNew can't find LibLoaded meshes.
LibNew now searchs dynamic (i.e., LibLoaded)  mains instead of just the current main.
2014-05-01 14:49:42 -07:00
Mitchell Stokes
60c8c130fe BGE cleanup: KX_GameObject::GetParent() no longer increases the object's refcount.
I'm not sure why this function ever increased the object's refcount. Any
place in the code that calls KX_GameObject::GetParent() has to turn
around and call parent->Release(). Forgetting to call Release() was a
common cause of memory leaks (in fact, KX_SteeringActuator was probably
leaking). If the refcount needs to be increased, the calling code can
handle calling AddRef().
2014-04-30 18:53:32 -07:00
Antony Riakiotakis
6ab3a2f8a4 Change naming slightly, it conflicts with DrawText function define on
windows on MinGW
2014-04-30 11:57:12 +03:00
Mitchell Stokes
cdc5d6537f BGE: Fixing a memory leak from the recent physics changes. 2014-04-29 23:53:19 -07:00
Mitchell Stokes
d8282da545 Correction to last commit 2014-04-28 16:33:26 -07:00
Mitchell Stokes
3448822b2f Fix T39614: Ping Pong Action doesn't work correctly 2014-04-28 16:24:40 -07:00
Sergey Sharybin
5bcc9ee4fe COmpilation error fix after recent cleanup in BGE 2014-04-24 13:03:41 +06:00
Mitchell Stokes
f5c3c624f8 BGE Cleanup: Moving reinstancing physics shapes from KX_ConvertPhysicsObject to PHY_IPhysicsController
This was the last item in KX_ConvertPhysicsObject. Therefore,
KX_ConvertPhysicsObject.h and KX_ConvertPhysicsObjects.cpp have been
removed.
2014-04-23 19:39:57 -07:00
Mitchell Stokes
8cee587bcb BGE Cleanup: Physics conversion is now handled by PHY_IPhysicsEnvironment
The current physics conversion code was moved from
KX_ConvertPhysicsObjects to CcdPhysicsEnvironment.
2014-04-23 18:39:33 -07:00
Mitchell Stokes
89c61b20f0 BGE Cleanup: Reducing KX_BlenderSceneConverter's dependence on Bullet.
* Moving the BlenderDebugDraw (derived from btIDebugDraw) from
    KX_BlenderSceneConverter to CcdPhysicsEnvironment
  * Moving CcdPhysicsEnvironment initialization to CcdPhysicsEnvironment
    (this could probably be cleaned up some more with some sort of
    factory, or at least moving code to CcdPhysicsEnvironment's
    constructor)
  * Simplifying physics environment initialization (went from two
    switches to one)
2014-04-23 17:53:25 -07:00
Mitchell Stokes
3442a658fc BGE Cleanup: Reducing KX_Scene's dependence on Bullet.
Instead, it now relies more on our physics abstractions (e.g.,
PHY_IPhysicsEnvironment).
2014-04-23 14:08:49 -07:00