Commit Graph

2305 Commits

Author SHA1 Message Date
Campbell Barton
7cc206ddca Code Cleanup: remove non existing function declarations.
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
2012-02-29 15:00:37 +00:00
Campbell Barton
ed04c21374 code cleanup: use float vector size in function definitions, and const's where the values are unchanged. 2012-02-28 14:05:00 +00:00
Campbell Barton
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
Daniel Stokes
b200c7a4df Fixing a crash when converting physics objects in the Game Engine. 2012-02-26 21:57:51 +00:00
Campbell Barton
3fc2fbc333 style cleanup, use { on newline after function definition.
spelling 'impliment' -> 'implement'
2012-02-25 16:49:59 +00:00
Joerg Mueller
697b494a30 Fix for #30336: Couldn't playback from Python without having played back via logic bricks once.
Thanks Colin Nickerson for reporting.
2012-02-24 19:34:29 +00:00
Campbell Barton
6cfb67b549 fix for meshes not showing up in the game engine. 2012-02-23 14:24:45 +00:00
Campbell Barton
b8e019d839 use __ prefix on header guards to avoid mixing up defines with api functions / classes. 2012-02-23 10:41:31 +00:00
Sergey Sharybin
d881bb4b32 BGE is compilable by MSVC again
Compilation error was mostly caused by trying to use namespace std before it was
actually defined (e.g. before any include of stl header).
It's not actually good idea to use namespaces in header files -- it's really easy to
run into namespace conflicts and so. Resolved by not using "using namespace" in header
files and using full quality accessing to stl collections (e.g. std::vector).
2012-02-23 09:40:10 +00:00
Campbell Barton
190f5d1787 code cleanup: dont set the namespace in STR_String.h - 'using namespace std', since this is included in many places. 2012-02-23 02:36:30 +00:00
Campbell Barton
40c59b1a3d minor edits to have the game engine and player building. 2012-02-19 23:36:10 +00:00
Campbell Barton
bd0f7a290b svn merge ^/trunk/blender -r44213:44235 --- fixes bmesh shading bug [#30125] 2012-02-19 03:19:58 +00:00
Benoit Bolsee
2478db9d37 BGE bug #30173: ImageRender not working when initialized on frame 1. This was because the canvas display area was initialized on render frame 1, which happens after logic frame 1. Fixed in blender and player by initializing the area on canvas creation. 2012-02-18 15:25:31 +00:00
Campbell Barton
428f031237 svn merge ^/trunk/blender -r44076:44118 2012-02-15 12:08:06 +00:00
Dalai Felinto
91058355cc font objects in blenderplayer fail when object with alpha is rendered
the embed bge has its own DisableForText() routine which prepares the GL flags for the text render.

For some reason blenderplayer is taking a slim approach and going straight for the rendering. This routine helps to address this bug/case (non reported, foundin my own project files). If need arises we should move this to its own routine incorporating the other GL tests the embed bge performs.
2012-02-14 18:23:58 +00:00
Mitchell Stokes
6905d0d92b Fixing up some buggy cleanup code in BL_ShapeDeformer. This code was causing crashes and corrupting shape keys. This commit fixes the following bugs:
[#30059] Shape Keys is gone in Blender if you use Add Object Actuator in BGE
[#30024] Segmentation fault after addObject when using shape keys
[#28683] segfault in shapekey conversion code when running a game (YF, level home) twice
2012-02-14 07:54:12 +00:00
Campbell Barton
5ea86e1e2b svn merge ^/trunk/blender -r43995:44024 2012-02-11 04:10:50 +00:00
Dalai Felinto
6a598148a7 bge font objects: fix for difference in size when object has a parent
for after 2.62 I would like to try if using doubles would help to increase the precision here.

Also now that the mipmap patch is reverted we may want to look at this problem from a different perspective.
RES could be calculated taking the object size in relation to the camera (i.e. size and distance, ignoring rotation).
That may solve both problems of wrong resolution and lack of smoothness.

For the time being users still need to use object.resolution to fine tune the rendered text.
2012-02-10 07:52:21 +00:00
Dalai Felinto
17dadffd66 reverting commit [43876] Fix for aliased fonts in the game engine 2012-02-10 06:18:32 +00:00
Dalai Felinto
e90e522942 bugfix [#30127] alpha in FontObjects not working in blenderplayer 2012-02-10 05:10:52 +00:00
Campbell Barton
19d0f93099 svn merge ^/trunk/blender -r43934:43976 2012-02-08 05:45:16 +00:00
Joerg Mueller
77ab18ebc3 Fix for [#29910] Crash on reading KX_SoundActuator.sound
aud is now imported automatically on BGE start.
2012-02-07 11:22:50 +00:00
Campbell Barton
3937ec7d11 svn merge ^/trunk/blender -r43887:43918 2012-02-05 22:13:10 +00:00
Benoit Bolsee
223216a36f BGE bug #21947: Softbodies not using object size. Fixed by scaling the shape before creating the soft body. 2012-02-05 09:32:35 +00:00
Campbell Barton
d0412a1981 svn merge ^/trunk/blender -r43864:43887 2012-02-05 02:30:30 +00:00
Benoit Bolsee
4c7e769aa1 BGE bug #29133: Render to Texture not working. Fixed by using same viewport to render and capture. 2012-02-04 17:20:38 +00:00
Alex Fraser
a05fdb837b Fix for aliased fonts in the game engine.
- Mipmaps are generated in BLF when drawing text in-game. In that case, padding around each glyph is increased to prevent bleeding.
 - Texture filtering is turned on for in-game text.
 - All glyphs are now "twisted": the leading edge is brought a small distance forward, to prevent z-fighting in overlapping (kerned) glyphs. This happens both in the game engine and the rest of the UI, but should have no effect in the UI due to Z-compression in the clipping matrix.
Reviewed and approved by bdiego; see patch [#29882] in the tracker. Tested by dfelinto.
2012-02-04 01:51:59 +00:00
Campbell Barton
075fee4d58 svn merge ^/trunk/blender -r43830:43864 2012-02-03 01:30:21 +00:00
Sergey Sharybin
6a30321434 Fix #29381: Navmeshs frees not guarded allocated memory and leaked
There were two issues discovered:
- Triangles mapping didn't free in buildNavMeshData if there's no recast data for an object
- KX_NavMeshObject used not-guarded allocation for polygons storage, but used guarded
  freeing stuff to free used memory, producing error messages in the console and leading to
  memory leak.

Wasn't actually harmful for users -- there was no memory corruptions and error happens only
when object was set up in a way when navmesh can't work in theory.
2012-02-02 08:48:43 +00:00
Campbell Barton
4aa82806ef svn merge ^/trunk/blender -r43751:43819, need to look into changes made to editmesh_loop.c from this range still 2012-02-01 09:31:13 +00:00
Dalai Felinto
359917fb2b pydoc cleanup + remove unused bge.logic constants
+ adding PINGPONG as action actuator constant in rst
2012-01-30 06:47:01 +00:00
Campbell Barton
5cc898ada2 svn merge ^/trunk/blender -r43616:43639 2012-01-23 16:46:35 +00:00
Mitchell Stokes
62963525ce Fix for "[#29911] Crash on reading BL_ActionActuator.channelNames"
The crash occurred when an action actuator was attached to a non-armature object because objects that aren't armatures do not have pose data. A NotImplementedError is now raised if someone tries to access any of the following with an action actuator attached to a non-armature object:

BL_ActionActuator.channelNames
BL_ActionActuator.getChannel()
BL_ActionActuator.setChannel()
2012-01-22 23:15:35 +00:00
Mitchell Stokes
686ce92fe8 Committing patch "[#27676] Change window size/resolution in realtime" by me.
Description:
This patch allows the user to change the size of the window (or the resolution in fullscreen mode) using the new bge.render.setWindowSize() method. This only works in the Blenderplayer since it doesn't make a whole lot of sense for the embedded player.
2012-01-22 20:25:25 +00:00
Campbell Barton
4966982a5a svn merge ^/trunk/blender -r43564:43609 2012-01-22 18:04:35 +00:00
Mitchell Stokes
57d48d4493 Committing patch "[#29763] Adding an active_events property to SCA_PythonKeyboard and SCA_PythonMouse"
Here is the description:
As the summary says, this patch adds a new event to both SCA_PythonKeyboard and SCA_PythonMouse. This property is similar to the events property that both have, but it only returns events which are not KX_NO_INPUTSTATUS. This moves the "no input" check from Python to C, which gave my input handling code a 2x speed up. Python sucks (performance-wise) with iterating lists and SCA_PythonKeyboard has close to 200 events (I think something like 177, but I don't know for sure).
2012-01-22 05:45:56 +00:00
Dalai Felinto
6964b5a6c4 cucumber merge: world scaling + video texture constants
revisions: 38166,38167,38177,38179,38180,38187,38242

To be implemented after merge:
1) add pydocs(rst) for the video texture new defines
2) see if a NodeSetLocalMatrix would fit well

#43439 by kupoman
Changing the worldTransform and localTransform python attributes to use BLI_math to simplify the code

#38242 by kupoman
Adding the constants SOURCE_ERROR, SOURCE_EMPTY, SOURCE_READY, SOURCE_PLAYING, SOURCE_STOPPED to the video texture module. Updates to the documentation will follow after a merge with trunk

#38187 by kupoman
Updates to the documentation to reflect that worldScale is now writable, and added localTransform and worldTransform to KX_GameObject.

#38180 by kupoman
The Transform attribute of KX_GameObject was based on world space data. I converted that one to worldTransform, and added a localTransform for local space transform information.

#38179 by kupoman
Fixed the transform attribute of KX_GameObject's set method to properly deal with negative scaling.

#38177 by kupoman
Updated the transform property on KX_GameObject so that it is now read/write, and added the corresponding set method. Also simplified the get method by calling GetOpenGLMatrix instead of making the matrix myself.

#38167 by kupoman
Adding a read only transform attribute to KX_GameObject that returns a 4x4 matrix representing the object's transformations.

#38166 by kupoman
Adding a worldScale attribute to KX_GameObject. This attribute scales the object independently of its parent's scale.
2012-01-22 03:21:28 +00:00
Campbell Barton
ae771e742b change filepath limit from 240 to 1024 2012-01-21 14:54:53 +00:00
Campbell Barton
944dfa23c4 svn merge ^/trunk/blender -r43392:43420 2012-01-16 11:50:17 +00:00
Campbell Barton
ae9b4b81cb opengl render save ignored alpha settings. also some FILE_MAX defines missed last commit. 2012-01-16 06:43:58 +00:00
Campbell Barton
fb4ad50cee use defines for property name lenghths in the BGE, were using 31,32,64,100. 2012-01-16 05:27:11 +00:00
Campbell Barton
705f23064e svn merge ^/trunk/blender -r43294:43338 2012-01-13 01:39:57 +00:00
Kent Mein
9dc992a3fd Some small fixes to get things compiling on solaris with cmake.
There are also some changes that need to be done to libmv but I'm 
leaving those out so I can get it patched upstream first.

(Only works with gcc/g++ if we want to use sun's compiler we would need
to get rid of all of our annonymous structs which I don't think
we want to do at this point, example:

typedef struct wmNDOFMotionData {
        union {
                float tvec[3]; // translation
                struct { float tx, ty, tz; };   // this would need to be fixed
		// something like this or something similar:
                struct { float x, y, z; } t;
                };
...
)

Kent
2012-01-12 16:31:27 +00:00
Campbell Barton
a3d1e35d5e de-duplicate object conversion code in BGE 2012-01-12 09:02:29 +00:00
Dalai Felinto
de86d89a9f Cucumber - AA for blenderplayer and fullscreen
..............................................
svn merge ^/branches/soc-2011-cucumber -r 38968,38970,38973,39045,40845

Notes:
======
*  we replaced fullscreen by playerflag in DNA_scene.types.h. So no doversion here, I think this is a small reversion can't see any potential problem in forcuing users to re-check fullscreen. If the file is really old (<250) it will doversion though;

* (for after commit) it would be nice to gray out the width/height when desktop=True

* for a rainy day: it would be nice to have other ghost modes (e.g. screensaver) to support desktop + MSAA as well. It's not a huge deal given that I don't even know if anything else work (apart from windowed, fullscreen and embed) but it doesn't hurt to have it updated as well.

* there is something strange with outliner. I think space_outliner merge-info is not in sync with the ^/ folder. It's probably a wrong merge early in cucumber.

Commit Logs:
===========
# 40845 by dfelinto
remove desktop and fullscreen properties. They are both part of playerflag now
also I removed the fullscreen from the DNA completely. I don't think we need doversion that..

#39045 by kupoman
The Desktop option is now greyed out when fullscreen is not checked rather than disappearing from the UI completely.

#38973 by kupoman
Adding a checkbox to the UI to allow the full screen Blender Player to use the current desktop resolution instead of the resolution setting.

#38970 by kupoman
Multisampling now works in a fullscreen Blender Player.

#38968 by moguri
Committing a patch from Mitchell Stokes (Moguri) to include a setting in the UI for the Blenderplayer multisampling.
2012-01-11 20:53:22 +00:00
Campbell Barton
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +00:00
Campbell Barton
b308e61312 svn merge ^/trunk/blender -r43220:43278 --accept postpone 2012-01-11 14:14:04 +00:00
Dalai Felinto
782f0b6382 bge camera actuator: -X and -Y axis
The camera actuator only allows to look the object from its front face.

Given that Blender takes -Y as the default forward orientation, the current
functionality doesn't let a camera to track an actor from behind.

This patch allows for -X and -Y axis tracking. This way a camera over the
shoulders of a character is possible (without resorting to rotate the
mesh/armature original orientation.

- patch reviewed by Campbell Barton, thanks
2012-01-11 07:27:39 +00:00
Campbell Barton
cda5d1769d minor changes to BLF api use
- replace calls to BLF_width & BLF_height --> BLF_width_and_height
- no need to call strlen() on length value passed to BLF_draw(). this already checks for \0 char.
2012-01-11 05:45:39 +00:00
Campbell Barton
348f116fe5 svn merge ^/trunk/blender -r43124:43160 2012-01-05 11:23:24 +00:00