Commit Graph

12964 Commits

Author SHA1 Message Date
Campbell Barton
5233069908 Running 2.48rc on my system segfaults when starting the game engine, only on the release, not for my own builds.
Setting the SDL video driver to dummy prevents the crash, this is recommended in the SDL docs if your not using the video driver.
2009-04-25 12:58:07 +00:00
Benoit Bolsee
b991b32458 BGE mesh modifiers: fix view frustrum culling for mesh with modifiers. Update the bounding box based on mesh extent after applying the modifiers. 2009-04-25 12:20:59 +00:00
Campbell Barton
3038fb1a01 [#18606] Writing to KX_GameObject.orientation causes crash
Own bug, conversion function to get an orientation from python - PyOrientationTo() ignored user input completely :| (breaking the orientation attribute)

Also made KX_GameObject worldOrientation writable and minor doc fixes.
2009-04-25 07:17:36 +00:00
Campbell Barton
0c482f7607 BGE API - small changes
- print CListValue errors only once.
- bge_api_validate_py.txt now validates modules as well as types.
- added missing functions and consts for epydoc modules. some of these in GameLogic.py still need sorting.
2009-04-24 20:27:04 +00:00
Benoit Bolsee
252928ab36 BGE: removed support for time dependent modifiers, they don't make sense in the GE. Disable modifiers when Bullet soft body is used: bullet needs the original vertex array. 2009-04-24 19:49:15 +00:00
Campbell Barton
a5f4d7cb53 BGE PyAPI epydoc errors fixed 2009-04-24 07:45:17 +00:00
Benoit Bolsee
0feaedfa9a BGE bug #17950: crash when GE softbody is parented to a rigid body/soft body/dynamic object. 2009-04-23 21:19:42 +00:00
Benoit Bolsee
67b3e1a07b BGE bug #17863: Shaky game camera. 2009-04-23 20:30:01 +00:00
Brecht Van Lommel
70f1b45430 Fix for part of bug #18496: issue with light state switching
when using Dome.
2009-04-23 13:30:34 +00:00
Ton Roosendaal
09c341c3bd Make: removing hidden directories from .app failed. 2009-04-23 09:59:19 +00:00
Peter Schlaile
960581fcc9 == Sequencer ==
Fixes:
[#18489] Adding (add filter) nested strips 
causes Blender VSE to segfault on frame render.
[#18209] 3 VSE crash bugs with .blends 
(all left click and move mouse over Metastrip/Blend Mode related)

... and a new segfault I introduced with my last commit.

Also: memcache limiter refcounts are tested now in critical
      places, printing an error message,
      since doing refcounting right is, well, hard.
2009-04-23 07:40:01 +00:00
Peter Schlaile
ad8e98bccd == SEQUENCER ==
This fixes 

[#18079] Sequencer color correction does not apply on float image if "make float" is not applied

and closes

[#18582] bug fix #18079

by removing ibuf->rect on image load if ibuf->rect_float is used.
(Don't know, why the OpenEXR loader does that, but I fix this on sequencer
side for now...)
2009-04-23 06:07:51 +00:00
Dalai Felinto
073abf7047 BGE Dome update:
* Enviroment Map implemented (replacing truncated mode 2).
 - Now it's possible to pre-bake animated (or static) EnvMaps to use with Cube Map textures.

* Enabling 2DFilter in Dome mode
 - no GL_DEPTH_BUFFER supported though.

* Tweaking GameSettings menu (centralizing buttons)
2009-04-23 02:27:11 +00:00
Campbell Barton
327881c838 [#18574] small bug - warning for sce.link() depreciated displays even when sce.objects.link() is used
Remove the warning since the func will sstay in 2.4x
2009-04-23 00:56:05 +00:00
Dalai Felinto
7ac233be8a BGE Rasterizer methods to handle Screen Space - (getScreenPosition, getScreenVect, getScreenRay)
getScreenPosition(obj):
 - Gets the position of an object projected on screen space.

getScreenVect(x, y):
 - Gets the vector from the camera position in the screen coordinate direction.

getScreenRay(x, y, dist, property):
 - Look towards a screen coordinate (x,y) and find first object hit within dist that matches prop.
- The ray is a call to KX_GameObject->rayCastTo from the KX_Camera object.

Patch [#18589] test files can be found there. Patch reviewed by Campbell
2009-04-23 00:49:38 +00:00
Campbell Barton
e8f5c75005 patch from Mitchell Stokes, comments only - KX_PYATTRIBUTE_TODO for missing attributes 2009-04-23 00:47:45 +00:00
Campbell Barton
6a270ecb94 BGE Python API
CListValue fixes
- Disable changing CValueLists that the BGE uses internally (scene.objects.append(1) would crash when drawing)
- val=clist+list would modify clist in place, now return a new value.
- clist.append([....]), was working like extend.
- clist.append(val) didnt work for most CValue types like KX_GameObjects.

Other changes
- "isValid" was always returning True.
- Set all errors for invalid proxy access to PyExc_SystemError (was using a mix of error types)
- Added PyObjectPlus::InvalidateProxy() to manually invalidate, though if python ever gains access again, it will make a new valid proxy. This is so removing an object from a scene can invalidate the object even if its stored elsewhere in a CValueList for eg.
2009-04-23 00:32:33 +00:00
Brecht Van Lommel
d568794a98 Fix for bug #14410: multires + vertex colors crash rendering
or baking while in editmode.
2009-04-22 23:01:40 +00:00
Brecht Van Lommel
1ca6768051 Fix for bug #18509: mesh deform modifier not working on load,
with cage on hidden layer.
2009-04-22 22:38:23 +00:00
Benoit Bolsee
90508ed125 BGE bug #17670: Python controlled mist doesnt work in textured mode. 2009-04-22 22:12:36 +00:00
Campbell Barton
fd108f1019 [#18586] [bug] Ray sensor doesn't return a hit object
Supporting len(GameOb) to see how many properties it has backfired since it can then evaluate as false.
2009-04-22 20:43:41 +00:00
Campbell Barton
f06802050d [#18587] bugfix #18425 (Window.EditMode() ignores undo information)
from Lorenzo Pierfederici (lento)
2009-04-22 19:04:00 +00:00
Benoit Bolsee
48f483d14f BGE: some more cleanup, implement proper GetReplica/ProcessReplica workflow for touch/near/radar sensor. Remove duplicated code. 2009-04-22 18:20:41 +00:00
Ton Roosendaal
b22819f686 Bugfix #18039
Armature modifier didn't set amd->prevCos temp variable to NULL 
after freeing. Saving this in file will cause error or crash on
reading. Quite weird how it survived so long?
2009-04-22 17:35:37 +00:00
Ton Roosendaal
971cabc2d6 Bugfix #18058
Ray-transparent didn't pass on thread number to shading code, giving
"blothes" in render, when using node materials.

This also rewinds Campbells commit of feb 21, which tackled the error,
but not the cause.
2009-04-22 17:06:47 +00:00
Benoit Bolsee
f6d27e73ee BGE: some more cleanup, remove useless ReplicaSetName(), move code to ProcessReplica. 2009-04-22 16:58:04 +00:00
Benoit Bolsee
076d1910f5 BGE: some more cleanup in GetReplica/ProcessReplica of deformers: make them consistent with the other classes. 2009-04-22 16:26:22 +00:00
Campbell Barton
5553d2c014 BGE C++ API
PyObjectPlus::ProcessReplica() is now called when any of its subclasses are replicated.

This is important because PyObjectPlus::ProcessReplica() NULL's the 'm_proxy' python pointer I added recently.
Without this a replicated subclass of PyObjectPlus could have an invalid pointer (crashing the BGE).

This change also means CValue::AddDataToReplica() can be moved into CValue::ProcessReplica() since ProcessReplica is always called.
2009-04-22 14:42:00 +00:00
Campbell Barton
a8592d09d0 BGE C++ API
Some functions used
	ProcessReplica(replica);
others
	replica->ProcessReplica()

Use the second method everywhere so the PyObjectPlus's ProcessReplica() can be called from its subclasses.

Note that PyObjectPlus's ProcessReplica isnt used yet.
2009-04-22 12:16:41 +00:00
Ton Roosendaal
c09b1a985c bugfix #18187
Using "Key Alpha" didn't work when using MBlur render. The accumulation
code was assuming regular alpha then. Now it corrects for it.

Still it's a bit of a weak spot in Blender's render system. I will look 
in the future to make this a real post process; converting all RGBA 
buffers in the system, including for all passes, to "key alpha". 
Combined with that our compositor should become alpha type aware too. 
Everything in Blender assumes premul alpha, which still just will work 
best in general...
2009-04-22 11:54:43 +00:00
Campbell Barton
785b784e09 BGE Python API
improved how attribute errors are set so each classes py_getattro function dosnt need to set an error if the attribute doesn't exist.
Now py_base_getattro sets an error on a NULL return value when no errors are set to avoid setting errors at multiple levels.
2009-04-22 09:47:57 +00:00
Nathan Letwory
88c58d6b2d BGE
* the ternary form refused to compile properly with msvc, rewrite a bit.
2009-04-22 06:30:32 +00:00
Campbell Barton
0145a93f24 Patch from Mitchell Stokes for KX_Light to use attrdef's
Added type access to the SCA_PropertyActuator, added missing function in library docs.
2009-04-21 23:15:18 +00:00
Benoit Bolsee
221f589f51 BGE bug #18521 fixed: Dupligroups + Bullet Softbodies are broken. 2009-04-21 21:33:03 +00:00
Guillermo S. Romero
094b3e81f6 Balance comment markers. 2009-04-21 18:41:45 +00:00
Guillermo S. Romero
2db9f14ccd Documentation. 2009-04-21 17:58:28 +00:00
Guillermo S. Romero
41eb029bb9 Old "divide by zero" bug and remove debug printf. 2009-04-21 17:40:39 +00:00
Guillermo S. Romero
c5756a9822 Compile warnings, typos and some clarifications. 2009-04-21 17:37:07 +00:00
Guillermo S. Romero
95b43536f6 Some Makefile changes still laying around. 2009-04-21 17:24:16 +00:00
Nicholas Bishop
a82a6bedc5 Fix for bug #17457. This bug relates to files that have missing multires vertex data.
The fix is, if the file was saved on the highest multires level, then mesh contains a copy of the vertices anyway, and we can just copy it back into multires.

Otherwise, multires is removed from the mesh to avoid a crash.
2009-04-21 16:58:25 +00:00
Ton Roosendaal
6c33cc9bae Bugfix #18550
"Copy constraints" should increase ipo user count.
2009-04-21 15:38:53 +00:00
Ton Roosendaal
5d0fb28f74 bugfix #18543
Using feature XRay + Transparent could crash on undo/redo, the
view3d afterdraw was still storing data here whilst it shouldn't...

Reason was that object got added twice actually... but only freed
once. Also caused weird flashy display.

Note to Brecht for merging: skip this one, I'll fix it in 2.5 too.
2009-04-21 15:22:41 +00:00
Campbell Barton
4cf2863a8f SHD_dynamic had gen_utils functions from Mathutils, removing 2009-04-21 13:44:24 +00:00
Daniel Genrich
aff2a11110 Fix for missing include using CMake 2009-04-21 13:34:33 +00:00
Ton Roosendaal
ca78b6ee8b Bugfix #18519
MultiLayer save (F3) crashes when no rendering/layers exist, happens for
opengl preview render. It now survives, saving empty file and prints error.

Better solution for later: render profiles!
2009-04-21 13:30:58 +00:00
Campbell Barton
8b69260f00 hope this lets py2.3 build again 2009-04-21 12:48:49 +00:00
Campbell Barton
aa3c9ad0d8 needed to remove gen_utils functions from Mathutils.c 2009-04-21 12:42:37 +00:00
Benoit Bolsee
d11a5bbef2 BGE: Support mesh modifiers in the game engine.
Realtime modifiers applied on mesh objects will be supported in 
the game engine with the following limitations:

- Only real time modifiers are supported (basically all of them!)
- Virtual modifiers resulting from parenting are not supported: 
  armature, curve, lattice. You can still use these modifiers 
  (armature is really not recommended) but in non parent mode. 
  The BGE has it's own parenting capability for armature.
- Modifiers are computed on the host (using blender modifier
  stack).
- Modifiers are statically evaluated: any possible time dependency
  in the modifiers is not supported (don't know enough about
  modifiers to be more specific).
- Modifiers are reevaluated if the underlying mesh is deformed
  due to shape action or armature action. Beware that this is 
  very CPU intensive; modifiers should really be used for static
  objects only.
- Physics is still based on the original mesh: if you have a 
  mirror modifier, the physic shape will be limited to one half
  of the resulting object. Therefore, the modifiers should 
  preferably be used on graphic objects.
- Scripts have no access to the modified mesh. 
- Modifiers that are based on objects interaction (boolean,..)
  will not be dependent on the objects position in the GE.
  What you see in the 3D view is what you get in the GE regardless
  on the object position, velocity, etc.

Besides that, the feature is compatible with all the BGE features
that affect meshes: armature action, shape action, relace mesh, 
VideoTexture, add object, dupligroup.

Known problems:
- This feature is a bit hacky: the BGE uses the derived mesh draw 
  functions to display the object. This drawing method is a
  bit slow and is not 100% compatible with the BGE. There may
  be some problems in multi-texture mode: the multi-texture
  coordinates are not sent to the GPU. 
  Texface and GLSL on the other hand should be fully supported.
- Culling is still based on the extend of the original mesh. 
  If you have a modifer that extends the size of the mesh, 
  the object may disappear while still in the view frustrum.
- Derived mesh is not shared between replicas.
  The derived mesh is allocated and computed for each object
  with modifiers, regardless if they are static replicas.
- Display list are not created on objects with modifiers.
  
I should be able to fix the above problems before release.
However, the feature is already useful for game development.
Once you are ready to release the game, you can apply the modifiers
to get back display list support and mesh sharing capability.

MSVC, scons, Cmake, makefile updated.

Enjoy
/benoit
2009-04-21 11:01:09 +00:00
Campbell Barton
3e7cbd5388 Blender Python API
- Removed the gen_utils.c dependency from Mathutils (since gen_utils wont go into 2.5 but mathutils will), repalced with python functions.
- removed Blender.Mathutils.Point, since it was not documented, the C api never used it, none of our scripts used it (and I never saw a script that used it).
2009-04-21 09:44:29 +00:00
Benoit Bolsee
6c5e18ca98 Fix compilation error in MSVC. 2009-04-21 09:38:27 +00:00