Commit Graph

3221 Commits

Author SHA1 Message Date
Quentin Wenger
49aa7b1261 BGE: Fix color used as background in VideoTexture.
Now we use color converted (if we do a color management) by the setter for background color in VideoTexture (ImageRender & ImageMirror).

Reviewers:panzergame
2015-06-24 13:03:23 +02:00
Porteries Tristan
d979ac4cc9 BGE: Fix T45110, T44174, armature animations update and mirror render.
Reveiwers:Moguri, Matpi, youle
2015-06-22 18:16:31 +02:00
Porteries Tristan
2a305580b2 BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy
Fix T38030.
In c++ source we use one list for triangles and an other for quads, but KX_PolyProxy doesn't care about that and return the vertex offset in its list. So we just have to compute the offset of each RAS_DisplayArray to its previous to have an absolute vertex index.

Reviewers: moguri, campbellbarton, kupoman, agoose77, brita_, hg1

Reviewed By: agoose77, hg1

Projects: #game_engine

Maniphest Tasks: T38030

Differential Revision: https://developer.blender.org/D1324
2015-06-20 14:21:31 +02:00
Campbell Barton
6b3a43ccb4 BGE: dissallow calling reverse on internal clists 2015-06-20 20:02:16 +10:00
Jorge Bernal
51188ecbf1 BGE Cleanup: Translation of several comments in Dutch 2015-06-20 01:19:32 +02:00
Jorge Bernal
8e1ba0b805 BGE Cleanup: remove dead code at SetCenterOfMassTransform
Basically, at this line body is always NULL and the code is never
executed

Reviewers: moguri, hg1, panzergame, agoose77

Reviewed By: hg1, panzergame, agoose77

Subscribers: blueprintrandom

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1331
2015-06-20 01:00:22 +02:00
Porteries Tristan
e9406256d0 BGE: Simplify collision callback registration.
Remove list m_triggerController and just use getter CcdPhysicsController->Registered().

Reviewers: sybren, agoose77
2015-06-19 16:40:42 +02:00
Campbell Barton
94eb2647d5 BGE: correct case for createConstraint keyword 2015-06-16 21:22:41 +10:00
Campbell Barton
fa823dc828 Cleanup: style 2015-06-16 10:32:41 +10:00
Jorge Bernal
6d63446710 BGE: Fix for precision lost in setBackground/getBackground at Video Texture
Now internally the variables are processed as floats avoiding int->float->char conversions that are causing precision lost.

A check for int numbers is maintained to keep compatibility with old behaviour.

Reviewers: ben2610, campbellbarton, moguri, hg1

Reviewed By: moguri, hg1

Subscribers: campbellbarton

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1301
2015-06-16 00:05:25 +02:00
Porteries Tristan
1c707a2392 BGE: Fix T43918: adding submodule bge.app including attribute version.
This patch adds the submodule app to bge. apps contains constants similar to bpy.app, particularly version (tuple of three ints like 2.75.1).

It was requested in T43918 and set as TODO.

The patch also adds rst doc for the module.

Reviewers: moguri, kupoman, lordloki, panzergame, campbellbarton

Reviewed By: lordloki, panzergame, campbellbarton

Subscribers: marcino15

Projects: #game_logic, #game_python, #game_engine

Differential Revision: https://developer.blender.org/D1348
2015-06-15 21:46:56 +02:00
Campbell Barton
5b8af1d1f1 Fix T44704: BGE regression importing bpy.types 2015-06-15 21:11:45 +10:00
Campbell Barton
edfe2d6691 BGE: fix use after free 2015-06-15 20:56:44 +10:00
Campbell Barton
75a86d6a8e Fix for building without Python 2015-06-14 04:53:10 +10:00
Mitchell Stokes
5aade17bdf Revert "BGE : KX_VertexProxy support for more than 2 UV channel."
This reverts commit fb0dd596e9a58f095730359a11759c40ea46be44.

This commit reintroduced a deprecated API that we'd rather not see in a
release. A better solution is being worked on.
2015-06-06 13:12:27 -07:00
Jorge Bernal
b2e5c017a1 BGE: correct ftell use in LoadGlobalDict 2015-06-05 11:16:46 +10:00
Jorge Bernal
f3434e5f82 BGE Cleanup: remove dead code for collide, visible and twoside variables
As material is not NULL at this stage there is no need to do a NULL
check. Also to remove dead code

Reviewers: dfelinto, panzergame, hg1, moguri

Reviewed By: panzergame, hg1, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1330
2015-06-05 02:24:23 +02:00
Campbell Barton
33a7b72678 Fix T44919: BGE marhutils attrs leak memory 2015-06-02 11:08:17 +10:00
Jorge Bernal
28ef76d0f0 BGE Cleanup: Removing flen variable where it is not used 2015-05-30 18:30:34 +02:00
Jorge Bernal
71dcaa7744 BGE Cleanup: Identical code for both if/else branches 2015-05-30 18:15:11 +02:00
Jorge Bernal
9755986637 BGE: Fix memory leak when unable to add wheel 2015-05-29 17:03:54 +02:00
Jorge Bernal
bdf242fa21 BGE Cleanup: Remove old commented Sumo physics code 2015-05-28 17:50:39 +02:00
Jorge Bernal
3b158d2e05 BGE Cleanup: The value of ikconstraint cannot be NULL at this stage and
therefore it is not necessary the NULL check.
2015-05-28 17:18:50 +02:00
Thomas Szepe
9aea98d33c BGE: Add missing m_jumping initialization 2015-05-27 18:19:38 +02:00
Porteries Tristan
153cebd95b BGE: Fix bug with default material and MTFace.
It set default material even if there are a MTface but no blender material.
Tested in GLSL and Multitexture.

Reviewers: HG1
2015-05-25 10:33:04 +02:00
Porteries Tristan
2da9a39418 BGE : Fix black material on meshes without materials in blenderplayer.
Blenderplayer forgot to initialize the default material (defmaterail) with function init_def_material().
This reverts also the plumber commit 2fa4a48bcef05671890fafc3fe50a8fa619f0259.

Reviewers: campbellbarton
2015-05-24 11:46:57 +02:00
Campbell Barton
5d30c23c35 doxygen: corrections/updates
Also add depsgraph & physics
2015-05-20 14:12:22 +10:00
Porteries Tristan
a1e8547877 BGE: Use CameCase code style for KX_WorldInfo python API. 2015-05-19 23:13:30 +02:00
Porteries Tristan
377822729c BGE: Fix T40555: LibLoad material caching issue
Previously we don't merge material cached list, it create dangling pointer and memory leak.
Now we merge material cache list during the scene merge, and remove material in this list during the library free.

Reviewers: agoose77, dfelinto, hg1, pgi, campbellbarton, moguri

Reviewed By: campbellbarton, moguri

Subscribers: campbellbarton, youle, kupoman

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1278
2015-05-19 19:24:14 +02:00
Porteries Tristan
0b5bf9d419 BGE: Fix T42244 LibLoad crash with logic brick KX_TouchSensor
I remove duplicate and wrong code which treat the special case of KX_TouchSensor.
And Also the re-conversion of linked logic brick.
2015-05-17 22:19:09 +02:00
Porteries Tristan
3b359f1fea BGE: Fix T43761 No re-creation of display list after a mesh modification.
I also removed unused flags in RAS_ListRasterizer.cpp.
2015-05-17 12:53:57 +02:00
Porteries Tristan
5dc22fbbfb BGE: Fix T41299 Group API for child object in dupli instance group. 2015-05-15 19:17:15 +02:00
Porteries Tristan
3d658bf7a7 BGE: Fix stupid typo error in DupliGroupRecurse 2015-05-15 16:25:45 +02:00
Porteries Tristan
371e5f25a0 BGE: Cleanup : merge 3 loop in 1 in function DupliGroupRecurse. 2015-05-15 16:20:06 +02:00
Porteries Tristan
2fa4a48bce BGE: Fix T44700 mesh without material in blenderplayer.
If a mesh doesn't have a material we don't initialize the mSavedData in KX_BlenderMaterial to avoid crash.
2015-05-15 14:54:38 +02:00
Thomas Szepe
e7f2aec81b BGE: Add 'Lock Translation' for dynamic objects
The XYZ translation lock was missing for dynamic object.

Reviewed By: panzergame
2015-05-14 15:23:42 +02:00
Thomas Szepe
8bf9e1412f BGE: Fix: Double jumps are not working with character motion actuator
The actual character motion actuator triggers every frame the jump method.
Adding an edge detection to trigger the jump method.

Reviewers: lordloki, sybren, moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D1220
2015-05-14 09:45:51 +02:00
Thomas Szepe
687f6a9752 BGE: Code Cleanup: LOD hysteresis calculation
* Cleanup duplicated code.
* Remove unnecessary "this->"

Reviewers: kupoman, lordloki

Reviewed By: kupoman, lordloki

Differential Revision: https://developer.blender.org/D1293
2015-05-14 09:40:03 +02:00
Porteries Tristan
909d3228b1 BGE : Fix Bullet shape margin for triangle mesh static objects 2015-05-12 13:38:46 +02:00
Mitchell Stokes
8478c71a7b BGE: Adding material IPO support to GLSL materials
Most of this patch was created by Daniel Stokes, I'm mostly just cleaning
it up and testing it. Still todo: hardness. I need to figure out how to
handle the integer -> float conversion on a dynamic uniform.

Reviewers: psy-fi, brecht

Reviewed By: psy-fi

Subscribers: psy-fi

Differential Revision: https://developer.blender.org/D511
2015-05-11 23:05:04 -07:00
Porteries Tristan
4d8f7eddda BGE : Fix crash during physics mesh update.
Currently we can't update the physics mesh of an added rigid body.
The cause is that that we need to update all shapes to say that the mesh was changed, for static object we don't do that previously because we use a odd way to reallocate memory at the same place.
So now when a mesh is changed we iterate all physics controllers which use the same shape info and recreate its shape with the correct mesh.

example file : {F168100}

Reviewers: scorpion81, sergof, hg1, sybren, moguri, agoose77

Reviewed By: moguri, agoose77

Subscribers: sybren

Differential Revision: https://developer.blender.org/D1269
2015-05-10 19:21:21 +02:00
Jorge Bernal
dc95ca92ca BGE: Fix T43822 Videotexture does not use sky color for off-screen
rendering

Make scene background color as default for render-to-texture instead of
current blue color (0, 0, 255).

It is very useful for mirrors setups.

Reviewers: moguri, ben2610, sybren, panzergame, hg1

Reviewed By: panzergame, hg1, moguri

Subscribers: mpan3

Differential Revision: https://developer.blender.org/D1287
2015-05-10 00:56:51 +02:00
Porteries Tristan
8647c7d501 Fix T38335: incorrect triangle index in raycast with more than 2 quads
eb81153896 broke the fix for T38335, and this fix was incomplete, now we iterate by triangles and polys in the same while block.
2015-05-09 19:12:22 +02:00
Campbell Barton
eb81153896 Cleanup: warning (sequence-point) 2015-05-09 11:00:50 +10:00
Porteries Tristan
6ee0327594 Fix T38335: incorrect triangle index in raycast result
Previously we forgot to do a special operation for indexes to convert a quad to two triangles.
2015-05-08 21:12:36 +02:00
Porteries Tristan
2e6634e4a8 BGE: Cleanup function UpdateMesh and SetMesh in CcdPhysicsController.cpp
"if (value == true)" -> "if(value)"
"if (ptr == NULL)" -> "if (!ptr)"
"vector<bool>" -> "std::vector<bool>"
And other blender typo.
2015-05-08 18:17:37 +02:00
Porteries Tristan
fb0dd596e9 BGE : KX_VertexProxy support for more than 2 UV channel.
I have added an optional named "index" argument for methode get/setUV, I have also modified the and set to deprecated methodes setUV2 and getUV2 : the doc was wrong and the methode can't be called anyway because it declared as VARARG in the .h and convert directly the args value to a vector in the .cpp.

Reviewers: sybren, lordloki, hg1

Reviewed By: lordloki, hg1

Subscribers: agoose77

Differential Revision: https://developer.blender.org/D1240
2015-05-06 22:55:46 +02:00
Porteries Tristan
15751238d5 BGE: Fix compound child shape added on instance game object 2015-05-06 14:23:22 +02:00
Porteries Tristan
4616a7a4d3 BGE: Fix collision callbacks for compound controllers
It fix some mistakes in b5e96530353ef22d184a60cd2b59a5e451ee211f and made a more safety behavior for collision callbacks used in compound controllers during adding and removing.
2015-05-05 19:54:12 +02:00
Porteries Tristan
b5e9653035 BGE: Remove function DisableCcdPhysicsController and EnableCcdPhysicsController in CcdPhysicsEnvironment
Replace EnableCcdPhysicsController by AddCcdPhysicsController and DisableCcdPhysicsController by RemoveCcdPhysicsController.
Tested with compound shapes and collision sensors.

Reviewers:agoose77, ideasman42
2015-05-05 15:18:29 +02:00