Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-01BGE: Fix T44069 playing action during libfree.Porteries Tristan
2015-06-28BGE: added clamping of angular velocity.Sybren A. Stüvel
Angular velocity clamping was missing from the BGE. It is implemented similarly to the linear velocity clamping. It is needed to be able to drive physical simulations of systems that have a limited rotational speed. Reviewed by: campbellbarton, panzergame, ton Differential Revision: https://developer.blender.org/D1365
2015-06-13Fix for building without PythonCampbell Barton
2015-06-02Fix T44919: BGE marhutils attrs leak memoryCampbell Barton
2015-05-14BGE: Code Cleanup: LOD hysteresis calculationThomas Szepe
* Cleanup duplicated code. * Remove unnecessary "this->" Reviewers: kupoman, lordloki Reviewed By: kupoman, lordloki Differential Revision: https://developer.blender.org/D1293
2015-05-04BGE: Added 'ghost' arg to KX_GameObject.suspendDynamics() methodSybren A. Stüvel
The implementation of this 'ghost' argument already existed in the C++ source, but wasn't exposed to Python yet.
2015-04-19BGE : Standardization of callbacks execution.Porteries Tristan
A new function (RunPythonCallBackList) to call all python functions contained in a python list was developed. This function has: - first argument is the python list of callbacks - second argument is a python list of arguments - third argument is the minimum quantity of arguments - forth argument is the maximum quantity of arguments It improves flexibility and supports *args. Reviewers: moguri, dfelinto, campbellbarton, sybren Reviewed By: campbellbarton, sybren Subscribers: sybren Projects: #game_engine Differential Revision: https://developer.blender.org/D1102
2015-04-19BGE: Support for collision group/mask from the api + activated on EndObject.Porteries Tristan
A Python API for the collision group / mask has been added: ``` KX_GameObject.collisionGroup KX_GameObject.collisionMask ``` The maximum number of collision groups and masked has been increased from eight to sixteen. This means that the max value of collisionGroup/Mask is (2 ** 16) - 1 EndObject will now activate objects that were sleeping and colliding with the removed object. This means that, unlike now, if a rigid body starts sleeping on top of another object, when the latter is removed the rigid body will activate and fall, rather than float midair as before. Collision groups that do not intersect used to collide on the first frame. Now this has been fixed so that they collide appropriately. Thanks to agoose77 for his help. Reviewers: scorpion81, hg1, agoose77, sergof Reviewed By: agoose77, sergof Subscribers: sergof, moguri Projects: #game_physics, #game_engine Differential Revision: https://developer.blender.org/D1243
2015-04-02CleanupCampbell Barton
2015-03-27rename BGE attr from D1091 (match methods)Campbell Barton
2015-03-27BGE: New isDynamicSuspended python attributePorteries Tristan
This is a new KX_GameObject attribute that it increments the possibilities of optimization during the game Additionally the unused m_bSuspendDynamics variable is removed. Reviewers: moguri, agoose77, lordloki Reviewed By: agoose77, lordloki Subscribers: agoose77, lordloki Differential Revision: https://developer.blender.org/D1091
2015-03-23BGE: LoD Hysteresis clean upJorge Bernal
Move scene hysteresis value to KX_Scene where it should be (instead of KX_GameObject)
2015-03-22BGE: New hysteresis offset to improve LOD level transitionsJorge Bernal
This change introduces a new hysteresis parameter that it will be added or subtracted to/from the LOD distance to avoid popping when a LOD object moves close to the LOD transition continuously. Then, we have the following: - a new LOD Hysteresis setting per scene (default 10%) which is located in Scene context --> Level of Detail panel. This scene parameter also will active/deactive the scene hysteresis. - and a new LOD Hysteresis setting per object (default 10%) which is located in Object context --> Levels of Detail panel. The LOD hysteresis setting per object (if active) will overwrite the hysteresis setting per scene value. For the new blends: the hysteresis setting per scene would be active by default and the per object would be inactive by default. For the old blends: both hysteresis settings (per scene and per object) would be inactive by default. A quick way to take advantage of this feature for old blends would be to activate the hysteresis parameter in the scene context -> Level of Detail panel Reviewers: campbellbarton, kupoman, moguri Reviewed By: kupoman, moguri Subscribers: nonamejuju, lordodin Differential Revision: https://developer.blender.org/D957
2015-03-22BGE: Add physics constraints replicationThomas Szepe
This patch will add a physics constraints replication for group instances (dupli group). It also fix crashing when when a group instance is made from a linked group instance and both are on the active layer. Initial patch T31443 from moerdn (Martin Sell). Reviewers: lordloki, sergof, moguri, sybren Reviewed By: moguri, sybren Differential Revision: https://developer.blender.org/D658
2015-03-15BGE - new read-only attribute in KX_GameObject python api (LOD level)Pierluigi Grassi
Added a new "current_lod_level" property to the python api of KX_GameObject. The property returns the current lod level of the game object. The purpose of the property is activate logic routines only when an object is at a certain lod-distance from the camera, avoiding to separately recomputing the same distance in the logic script. Usage in python script might look like: owner = bge.logic.getCurrentController().owner lod_level = owner.currentLodLevel if lod_level == 0: ...do something else: ... object might be too distant Reviewers: dfelinto, kupoman, moguri Reviewed By: kupoman, moguri Subscribers: lordloki Projects: #game_engine Differential Revision: https://developer.blender.org/D978
2015-02-18BGE: Fix T41570: Blender crash when physics createConstraintJorge Bernal
Move physicsid type to unsigned long long to avoid crashes on Windows 8.1 64bits. Other systems also modified to put them inline with this solution. Reviewers: dfelinto, brita_, moguri, juicyfruit, campbellbarton Reviewed By: juicyfruit, campbellbarton Subscribers: juicyfruit Differential Revision: https://developer.blender.org/D1122
2015-02-08BGE physics: When colliding, report first contact point to PythonSybren A. Stüvel
This patch adds two parameters to the functions in the collisionCallbacks list. The callback function should thus be like this: ``` def on_colliding(other, point, normal): print("Colliding with %s at %s with normal %s" % (other, point, normal)) game_ob.collisionCallbacks.append(on_colliding) ``` The `point` parameter will contain the collision point in world coordinates on the current object, and the `normal` contains the surface normal at the collision point. The callback functions are checked for the number of arguments `co_argcount`. The new `point` and `normal` arguments are only passed when `co_argcount > 1` or when `co_argcount` cannot be determined. Reviewers: brita_, campbellbarton Subscribers: sergey, sybren, agoose77 Projects: #game_physics Differential Revision: https://developer.blender.org/D926
2015-01-15BGE physics: get/set linear and angular dampingSybren A. Stüvel
This patch adds the following R/W properties and method to `KX_GameObject`: - `linearDamping` -- get/set linear damping - `angluarDamping` -- get/set angular damping - `setDamping(linear, angular)` -- set both simultaneously These allow runtime changes to the same properties that are accessible at design time in Blender's UI via `game.damping` and `game.rotation_damping`. The names of the properties were chosen to mirror the internal names of the BGE physics engine, as these are (AFAIK) also the commonly used names in physics literature. Reviewers: campbellbarton Projects: #game_physics Differential Revision: https://developer.blender.org/D936
2015-01-08Revert "Fix T40257: Frustum culling not working properly"Mitchell Stokes
This reverts commit 315609ec0c1e28eb12bde3e8bbd2a5b03672b1a9. This fix still causes more issues than it solves.
2014-11-21Cleanup: typoCampbell Barton
2014-10-11Fix another crash with Navigation mesh.Benoit Bolsee
Navigation mesh object need to access the current scene at creation time. This can be at scene start or when an object is instantiated from an inactive layer. The method of getting the scene differs in these cases. This fix handles both.
2014-08-09BGE: Fix bug with Steering Actuator Python API.Benoit Bolsee
It was not possible to set the navmesh attribute from Python due to a double bug.
2014-07-12BGE debug API and actuatorHG1
This patch adds some new debug methods to the KX_GameObject for manually adding the debug list and bge.render for controlling the debug visualization. It also adds a new debug actuator, which allows to control the same functions. This patch is a updated version of T33701. Thread on Blenderartists: http://blenderartists.org/forum/showthread.php?264745-Debug-proerties-for-added-objects-patch&p=2256018&viewfull=1#post2256018 Reviewers: moguri Reviewed By: moguri Differential Revision: https://developer.blender.org/D635
2014-07-11Fix T40257: Frustum culling not working properlyMitchell Stokes
This is mostly the same fix as before, but now code depending on culling checks is executed after KX_Scene->CalculateVisibleMeshes(). As a side-effect, LoD checks and animation culling now use the current frame's culling information rather than the previous frame's.
2014-07-10Revert "Fix T40257: Frustum culling not working properly"Mitchell Stokes
This reverts commit 978dba4616852e0b94374f2ae56934049d9b3669. The change still doesn't provide accurate culling information, and actually breaks animation culling.
2014-07-07BGE: Fix for applyImpulse functionJorge Bernal
This is related to task T29419. Credit also goes to Goran Milovanovic (goran) for proposing an initial fix for this issue. The issue is the current behavior of applyImpulse doesn't match the behavior described in the documentation as instead of a impulse point in world coordinates, it seems to require a coordinate in a local space. Additionally, applyImpulse function isn't consistent with similar functions (applyForce, applyTorque, etc) as it doesn't allow to choose in which space (local or global) the impulse is applied. Now, we have the following function: applyImpulse(point, impulse, local=False) being "point" the point to apply the impulse to (in world or local coordinates). When local is False will have both point and impulse in World space and when local is True will have point and impulse in local space. Reviewers: moguri, dfelinto, brita_ Reviewed By: moguri Differential Revision: https://developer.blender.org/D567
2014-07-03Fix T40912: Collision Callbacks Don't Work if Set DirectlyMitchell Stokes
2014-07-01Fix T40257: Frustum culling not working properlyMitchell Stokes
Adding a hack so that KX_GameObjects' culling status is updated based on mesh slots.
2014-05-15Fix T40182: Crash when using KX_GameObject.rayCast/rayCastTo().Mitchell Stokes
Missed another parent->release().
2014-05-05Fix T39928: Blender crash/freeze when game engine is started with animation ↵Mitchell Stokes
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-01BGE cleanup: KX_GameObject::GetParent() no longer increases the object's ↵Mitchell Stokes
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-24COmpilation error fix after recent cleanup in BGESergey Sharybin
2014-04-24BGE Cleanup: Moving reinstancing physics shapes from KX_ConvertPhysicsObject ↵Mitchell Stokes
to PHY_IPhysicsController This was the last item in KX_ConvertPhysicsObject. Therefore, KX_ConvertPhysicsObject.h and KX_ConvertPhysicsObjects.cpp have been removed.
2014-04-16Fix T39509: Crash when assign an empty as a LoDDaniel Stokes
Missing check when looking for appropriate LoD
2014-02-15Fix T37964: KX_GameObject missing NULL checks for m_physicsController.Mitchell Stokes
KX_GameObject::PySuspendDynamics() and KX_GameObjectPyRestoreDynamics() now make sure GetPhysicsController() is non NULL before attempting to use it.
2014-02-14Code cleanup: duplicate headersCampbell Barton
2013-12-18Game Engine: Level of detail support and toolsDaniel Stokes
Levels of detail can be added and modified in the object panel. The object panel also contains new tools for generating levels of detail, setting up levels of detail based on object names (useful for importing), and clearing an object's level of detail settings. This is meant as a game engine feature, though the level of details settings can be previewed in the viewport. Reviewed By: moguri, nexyon, brecht Differential Revision: http://developer.blender.org/D109
2013-12-09Game Engine: Option to record static objects animationJames Yonan
2013-11-04BGE: Cleaning up the BGE's physics code and removing KX_IPhysicsController ↵Mitchell Stokes
and KX_BulletPhysicsController. Instead, we just use PHY_IPhysicsController, which removes a lot of duplicate code. This is a squashed commit of the following: BGE Physics Cleanup: Fix crashes with LibLoading and replication. Also fixing some memory leaks. BGE Physics Cleanup: Removing KX_IPhysicsController and KX_BulletPhysicsController. BGE Physics Cleanup: Moving the replication code outside of KX_BlenderBulletController and switching KX_ConvertPhysicsObjects to create a CcdPhysicsController instead of a KX_BlenderBulletController. BGE Physics Cleanup: Getting rid of an unsued KX_BulletPhysicsController.h include in KX_Scene.cpp. BGE Physics Cleanup: Removing unused KX_IPhysicsController and KX_BulletPhysicsController includes. BGE Physics Cleanup: Removing m_pPhysicsController1 and GetPhysicsController1() from KX_GameObject. BGE Physics Cleanup: Remove SetRigidBody() from KX_IPhysicsController and remove GetName() from CcdPhysicsController. BGE Physics Cleanup: Moving Add/RemoveCompoundChild() from KX_IPhysicsController to PHY_IPhysicsController. BGE Physics Cleanup: Removing GetLocalInertia() from KX_IPhysicsController. BGE Physics Cleanup: Making BlenderBulletCharacterController derive from PHY_ICharacter and removing CharacterWrapper from CcdPhysicsEnvironment.cpp. Also removing the character functions from KX_IPhysicsController. BGE Physics Cleanup: Removing GetOrientation(), SetOrientation(), SetPosition(), SetScaling(), and GetRadius() from KX_IPhysicsController. BGE Physics Cleanup: Removing GetReactionForce() since all implementations returned (0, 0, 0). The Python interface for KX_GameObject still has reaction force code, but it still also returns (0, 0, 0). This can probably be removed as well, but removing it can break scripts, so I'll leave it for now. BGE Physics Cleanup: Removing Get/SetLinVelocityMin() and Get/SetLinVelocityMax() from KX_IPhysicsController. BGE Physics Cleanup: Removing SetMargin(), RelativeTranslate(), and RelativeRotate() from KX_IPhysicsController. BGE Physics Cleanup: Using constant references for function arguments in PHY_IPhysicsController where appropriate. BGE Physics Cleanup: Removing ApplyImpulse() from KX_IPhysicsController. BGE Physics Cleanup: Removing ResolveCombinedVelocities() from KX_IPhysicsController. BGE Physics Cleanup: Accidently removed a return when cleaning up KX_GameObject::PyGetVelocity(). BGE Physics Cleanup: Remove GetLinearVelocity(), GetAngularVelocity() and GetVelocity() from KX_IPhysicsController. The corresponding PHY_IPhysicsController functions now also take Moto types instead of scalars to match the KX_IPhysicsController interface. BGE Physics Cleanup: Moving SuspendDynamics, RestoreDynamics, SetMass, GetMass, and SetTransform from KX_IPhysicsController to PHY_IPhysicsController. BGE Physics Cleanup: PHY_IPhysicsEnvironment and derived classes now use the same naming scheme as PHY_IController. BGE Physics Cleanup: PHY_IMotionState and derived classes now use the same naming convention as PHY_IController. BGE Phsyics Cleanup: Making PHY_IController and its derived classes follow a consistent naming scheme for member functions. They now all start with capital letters (e.g., setWorldOrientation becomes SetWorldOrientation). BGE Physics Cleanup: Getting rid of KX_GameObject::SuspendDynamics() and KX_GameObject::RestoreDynamics(). Instead, use the functions from the physics controller. BGE: Some first steps in trying to cleanup the KX_IPhysicsController mess. KX_GameObject now has a GetPhysicsController() and a GetPhysicsController1(). The former returns a PHY_IPhysicsController* while the latter returns a KX_IPhysicsController. The goal is to get everything using GetPhysicsController() instead of GetPhysicsController1().
2013-09-14BGE: Adding a Python collision API. The initial patch was provided by ↵Mitchell Stokes
agoose77, with some edits by me. KX_GameObject now has a collisionCallbacks list which is a list of callables that are called when a collision occurs. The callables will be called with an argument that contains a reference to the other object involved in the collision (i.e., not self).
2013-08-15BGE: Finally adding support for additive layer blending.Mitchell Stokes
Currently this is only for the Python API. The logic brick will be updated in a future commit.
2013-07-19Fix some definitions for MinGW64Antony Riakiotakis
2013-06-14BGE: Fixing a bug that caused KX_GameObject.localTransform to give incorrect ↵Mitchell Stokes
results.
2013-05-15BGE: A little bit of cleanup:Mitchell Stokes
* Removing KX_Scene::RemoveAnimatedObject() since KX_Scene::NewRemoveObject() is already handling this. * Don't create a new BL_ActionManager when replicating an object. Just set m_actionManager to NULL and let KX_GameObject::GetActionManager() allocate a new BL_ActionManager when one is needed. * Use KX_GameObject::GetScene() instead of KX_GetActiveScene() in KX_GameObject::GetActionManager() to make sure we're using the object's scene instead of one where Python might currently be running from. This could avoid potential issues with playing actions for objects in other scenes.
2013-05-03bge py api: raise an overflow exception when assigning a float to a bge ↵Campbell Barton
object which is out of the float range. also avoid raising exceptions by ConvertPythonToValue when they will be ignored.
2013-04-05code cleanup: bge warningsCampbell Barton
2013-03-26style cleanup:Campbell Barton
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-05code cleanup: also change BKE_blender.h BLENDER_VERSION_CHAR to 'a' so as ↵Campbell Barton
not to confuse things.
2013-02-11BGE: Fix for issue #32606 "Raycasts are locked to the scene of calling ↵Mitchell Stokes
object" reported by Josiah Lane (solarlune). The raycasting functions were using the active scene instead of the object's scene.
2013-01-23make bullet optional againCampbell Barton