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().
from Alberto Santos (dnakhain)
----
This patch complete previous one that I submit with new variables relationated with Particle System children (With variables related to Rough, Kink and Branch).
Support for assigning any Type to a KX_GameObject
so you can do...
gameOb.follow = otherGameOb
gameOb[otherGameOb] = distanceTo
gameOb["path"] = [(x,y,x), (x,y,x)]
del gameOb[mesh]
* types that cannot be converted into CValue types are written into the KX_GameObject dict
* the KX_GameObject dict is only initialized when needed
* Python properties in this dict cannot be accessed by logic bricks
* dir(ob) and ob.getPropertyNames() return items from both CValue and Py dictionary properties.
Also found that CType was converting python lists to CType Lists but very buggy, would crash after printing the list most times.
Use python lists instead since logic bricks dont deal with lists.
added defines PY_SET_ATTR_FAIL, PY_SET_ATTR_MISSING and PY_SET_ATTR_SUCCESS
This is useful when objects that have user defined attributes (GameObject and Scene)
When calling setattr on the parent, a return value of PY_SET_ATTR_FAIL means the attribute exists but failed to be set, so don't set the custom attribute.
There were also some problems with int to python conversion
- assigning a PyLong to a KX_GameObject from python would raise an error
- PyLong were coerced into floats when used with internal CValue arithmetic
Changes...
- PyLong is converted into CIntValue for coercing and assigning from python
- CValue's generic GetNumber() function returns a double rather then a float.
- Print an error when a PyType cant be coerced into a CValue
Tested with python, expressions and property sensor.
- setting the scene attributes would always add to the scenes custom dictionary.
- new CListValue method from_id(id)
so you can store a Game Objects id and use it to get the game object back.
ob_id = id(gameOb)
...
gameOb = scene.objects.from_id(ob_id)
This is useful because names are not always unique.
- Most mesh particle effectors can now have their effection point taken per particle as the nearest point on the mesh surface.
- This is activated with the "surface" button in the effector field panel.
- Activating the option adds a "surface" entry to the modifier stack where the state of the mesh is read from.
For an example of usage see http://www.youtube.com/watch?v=3XkO1EAmJks.
- added keyboard senser attribute "events" to replace getEventList()
- fix 2 memory leaks in the python api (was making a list but not returning it)
- setting readonly attributes didnt give a good error message.