In OSX, using spin/extrude etc. buttons, with more than 1 3d window open,
should turn cursor in a Question Mark to indicate you have to tell which
window to use (yes weak, but that's 2.4x!). OSX didn't support that type
of cursor, so no hint happened. Now uses the 'hand' icon for osx... no
nicer one is there afaik.
- initialize pythons sys.argv in the blenderplayer
- ignore all arguments after a single " - " in the blenderplayer (like in blender), so args can be passed to the game.
- add a utility function PyOrientationTo() - to take a Py euler, quat or 3x3 matrix and convert into a C++ MT_Matrix3x3.
- add utility function ConvertPythonToMesh to get a RAS_MeshObject from a KX_MeshProxy or a name.
- Added error prefix arguments to ConvertPythonToGameObject, ConvertPythonToMesh and PyOrientationTo so the error messages can include what function they came from.
- deprecated brick.getOwner() for the "owner" attribute.
- no source code since this is only useful if the epydocs contain code, ours are only docstrings.
- set inheritance to included so you dont have to search up the classes to find available functions.
- SConstruct, isolate the exception for importing epydoc.
- Added a print to the SConscript files otherwise it looks like nothings happening.
- More verbose error messages.
- BL_Shader wasnt setting error messages on some errors
- FilterNormal depth attribute was checking for float which is bad because scripts often expect ints assigned to float attributes.
- Added a check to PyVecTo for a tuple rather then always using a generic python sequence. On my system this is over 2x faster with an optmized build.
- comments to PyObjectPlus.h
- remove unused/commented junk.
- renamed PyDestructor to py_base_dealloc for consistency
- all the PyTypeObject's were still using the sizeof() their class, can use sizeof(PyObjectPlus_Proxy) now which is smaller too.
This changes how the BGE classes and Python work together, which hasnt changed since blender went opensource.
The main difference is PyObjectPlus - the base class for most game engine classes, no longer inherit from PyObject, and cannot be cast to a PyObject.
This has the advantage that the BGE does not have to keep 2 reference counts valid for C++ and Python.
Previously C++ classes would never be freed while python held a reference, however this reference could be problematic eg: a GameObject that isnt in a scene anymore should not be used by python, doing so could even crash blender in some cases.
Instead PyObjectPlus has a member "PyObject *m_proxy" which is lazily initialized when python needs it. m_proxy reference counts are managed by python, though it should never be freed while the C++ class exists since it holds a reference to avoid making and freeing it all the time.
When the C++ class is free'd it sets the m_proxy reference to NULL, If python accesses this variable it will raise a RuntimeError, (check the isValid attribute to see if its valid without raising an error).
- This replaces the m_zombie bool and IsZombie() tests added recently.
In python return values that used to be..
return value->AddRef();
Are now
return value->GetProxy();
or...
return value->NewProxy(true); // true means python owns this C++ value which will be deleted when the PyObject is freed
Hiding faces is a editing option like selection and should not change rendering, it wasn't even working right because meshes without UVs ignored it.
I thought this was needed for compatibility with old files but just noticed this messes up 2 of the files in demos-2.42.zip
Other small changes...
- KX_Camera and KX_Light didnt have get/setitem access in their PyType definition.
- CList.from_id() error checking for a long was checking for -1 against an unsigned value (own fault)
- CValue::SpecialRelease was incrementing an int for no reason.
- renamed m_attrlist to m_attr_dict since its a PyDict type.
- removed custom getattro/setattro functions for KX_Scene and KX_GameObject, use py_base_getattro, py_base_setattro for all subclasses of PyObjectPlus.
- lowercase windows.h in VideoBase.cpp for cross compiling.
Texture nodes hang when nodes have a cyclic case.
Added a (temp?) provision to tag node->need_exec zero for cyclic
nodes, and added check for this in texture nodes.
There was also a bug in 'tag changed' for texture nodes, which not
only tagged, but also called the tree exec (should not happen!).
In general the texture exec needs recode; it doesn't use the stacks
as provided per node, but recurses itself to previous nodes, giving
problems like this. Node execs should only do their own bizz, the
node system handles dependency and eval order nicely already.
+bvhtree cache (if the derived model doenst gets destroyed then the same BVHtree can be used)
this was needed to allow shrinkwrap constraint to be usable.
It has been ready for a long time.. but only got merged now, for 2.49.
Free python modules defined within the blendfile between loading scenes since they would end up accessing old GameLogic, Rasterizer modules as well as old game engine data in the module namespace which can cause problems.
Imagepaint make sure ibuf exists before we use it. This is CID# 545
editmesh_tools.c make sure were not indexing array with -1 This is CID# 137
(also removed some trailing whitespace I found)
anim5.c totlen could be -1 so check its > -1 This is CID# 134
Kent
- fix for multiple viewpors broke single viewport (both work now)
- python could get uninitialized values from m_prevTargetPoint and m_prevSourcePoint
- getting the RayDirection for python could crash blender trying to normalize a zero length vector.
- added python attributes
- removed unused canvas from the MouseFocusSensor class
Common cases of this are when python references an object from the AddObject actuator that has ended, or a scene has been loaded and the old objects freed.
This means some scripts will raise errors now in certain cases but better give the error early rather then failing silently with strange hard to track down behavior & crashes.
Added "isValid" attribute for checking objects are in a scene.
At the moment it uses the SceneGraph Node to check of the objects valid but it might be better to do this in a more generic way so scenes, meshes etc also have this check.
There is a problem importing 3ds files where I cant find a way to check if the transforms are applied to the vertex locations or not.
Since 2.44 I made the importer assume they were not since you can manually remove transformations, but not reverse.
Nevertheless most 3ds files have the matrix applied, better not give a bad import by default.
Did some research and other 3ds importers (lib3ds for eg), have the same problem and just assume the transformations applied.
3dsMax imports both correctly so there must be a way to tell but I could not link it to the 3ds version or other mesh options.
Added an option to workaround this problem in rare cases where its needed.
- KX_GameObject.cpp & KX_Scene.cpp, clear the dict before removing the reference in case there is a circular reference.
- The armature weakref list was being incref'd twice then decrefed twice (incref and decref were used incorrectly), now only once. My 'fix' broke this.
- In bpy_pydriver_create_dict the 2 refs added from running PyDict_SetItemString twice were undone when clearing the dictionary (added comment)
- changed Py_XDECREF to Py_DECREF int BPY_pyconstraint_update and BPY_pyconstraint_target, Py_XDECREF checs for NULL value which would have crashed blender before it got to Py_XDECREF anyway.
- after every error is reported (PyErr_Print), remove sys.last_traceback and clear the error, I found this fixed certain crashes (usually when starting the game engine or exiting blender), so best do this all the time.
- header_text.c, CcdPhysicsEnvironment.cpp, KX_CameraActuator.cpp - remove some warnings.
own error, EXPP_incr_ret from a macro was an implicit decloration in BGL.c
For some reason this only crashed on 64bit linux
To my defence the BGE makes so many warnings that they become usless, need to improve the situation here at some point.
Another bug in the 'radius per vertex' feature in curves.
If you set front/back face off for curves, and make it bevel or give
depth, the curves should draw as tubes. This feature didn't work in 2.48
either...
Still unsure about this implementation, campbell can check!
Clamp objects min/max velocity.
Accessed with bullet physics from the advanced button with dynamic and rigid body objects.
- useful for preventing unstable physics in cases where objects move too fast.
- can add linear velocity with the motion actuator to give smooth motion transitions, without moving too fast.
- minimum velocity means objects don't stop moving.
- python scripts can adjust these values speedup or throttle velocity in the existing direction.
Also made copy properties from an object with no properties work (in case you want to clear all props)
[#17678] "Mouse over" sensor broken when using viewports
Loop over all the scenes camera viewports and check the mouse is inside the viewport before casting a ray.
Added occlusion culling capability in the BGE.
More info: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Game_Engine#BGE_Scenegraph_improvement
MSVC, scons, cmake, Makefile updated.
Other minor performance improvements:
- The rasterizer was computing the openGL model matrix of the objects too many times
- DBVT view frustrum culling was not properly culling behind the near plane:
Large objects behind the camera were sent to the GPU
- Remove all references to mesh split/join feature as it is not yet functional
Erwin, r16812 "Add Fh/Rot Fh to Bullet" - added this function
ClosestRayResultCallbackNotMe(rayFromWorld,rayToWorld,body,parentBody)
...but parentBody was being ignored and the m_parent value wasn't being initialized.
Run memset() on CcdConstructionInfo which had some unset members for CreateSphereController() and CreateConeController().