Commit Graph

1866 Commits

Author SHA1 Message Date
Dalai Felinto
5b3bb37343 reverting part of #38876 (whitespace edits)
the new if/else nesting introduced in the previous commit makes no sense.
(since I was here I add a comment for extrainfo and did some small cleanup)
2011-07-31 11:21:48 +00:00
Campbell Barton
c7a1a19153 whitespace edits, had odd space/tab mix 2011-07-31 07:54:24 +00:00
Campbell Barton
c19e88ac26 fix for building without bullet 2011-07-31 07:45:54 +00:00
Dalai Felinto
dfc661565a patch [#27909] Added constants in bge.constraints by Solano Felicio (solano) + some changes in rst
I named all the BGE modules with their actual names (e.g. Rasterizer, Video Texture, ...). so in the API index.html page they look more like the other Blender modules.
I did the same for the bgl module.

For bge.constraints this patch exposes the constants values for debug mode and createConstraints (they were hardcoded innts before).

+ making all the "todo" and #comments into rst comments (.. comments)
Thanks Solano, it's great to get help to those tasks :)
2011-07-30 23:16:22 +00:00
Brecht Van Lommel
62415cab05 Fix #28014: joystick sensor not working. Broke this with an earlier commit
trying to fix blenderplayer startup warnings. It seems we do need to init
the SDL video subsystem even if we only want events, thanks Juha Maki-Kanto
for pointing this out.
2011-07-25 15:44:41 +00:00
Dalai Felinto
fee1594a65 BGE BugFix for: [#23874] Custom projection matrix doesn't work in custom viewport
This was never highly tested, that's why I never committed (my patch for this was from September 2010).

But once again I got a report that this bug was a deal-break and the patch seems to work for this artist.
I believe it's working, but I will keep my eyes open for this.
2011-07-25 15:37:55 +00:00
Campbell Barton
382050501d remove duplicate function for printing the current file:line of a python script in the BGE. 2011-07-22 11:21:01 +00:00
Dalai Felinto
f2e055f4a4 bugfix: [#27348] blenderplayer showing a different viewport size in 2.57b
I believe this bug was there since we (me) moved the game settings to scene->gm
Since I was here I added support for x/y non square aspect pixels (i.e. anamorphic)
we were already using it for videotexture so I don't know why we were not here.

Tested in OSX, but it should be working in all OSs.
2011-07-19 01:41:45 +00:00
Campbell Barton
5792bd7cc7 cmake: cleanup include paths, some duplicates and going up some unneeded dirs. 2011-07-17 09:11:13 +00:00
Campbell Barton
410c5e3cd2 cmake source definitions:
remove missing includes and use more strict formatting.
2011-07-16 23:01:14 +00:00
Campbell Barton
3a6158a8bf move mathutils into its own lib. 2011-07-15 04:01:47 +00:00
Campbell Barton
7370ba1839 fix for NULL pointer usages 2011-07-09 19:59:32 +00:00
Nathan Letwory
5e6abb8004 Fix compile with scons, after thread commit in r38185 2011-07-07 13:57:20 +00:00
Mitchell Stokes
4e7417e9fd The Blenderplayer wasn't freeing GPU_Textures since according to BLI_threads, GPU_free_image() was never being called from the main thread. Calling BLI_threadapi_init() when the Blenderplayer starts sets the current thread as the main thread and solves the problem. 2011-07-07 10:37:46 +00:00
Brecht Van Lommel
11645e7a3f Fix #27877: writing .avi files > 4 GB not working on windows.
Solution is to replace "long" by "int64_t" and "fseek" by "_fseeki64", because
long on 64 bit windows is still 32 bit.
2011-07-06 10:19:04 +00:00
Brecht Van Lommel
8e90ba3b20 Fix last part of #26850: OS X game player did not react to quit event. 2011-06-27 14:34:58 +00:00
Brecht Van Lommel
49f84ef9ed Fix part of #26850: OS X game player was showing _NSAutoreleaseNoPool()
error messages on start. These were coming from initializing the SDL video
subsystem as part of Joystick init. We do not need this, as video stuff is
covered by GHOST, most likely this was conflicting.
2011-06-27 14:06:11 +00:00
Campbell Barton
33e554799b Minor warning cleanup & fix
- comment/remove assignments from values to themselves.
- add case break statements (no functional change but some source code checkers notice).
- fix python errors when the sculpt brush is None.
2011-06-27 03:36:14 +00:00
Dalai Felinto
0c8311fdf9 revert commit 27133: Committing patch [#27133] "Fix for for Object Color in BGE" by Kupoman
This was causing a lot of backward compatibility problems and side effects.

It has to be done properly, linked with Material ObjectColor shader_flag or at least the TF OBCOLOR (which apparently worked at some point so I've been told).
If you need to use OBCOLOR simply keyframe the obcolor and it will work as before.
2011-06-23 22:29:02 +00:00
Campbell Barton
bb3742fe91 correction to recent commit & made ffmpeg includes only add when enabled. 2011-06-23 15:58:41 +00:00
Campbell Barton
2023db70a8 cmake option to build without an audio library. 2011-06-23 09:27:56 +00:00
Campbell Barton
968b2a8afb rename cmake include/libraries to conform with suggested cmake names 2011-06-18 14:12:54 +00:00
Campbell Barton
758450ee49 BGE: Camera.getScreenPosition wasn't working because of an unhandled exception when called with a non vector argument (object or object name). 2011-06-17 07:27:27 +00:00
Mitchell Stokes
1c0a6c6468 Blenderplayer: Setting G.main to NULL after it's freed to avoid issues later with GPU_free_images() 2011-06-15 23:43:02 +00:00
Mitchell Stokes
a3e296fc40 Committing patch #25676 Anisotropic filtering in viewport and BGE by me.
This patch adds anisotropic filtering of textures in the viewport and the BGE. The quality of the filtering is adjustable in the user preferences under System. For more information on anisotropic filtering:
http://en.wikipedia.org/wiki/Anisotropic_filtering

One current limitation of this setup (having the option a user preference) is it makes runtimes more troublesome. Runtimes don't have user preferences set, so for now the blender player defaults to 2x AF. Options will be added later to change this value (probably a command line option).
2011-06-15 18:59:22 +00:00
Campbell Barton
08c155845d remove unused arguments 2011-06-15 14:06:25 +00:00
Dalai Felinto
a2dda7c74d BGE Patch: [#27425] Allow to change the damping of the camera actuator
##########
original name: "Allow to change the strenght of the "go behind" constraint of the camera actuator"

The camera actuator is an actuator that drive the camera to follow an object, with a set of constraint.
Currently, when the object followed rotate on himself (like a person, or an helicopter), the camera is really slow to go behind (at least 10 seconds).

This patch gives the UI to tweak the strenght of the 'go behind'[named damping] constraint.
###########

epydocs (rst) updated too
2011-06-13 17:08:33 +00:00
Brecht Van Lommel
e8eefbf757 Fix #27635: GLSL filter uniform variable not set for group instance.
The problem was that SCA_2DFilterActuator was defining and using a
variable called "m_gameObj", when it should be using "m_gameobj" as
defined by SCA_ILogicBrick. The way it was, reparenting did only half
the work required to duplicate the actuator.

Patch by Alex Fraser, thanks!
2011-06-13 11:36:25 +00:00
Campbell Barton
3d7dc49e3e warning fix for gcc 2011-06-11 15:37:16 +00:00
Campbell Barton
c8a654c41c add includes for windows. 2011-06-09 18:28:58 +00:00
Campbell Barton
15d0d3f41e replace log() calls with constants 2011-06-09 14:27:51 +00:00
Dalai Felinto
40c171a69f fix of fix :| [real fix for #36787 -- it was wrongly fixed on #36964]
I guess I tested the fix outside the camera view (which always worked). duhhh
Working now.
2011-06-08 09:01:41 +00:00
Joerg Mueller
60f5b51484 Fix for [#27562] audaspace not playing files in blenderplayer
blenderplayer wasn't initialising ffmpeg

This might also fix [#27558] GE Sound works in Blender but not in runtimes
2011-06-02 23:25:38 +00:00
Campbell Barton
09da9d4393 cmake maintenance
blender_add_lib now takes a separate include argument to suppress warnings in system includes (mostly ffmpeg & python).
also only build wm_apple.c on apple+carbon configuration.
2011-05-31 01:15:44 +00:00
Benoit Bolsee
884b9d1557 BGE: fix bug #26775, crash when physics constraint is defined on non-active objects. Patch provided by Sergey Sharybin, verified and applied. 2011-05-30 15:40:01 +00:00
Mitchell Stokes
221472f7b5 Moving the letterbox clear for the embedded player so it only clears when it needs to. Thanks to Juha Mäki-Kanto for the tip. 2011-05-29 18:09:38 +00:00
Campbell Barton
11014aa34b access pythons code object directly rather than attribute access. 2011-05-29 11:05:52 +00:00
Mitchell Stokes
ebdca474b5 Fixing the initglobals leak in the Blenderplayer (G.main reference was being reassigned before it was freed). 2011-05-29 04:15:35 +00:00
M.G. Kishalmi
9b5800bcd7 fixed "rather then" -> "rather than" typos all over the place 2011-05-28 13:11:24 +00:00
Dalai Felinto
245d36b706 bugfix for: [#26753] PhysicsConstraints ID trouble on 64bit (linux at least).
[the problem also affected OSX]

PhysicsId are Long, not ints (see PyObject* KX_GameObject::PyGetPhysicsId() )

There is a reference in the code to use PyCapsule instead of int. I'm not sure
about that. This patch at least stops the crashes
(update: I talked with Campbell and he repeated that PyCapsule are better, but if long is working it's fine for now).
2011-05-28 08:16:34 +00:00
Dalai Felinto
d580ae1087 fix for embeded BGE viewport broken when not using letterboxing
this was broken after rev.36787 (api rewritten)
own reported bug, nowhere in the track (just to mess up with the bug fixing statistics)
2011-05-28 01:29:56 +00:00
Peter Schlaile
ac034e1732 == FFMPEG ==
Revert of "SVN commit: /data/svn/bf-blender [36957]
trunk/blender/source/gameengine/ VideoTexture/VideoFFmpeg.cpp: fix for
ffmpeg linking in BGE ( patch by Jens Verwiebe (jensverwiebe) over IRC)"

Sorry folks, that patch breaks current ffmpeg GIT version.

Good news: it's all handled now automagically by ffmpeg_compat.h in 
intern/ffmpeg

so: everything should be fine and dandy for very old and very new versions.
2011-05-27 23:46:47 +00:00
Peter Schlaile
42121590f4 == FFMPEG ==
Added central compatibility header file, which enables blender to compile
against very old ffmpeg versions as well as very new versions using the
*NEW* API. (Old API functions are simulated using macros and inline functions)

Added a whole lot of additional checks, tested against 6 different versions
down the timeline, hopefully, now finally all is well.
2011-05-27 23:33:40 +00:00
Dalai Felinto
a9467182fb fix for ffmpeg linking in BGE (patch by Jens Verwiebe (jensverwiebe) over IRC)
-	av_parse_video_rate(&frameRate, rateStr);
+	av_parse_video_frame_rate(&frameRate, rateStr);
2011-05-27 21:13:44 +00:00
Brecht Van Lommel
18ff3d5200 Attempted fix for #27482: game engine running slow due to revision 36698 which
fixed frame colors for letterbox drawing (happens when in camera view).

Cause is unclear, seems some sort of strange graphics driver thing on 32 bit.
Changes are a fix for the incorrect usage of glViewport, and avoiding the extra
clear if it's not needed.
2011-05-27 16:20:49 +00:00
Brecht Van Lommel
d369a6aaaf Windows installer and Path changes, fixing various issues:
* Windows installer not working for non-admin users and multiple users
* Addon scripts not installing next to user configuration
* Portable install not being taken into account in all places

The main problem was the windows installer was installing system scripts in
AppData next to the user configuration directory, which is not shared between
users. Now these are installed in ProgramFiles, and only addon scripts added
by the users go to AppData.

On all platforms, addon scripts were sometimes getting installed between
system scripts, because the scripts folder in the executable directory was
given precedence over the user configuration folder, that is no longer done
now. So addons now behave like user configuration, they are preserved even
if you download a newer build of the same blender version.

If you have an installation of 2.57 on windows, the addon install location
will not change until we do the version bump to 2.58, to avoid conflicts with
the existing the installed 2.57 version.

The old behavior of giving precedence to the local folder was done to support
portable install, where all configuration is written to the local folder. This
is now implemented differently: if and only if a "config" folder exists in the
local folder, portable install will be assumed, and files will only be written
to that local folder.
2011-05-27 09:57:53 +00:00
Peter Schlaile
0381c444fd == FFMPEG ==
Fixed and added additional ffmpeg cruft checking. Oh dear.
2011-05-27 07:47:42 +00:00
Campbell Barton
e070975ae4 missed this in recent commit. 2011-05-26 22:48:06 +00:00
Peter Schlaile
4b9a63c6d3 == FFMPEG ==
* removed a lot of old cruft code for ancient ffmpeg versions
* made it compile again against latest ffmpeg / libav GIT
  (also shouldn't break distro ffmpegs, since those API changes
  have been introduced over a year ago. If it nevertheless breaks,
  please send me an email)
2011-05-26 21:57:02 +00:00
Campbell Barton
984d2e42e4 make api functions for converting rv3d->camzoom, so the odd logic for this isn't inlined all over. 2011-05-20 04:14:29 +00:00