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.
- 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.
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.
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...)
* 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)
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
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.
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?
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.
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.
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.
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...
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.
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.
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.
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!
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
- 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).