Commit Graph

2378 Commits

Author SHA1 Message Date
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
Dalai Felinto
bcd6c84a66 bugfix [#30760] edit text property bug
backspace was messing up with utf8 text.
hijacking Blender utf8 functions

tested in CMake but I think scons should work too. No idea about pure 'make'
Happy Easter ;)
2012-04-09 01:42:44 +00:00
Jason Wilkins
dabcdc1532 Warning Fixes - const correctness in unicode encoding, unused variables in blenlib, and some type conversions
This is from a patch that is in the tracker, but it leaves out a fix of BLI_gzopen which needs more work.
2012-04-09 01:16:19 +00:00
Campbell Barton
df29e91a69 code cleanup: header cleanup, remove commented workaround for mingw since its no longer needed. 2012-04-06 04:46:47 +00:00
Dalai Felinto
110a1526b6 spherical panoramic fix
note: this was never correct and not a single soul bothered noticing that.
not really a surprise, this mode is more for debug than for anything else.
to test go to (game engine) Render -> Dome Mode -> Spherical Panorama

thanks to Aldo Zang to help me spotting the problem.
2012-04-05 22:06:45 +00:00
Mitchell Stokes
62b254e42a This fixes BGE bugs #30484 (Frame rate increases very high after game engine start with record animation enabled) and #29449 (Record Animation runs 1000+ fps on Mac OSX 10.6.8 64bit). The problem was, recording animation was forcing "fixed time", which always advances the engine one frame instead of advancing based on time passed. This means that "fixed time" runs at full speed. Now fixed time is disabled when recording animation. 2012-04-05 03:05:02 +00:00
Antony Riakiotakis
680c23b771 Yet another windef.h compile fix for MinGW for game engine/video textures with ffmpeg. Looks like there is some redefinition of LONG , DWORD etc. Changing the order of inclusion resolves the issue. 2012-04-04 17:18:01 +00:00
Campbell Barton
f4ed44fb0c fix for building on linux with gcc4.7, an error was caused by undefining __cplusplus, so as to work with mingw4.4
this was added in r23608 so hopefully we can get buy now without it - or only undefine this in mingw if the problem still exists (cant test now).
2012-04-04 10:54:56 +00:00
Campbell Barton
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
Mitchell Stokes
f22f60e7c4 BGE: This fixes a problem where lamps in inactive layers were rendering shadows buffers that never got used, which was a huge performance sink. 2012-03-29 01:56:08 +00:00
Mitchell Stokes
a308b6c0ec Windows Blenderplayer: The console now closes when the Blenderplayer launches (like it does with Blender). To get it back, use the -c flag, which is finally working as described: "-c: keep console window open" 2012-03-29 01:40:19 +00:00
Brecht Van Lommel
cb45d282fe Fix #30702: game engine softbody weld threshold was exposed in UI, but actually
disabled in code because it doesn't work well, so hide the property from the UI.
2012-03-28 12:18:25 +00:00
Campbell Barton
07065b27b8 style cleanup 2012-03-28 05:03:24 +00:00
Campbell Barton
83e83e5eff quiet some warnings for gcc 4.7 2012-03-26 20:49:33 +00:00