11 years agoRemove redundant include GL/glu.h in KX_Dome.cpp.
Benoit Bolsee [Thu, 9 Apr 2009 10:29:07 +0000 (10:29 +0000)]
Remove redundant include GL/glu.h in KX_Dome.cpp.

11 years agokey logging didnt work for alphanum keys -=_+ and |\ since revision 2 and nobody...
Campbell Barton [Thu, 9 Apr 2009 10:28:14 +0000 (10:28 +0000)]
key logging didnt work for alphanum keys -=_+ and |\ since revision 2 and nobody noticed!

11 years agoBGE Text - fix for tab drawing as an @ and not adding white space.
Campbell Barton [Thu, 9 Apr 2009 10:05:17 +0000 (10:05 +0000)]
BGE Text - fix for tab drawing as an @ and not adding white space.
Tab width is always space*4.

11 years agoBGE Text
Campbell Barton [Thu, 9 Apr 2009 09:50:17 +0000 (09:50 +0000)]
BGE Text
- multi-line strings for bitmap text
- keyboard sensor now logs return and pad enter as "\n"

BGE std::vector use in Value.cpp and RAS_MaterialBucket.cpp
The size of a new list is known before making them, reduce re-allocs, though probably not a noticeable speedup.

11 years agoPython 2.3 wouldn't compile with BGL.
Campbell Barton [Thu, 9 Apr 2009 01:52:29 +0000 (01:52 +0000)]
Python 2.3 wouldn't compile with BGL.

11 years agoBGE API cleanup: 2DFilterActuator.
Benoit Bolsee [Wed, 8 Apr 2009 21:40:55 +0000 (21:40 +0000)]
BGE API cleanup: 2DFilterActuator.

11 years agoFix gcc compiling problem with C++ syntax in KX_Dome.cpp.
Benoit Bolsee [Wed, 8 Apr 2009 20:10:27 +0000 (20:10 +0000)]
Fix gcc compiling problem with C++ syntax in KX_Dome.cpp.

11 years agosmall bge edits
Campbell Barton [Wed, 8 Apr 2009 17:40:09 +0000 (17:40 +0000)]
small bge edits
- Only try and remove light objects from the light list.
- Only loop over mesh verts once when getting the bounding box
- dont return None from python attribute localInertia when theres no physics objects. better return a vector still.
- add names to send message PyArg_ParseTuple functions.

11 years agoBGE patch #18350: Add sendMessage() to GameLogic. Added sendMessage to both GameLogic...
Benoit Bolsee [Wed, 8 Apr 2009 16:57:08 +0000 (16:57 +0000)]
BGE patch #18350: Add sendMessage() to GameLogic. Added sendMessage to both GameLogic and KX_GameObject.

11 years agoBGE patch #18051: add localInertia attribute to GameObject.
Benoit Bolsee [Wed, 8 Apr 2009 16:25:00 +0000 (16:25 +0000)]
BGE patch #18051: add localInertia attribute to GameObject.

11 years agoPatch #18462: Fisheye (Dome) and Spherical Panoramic mode in BGE.
Benoit Bolsee [Wed, 8 Apr 2009 15:06:20 +0000 (15:06 +0000)]
Patch #18462: Fisheye (Dome) and Spherical Panoramic mode in BGE.

User guide:

Fixed two bugs from original patch:
- deleting a text will clear the warp field from Game framing settings
- removed spurious black dots along the edge of the cube map in the gameplayer

Known limitation:
- resizing of the screen doesn't work in the gameplayer

Known bugs:
- Texture with reflexion are not rendered correctly
- Spurious problems with light

11 years agoFixed scons and cmake after BGE scenegraph and culling improvements.
Benoit Bolsee [Wed, 8 Apr 2009 08:22:03 +0000 (08:22 +0000)]
Fixed scons and cmake after BGE scenegraph and culling improvements.

11 years agogcc wouldn't compile using a reference
Campbell Barton [Tue, 7 Apr 2009 23:21:30 +0000 (23:21 +0000)]
gcc wouldn't compile using a reference

11 years agoBGE Scenegraph and View frustrum culling improvement.
Benoit Bolsee [Tue, 7 Apr 2009 22:14:06 +0000 (22:14 +0000)]
BGE Scenegraph and View frustrum culling improvement.

This commit contains a number of performance improvements for the
BGE in the Scenegraph (parent relation between objects in the
scene) and view frustrum culling.

The scenegraph improvement consists in avoiding position update
if the object has not moved since last update and the removal
of redundant updates and synchronization with the physics engine.

The view frustrum culling improvement consists in using the DBVT
broadphase facility of Bullet to build a tree of graphical objects
in the scene. The elements of the tree are Aabb boxes (Aligned
Axis Bounding Boxes) enclosing the objects. This provides good
precision in closed and opened scenes. This new culling system
is enabled by default but just in case, it can be disabled with
a button in the World settings. There is no do_version in this
commit but it will be added before the 2.49 release. For now you
must manually enable the DBVT culling option in World settings
when you open an old file.

The above improvements speed up scenegraph and culling up to 5x.
However, this performance improvement is only visible when
you have hundreds or thousands of objects.

The main interest of the DBVT tree is to allow easy occlusion
culling and automatic LOD system. This will be the object of further

11 years agoetch-a-ton
Martin Poirier [Tue, 7 Apr 2009 20:05:32 +0000 (20:05 +0000)]

Use head not tail normal for bone orientation.
Simplify roll to normal a bit.

11 years agoMSVC9 project file update
Benoit Bolsee [Tue, 7 Apr 2009 19:57:30 +0000 (19:57 +0000)]
MSVC9 project file update

11 years agoSome users have odd joysticks with more then 8 axises, increased to 16 (so 4 joysticks)
Campbell Barton [Tue, 7 Apr 2009 19:21:48 +0000 (19:21 +0000)]
Some users have odd joysticks with more then 8 axises, increased to 16 (so 4 joysticks)
Ideally there would be no limit but I dont think its worth the effort.
Also had a bug in last commit for the pytyhon api's "axisSingle" attribute, UI index starts at 1 not zero.

11 years agoBGE Py API
Campbell Barton [Tue, 7 Apr 2009 18:55:35 +0000 (18:55 +0000)]
- Added OpenGL access to the game engine as a module so you can import BGL directly.

11 years agoBGE api added place holder docs and CListValue docs.
Campbell Barton [Tue, 7 Apr 2009 17:54:56 +0000 (17:54 +0000)]
BGE api added place holder docs and CListValue docs.

11 years agoEmacs has some rules about where and how to look for settings.
Guillermo S. Romero [Tue, 7 Apr 2009 17:17:47 +0000 (17:17 +0000)]
Emacs has some rules about where and how to look for settings.

11 years agoBGE Python API (small changes)
Campbell Barton [Tue, 7 Apr 2009 16:00:32 +0000 (16:00 +0000)]
BGE Python API (small changes)
- Make BGE's ListValue types convert to python lists for printing since the CValue GetText() function didnt work well- printing lists as [,,,,,] for scene objects and mesh materials for eg.
- Check attributes are descriptor types before casting.
- py_getattr_dict use the Type dict rather then Method and Attribute array.

11 years agoUpdated bge_api_validate_py.txt to check for undocumented attributes
Campbell Barton [Tue, 7 Apr 2009 11:45:48 +0000 (11:45 +0000)]
Updated bge_api_validate_py.txt to check for undocumented attributes
All types methods and attributes are now documented (except for some types have no epydoc .py files for at all)

11 years agoBGE Python API
Campbell Barton [Tue, 7 Apr 2009 11:06:35 +0000 (11:06 +0000)]
BGE Python API

Use each types dictionary to store attributes PyAttributeDef's so it uses pythons hash lookup (which it was already doing for methods) rather then doing a string lookup on the array each time.

This also means attributes can be found in the type without having to do a dir() on the instance.

11 years ago[#18407] Trouble w/
Campbell Barton [Tue, 7 Apr 2009 10:16:26 +0000 (10:16 +0000)]
[#18407] Trouble w/
add python encoding info

11 years agobugfix #18196
Ton Roosendaal [Tue, 7 Apr 2009 07:46:58 +0000 (07:46 +0000)]
bugfix #18196

Halos for objects (not particles) can get texture color, but they skipped
the alpha mapt-to channel when that was set. Actually bug from ehh 1995!

11 years agoBGE Joystick Sensor
Campbell Barton [Tue, 7 Apr 2009 06:23:45 +0000 (06:23 +0000)]
BGE Joystick Sensor
- Raised limit of 2 axis to 4 axis pairs (4==8 joysticks axis pairs)
- Added a new Joystick Sensor type "Single Axis", so you can detect horizontal or vertical movement, rather then just Up/Down/Left/Right
- added Python attribute "axisSingle" so you can get the value from the selected axis (rather then getting it out of the axis list)
- renamed Py attribute "axisPosition" to "axisValues" (was never in a release)

If we need to increase the axis limit again just change JOYAXIS_MAX and the button limits.

11 years agoerror in last commit
Campbell Barton [Tue, 7 Apr 2009 03:20:59 +0000 (03:20 +0000)]
error in last commit

11 years agoFix for: [#18027] Strange behaviour of Explode modifier in combination with SubSurf
Janne Karhu [Tue, 7 Apr 2009 03:00:32 +0000 (03:00 +0000)]
Fix for: [#18027] Strange behaviour of Explode modifier in combination with SubSurf
- Explode didn't use the dmcache index for getting the particles emitter position.
- One "tri or quad"-comparison tested the wrong index. Leading to one quad converting into a tri.

11 years agoTexture effector nabla didn't have a correct initial value and it's button explanatio...
Janne Karhu [Tue, 7 Apr 2009 00:15:58 +0000 (00:15 +0000)]
Texture effector nabla didn't have a correct initial value and it's button explanation needed some work.

11 years agoHarmonic effector force wasn't working properly at all. A silly vector normalization...
Janne Karhu [Mon, 6 Apr 2009 23:23:36 +0000 (23:23 +0000)]
Harmonic effector force wasn't working properly at all. A silly vector normalization where it shouldn't have been.

11 years agoFix for: [#18354] Controlling with a texture the particles DENSITY parameter doesn...
Janne Karhu [Mon, 6 Apr 2009 19:32:23 +0000 (19:32 +0000)]
Fix for: [#18354] Controlling with a texture the particles DENSITY parameter doesn't work.

If the density texture was taken into account with hair parent particles there were cases when there weren't any parents left to interpolate children from. Now a density texture is only taken into account for hair child particles.

11 years agobugfix #18398
Ton Roosendaal [Mon, 6 Apr 2009 18:08:15 +0000 (18:08 +0000)]
bugfix #18398

When using 'angle' display for camera, the 'lens' ipo didn't update this
button. Implementation still lacks a bit... having both variables in the
camera struct is asking for troubles. Put on the re-think list for 2.5!

11 years agoBGE Python API
Campbell Barton [Mon, 6 Apr 2009 13:27:28 +0000 (13:27 +0000)]
BGE Python API
- added a module for the BGE - GameTypes, only contains types.
- added KX_PYATTRIBUTE_DUMMY attributes for KX_Light, KX_PolyProxy, KX_VertexProxy, so all types should give correct results from a dir().
- added a script to check for missing methods in the epydocs - bge_api_validate_py.txt

11 years agoBGE Epydocs were missing some functions
Campbell Barton [Mon, 6 Apr 2009 13:13:25 +0000 (13:13 +0000)]
BGE Epydocs were missing some functions
renamed KX_Light -> KX_LightObject
added some missing controllers

11 years ago- remove debug printf
Campbell Barton [Mon, 6 Apr 2009 12:47:15 +0000 (12:47 +0000)]
- remove debug printf
- remove test for importing the module rather then creating a new one (didnt mean to commit)
- added constants for the mouse sensor to use.

11 years agoBugfix #18266
Ton Roosendaal [Mon, 6 Apr 2009 09:05:37 +0000 (09:05 +0000)]
Bugfix #18266

Mipmap creation for render crashed, in this case:
- use Curves tool on an Image, which is UV mapped on object
- Save the image to disk, under new name
- Render (F12)

This fix is only for the crash, there's something not well coded
for Curves tool, how it manages float buffers. That's for 2.5.

11 years agoPython ref-counting fixes
Campbell Barton [Mon, 6 Apr 2009 08:17:04 +0000 (08:17 +0000)]
Python ref-counting fixes

11 years agocast needed to get things compiling again on my machine.
Kent Mein [Mon, 6 Apr 2009 01:43:01 +0000 (01:43 +0000)]
cast needed to get things compiling again on my machine.


11 years agoFix for: [#18482] Mixed object and halo visualization for particles needs "Emitter...
Janne Karhu [Mon, 6 Apr 2009 00:43:59 +0000 (00:43 +0000)]
Fix for: [#18482] Mixed object and halo visualization for particles needs "Emitter" to be activated.

11 years ago2.4x Bugfix #18279 - Copy Vertex Group Location doesn't work with subsurf modifier
Joshua Leung [Mon, 6 Apr 2009 00:22:58 +0000 (00:22 +0000)]
2.4x Bugfix #18279 - Copy Vertex Group Location doesn't work with subsurf modifier

11 years agoFix for: [#18371] VParent breaks fur effects.
Janne Karhu [Mon, 6 Apr 2009 00:10:52 +0000 (00:10 +0000)]
Fix for: [#18371] VParent breaks fur effects.
-Virtual parents were not randomly selected due to optimization in child particle distribution code.
-Wave-kink had a wrong matrix multiplication.
-Amount of virtual parents wasn't scaled properly to the amount of children rendered.
-Calculating virtual parents is now thread safe.

11 years ago2.4x Bugfix - #18188: "Clear user transform" does not work as described
Joshua Leung [Mon, 6 Apr 2009 00:04:04 +0000 (00:04 +0000)]
2.4x Bugfix - #18188: "Clear user transform" does not work as described

For the record, "Clear user transform" is supposed to restore selected bones to the transforms defined by Actions/NLA, not back to rest position.

11 years agoBGE PyAPI can now import text (within the blend-file)
Campbell Barton [Sun, 5 Apr 2009 19:37:13 +0000 (19:37 +0000)]
BGE PyAPI can now import text (within the blend-file)
Previously this only worked with the Blender API.
- bpy_internal_import small C file that Blender scripting and the game engine use.
- Tested with blender, blenderplayer, loading files
- Needed to use a hack to override the Main struct since the game engine doesn't set G.main
- when the sandbox is set, only internal scripts can be imported.

11 years agoBGE Python API
Campbell Barton [Sun, 5 Apr 2009 14:55:50 +0000 (14:55 +0000)]
BGE Python API
- action attribute wasnt checking for NULL (own fault)
- KX_Scene getCamera wasnt checking for NULL
- CListValue had asserts for not yet implimented functionality, this would close blender. Better to print an error if the user manages to run this functions (I managed to by CListValue.count([1,2,3]))

11 years agoBGE Bugfixes (mostly in the py api)
Campbell Barton [Sun, 5 Apr 2009 14:01:49 +0000 (14:01 +0000)]
BGE Bugfixes (mostly in the py api)

KX_PolygonMaterial and KX_BlenderMaterial - Added a print function (would raise a python error on printing)

* Crashes *
KX_GameObject SetParent - Disallowed setting a parent to its self, caused a recursion crash.
KX_MeshProxy "materials" attribute was segfaulting because of my recent change - I was wrong, you do need to check material types (no idea why since they are both PyObject * at the base)
KX_VisibilityActuator - Wasn't initialized with PyType_Ready() making it crash on access (own fault)

* Crashes because of missing NULL checks *
KX_PolygonMaterial's "gl_texture" attribute wasnt checking for a valid m_tface
KX_GameObject - added checks for GetPhysicsController()
KX_RayCast::RayTest - didnt check for a valid physics_environment
KX_SceneActuator's getCamera python function wasnt checking if there was a camera.

11 years ago- fixed errors with bge epydocs
Campbell Barton [Sun, 5 Apr 2009 10:03:23 +0000 (10:03 +0000)]
- fixed errors with bge epydocs
- changed so inherited attributes & methods are included inline for each type, removed source option since its not useful and makes the download bigger.

11 years agoadded experimental KX_GameObject attributes "sensors", "controllers" and "actuators"
Campbell Barton [Sun, 5 Apr 2009 08:48:51 +0000 (08:48 +0000)]
added experimental KX_GameObject attributes "sensors", "controllers" and "actuators"

11 years agoMake materials use PyAttributeDef's
Campbell Barton [Sun, 5 Apr 2009 07:41:03 +0000 (07:41 +0000)]
Make materials use PyAttributeDef's

11 years ago2.4x - Grease Pencil: Swapping the order of args for gpencil_frame_delete_laststroke...
Joshua Leung [Sun, 5 Apr 2009 06:54:47 +0000 (06:54 +0000)]
2.4x - Grease Pencil: Swapping the order of args for gpencil_frame_delete_laststroke() to be more consistent with the rest of the Grease Pencil API.

11 years agoBGE Python API
Campbell Barton [Sun, 5 Apr 2009 06:08:41 +0000 (06:08 +0000)]
BGE Python API
- made camera use PyAttributeDef's
- removed unneeded duplicate matrix type checks
- fixed own bug (added since 2.48a) that broke a converting 4x4 matrix to a PyObject

11 years agoMade KX_MeshProxy use PyAttributeDef. simplified getting the 'materials' attribute...
Campbell Barton [Sat, 4 Apr 2009 15:54:07 +0000 (15:54 +0000)]
Made KX_MeshProxy use PyAttributeDef. simplified getting the 'materials' attribute (no need to differentiate between types)
Added KX_GameObject 'meshes' attribute to replace getMesh(i)

11 years agoFix for: [#18273] reactor particle spowns to earlier.
Janne Karhu [Sat, 4 Apr 2009 14:34:39 +0000 (14:34 +0000)]
Fix for: [#18273] reactor particle spowns to earlier.

Particle life "rand" value could be set above "1.0" allowing for negative particle lifetimes.

11 years agoFix for [#18017] reactor particles affected by a curve guide emit at a wrong position.
Janne Karhu [Sat, 4 Apr 2009 12:48:40 +0000 (12:48 +0000)]
Fix for [#18017] reactor particles affected by a curve guide emit at a wrong position.

11 years agoBGE Py API, mistake when redoing set action as a static function.
Campbell Barton [Sat, 4 Apr 2009 11:02:13 +0000 (11:02 +0000)]
BGE Py API, mistake when redoing set action as a static function.

11 years agoinclude PyObjectPlus method in __dict__
Campbell Barton [Sat, 4 Apr 2009 09:54:05 +0000 (09:54 +0000)]
include PyObjectPlus method in __dict__

11 years ago- should fix compiling with older python versions (<2.5)
Campbell Barton [Sat, 4 Apr 2009 08:20:52 +0000 (08:20 +0000)]
- should fix compiling with older python versions (<2.5)
- made the isA() function accept python types as well as strings.
- renamed _getattr_dict to py_getattr_dict

11 years agofix for [#18484] Bullet Crash (possibly because of overlapping rigid body balls)
Campbell Barton [Sat, 4 Apr 2009 04:56:05 +0000 (04:56 +0000)]
fix for [#18484] Bullet Crash (possibly because of overlapping rigid body balls)
simple missing negative index check.

11 years agomoved more attributes from getattr into PyAttributeDef's
Campbell Barton [Sat, 4 Apr 2009 02:57:35 +0000 (02:57 +0000)]
moved more attributes from getattr into PyAttributeDef's

11 years agoMSVC9 project file.
Benoit Bolsee [Fri, 3 Apr 2009 19:19:02 +0000 (19:19 +0000)]
MSVC9 project file.

11 years agoBGE API cleanup: RandomActuator.
Benoit Bolsee [Fri, 3 Apr 2009 19:09:52 +0000 (19:09 +0000)]
BGE API cleanup: RandomActuator.

11 years agoFix for [#18372] object-particle in other layer not editable correctly.
Janne Karhu [Fri, 3 Apr 2009 18:13:51 +0000 (18:13 +0000)]
Fix for [#18372] object-particle in other layer not editable correctly.

11 years agoSome users could not build with python 2.5, hopefully this fixes it.
Campbell Barton [Fri, 3 Apr 2009 15:08:38 +0000 (15:08 +0000)]
Some users could not build with python 2.5, hopefully this fixes it.

11 years agoCleanup of particle object visualization code. No new features and hopefully no new...
Janne Karhu [Fri, 3 Apr 2009 14:54:29 +0000 (14:54 +0000)]
Cleanup of particle object visualization code. No new features and hopefully no new bugs.

11 years agoPython BGE API
Campbell Barton [Fri, 3 Apr 2009 14:51:06 +0000 (14:51 +0000)]
Python BGE API
- Initialize python types with PyType_Ready, which adds methods to the type dictionary.
- use Pythons get/setattro (uses a python string for the attribute rather then char*). Using basic C strings seems nice but internally python converts them to python strings and discards them for most functions that accept char arrays.
- Method lookups use the PyTypes dictionary (should be faster then Py_FindMethod)
- Renamed __getattr -> py_base_getattro, _getattr -> py_getattro, __repr -> py_base_repr, py_delattro, py_getattro_self etc.

From here is possible to put all the parent classes methods into each python types dictionary to avoid nested lookups (api has 4 levels of lookups in some places), tested this but its not ready yet.

Simple tests for getting a method within a loop show this to be between 0.5 and 3.2x faster then using Py_FindMethod()

11 years agoMajor cleanup of particle render & drawing code. No new features and hopefully no...
Janne Karhu [Fri, 3 Apr 2009 14:50:54 +0000 (14:50 +0000)]
Major cleanup of particle render & drawing code. No new features and hopefully no new bugs.

11 years agoBug fix: hair or child particles didn't react to density texture.
Janne Karhu [Fri, 3 Apr 2009 14:41:31 +0000 (14:41 +0000)]
Bug fix: hair or child particles didn't react to density texture.

11 years agofix for last commit, needed some additional checks
Joseph Eagar [Fri, 3 Apr 2009 04:36:38 +0000 (04:36 +0000)]
fix for last commit, needed some additional checks

11 years agoBGE Python api
Campbell Barton [Fri, 3 Apr 2009 04:12:20 +0000 (04:12 +0000)]
BGE Python api
Added the method into the PyType so python knows about the methods (its supposed to work this way).
This means in the future the api can use PyType_Ready() to store the methods in the types dictionary.
Python3 removes Py_FindMethod and we should not be using it anyway since its not that efficient.

11 years agoSetting ignore_deprecation_warnings as 1 by default in GamePlayer
Dalai Felinto [Fri, 3 Apr 2009 03:52:19 +0000 (03:52 +0000)]
Setting ignore_deprecation_warnings as 1 by default in GamePlayer
(in the embed BGE it is still 0)

11 years agomade grease pencil delete a frame if you delete all the strokes in it.
Joseph Eagar [Fri, 3 Apr 2009 03:16:31 +0000 (03:16 +0000)]
made grease pencil delete a frame if you delete all the strokes in it.

11 years agoBGE Python
Campbell Barton [Fri, 3 Apr 2009 02:16:56 +0000 (02:16 +0000)]
BGE Python
- Bugfix for running dir() on all BGE python objects. was not getting the immediate methods and attributes for each class.
- Use attributes for KX_Scene (so they are included with dir())
- Override __dict__ attributes for KX_Scene and KX_GameObject so custom properties are included with a dir()

11 years agoScript written for apricot, poly reduces based on known topologies, keeping edge...
Campbell Barton [Thu, 2 Apr 2009 11:30:27 +0000 (11:30 +0000)]
Script written for apricot, poly reduces based on known topologies, keeping edge loops unlike edge collapsing poly reduction.

11 years ago[#17963] NearSensor segmentation fault
Campbell Barton [Thu, 2 Apr 2009 08:33:45 +0000 (08:33 +0000)]
[#17963] NearSensor segmentation fault
bugfix in bullet
Caused by using the index from closestAxis4 before checking its -1

11 years ago[#18472] [patch] Speeding up Blenderplayer's profile drawing
Campbell Barton [Thu, 2 Apr 2009 06:59:27 +0000 (06:59 +0000)]
[#18472] [patch] Speeding up Blenderplayer's profile drawing
from Mitchell Stokes (moguri)

11 years ago[#18477] Prevent .svn directories being included in OS X app bundles
Campbell Barton [Thu, 2 Apr 2009 06:46:56 +0000 (06:46 +0000)]
[#18477] Prevent .svn directories being included in OS X app bundles
from James Crosby (sheep)

11 years ago[#18452] Particle children API for python.
Campbell Barton [Thu, 2 Apr 2009 06:39:09 +0000 (06:39 +0000)]
[#18452] Particle children API for python.
from Alberto Santos (dnakhain)

"This patch adds a few new variables relationated with Particle System children such as children amount, render amount,
child clumping..."

11 years agoAdded getitem/setitem access for KX_GameObject
Campbell Barton [Thu, 2 Apr 2009 05:38:05 +0000 (05:38 +0000)]
Added getitem/setitem access for KX_GameObject
ob.someProp = 10
can now be...
ob["someProp"] = 10

For simple get/set test with an objects 10 properties, this is ~30% faster.

Though I like the attribute access, its slower because it needs to lookup BGE attributes and methods (for parent classes as well as KX_GameObject class).

This could also be an advantage if there are collisions between new attributes added for 2.49 and existing properties a game uses.

Made some other small optimizations,
- Getting and setting property can use const char* as well as STR_String (avoids making new STR_Strings just to do the lookup).
- CValue::SetPropertiesModified() and CValue::SetPropertiesModified(), were looping through all items in the std::map, advancing from the beginning each time.

11 years agoBGE API cleanup: ReplaceMeshActuator mesh attributes now returns a KX_MeshProxy....
Benoit Bolsee [Wed, 1 Apr 2009 08:59:36 +0000 (08:59 +0000)]
BGE API cleanup: ReplaceMeshActuator mesh attributes now returns a KX_MeshProxy. Fix a bug in KX_MeshProxy where the Python type was not set right.

11 years ago[#18479] 'Consolidate into one image' does not calculate/use 'pixel margin'
Campbell Barton [Wed, 1 Apr 2009 07:13:55 +0000 (07:13 +0000)]
[#18479] 'Consolidate into one image' does not calculate/use 'pixel margin'
Thanks to Dusan Stevanovic for pointing out the fix.

Also noticed alpha wasn't being rendered, enabled texface alpha.

11 years ago[#18478] Unwrap (smart projections) should accept values grater than 0.25 for island...
Campbell Barton [Wed, 1 Apr 2009 02:02:26 +0000 (02:02 +0000)]
[#18478] Unwrap (smart projections) should accept values grater than 0.25 for island margin (it works just fine when changed in original script)

increased value as suggested.

11 years agoClean up for the imminent migration from SVN to GIT.
Guillermo S. Romero [Tue, 31 Mar 2009 22:34:34 +0000 (22:34 +0000)]
Clean up for the imminent migration from SVN to GIT.

11 years agoBGE API cleanup: DynamicActuator, ReplaceMeshActuator, TrackToActuator.
Benoit Bolsee [Tue, 31 Mar 2009 21:03:15 +0000 (21:03 +0000)]
BGE API cleanup: DynamicActuator, ReplaceMeshActuator, TrackToActuator.

11 years ago[#18455] The new FFMPEG version gives the wrong color
Martin Poirier [Tue, 31 Mar 2009 19:39:17 +0000 (19:39 +0000)]
[#18455] The new FFMPEG version gives the wrong color

ffmpeg format switched from RGBA32 to BGR32, it's no longer needed to swap color planes.

NOTE: this commit also attempts to fix the big endian case, but since I don't have a machine to test it, I'd appreciate if someone else would.

11 years agoBGE API cleanup, patch from Moguri: RaySensor, NetworkMessageActuator, NetworkMessage...
Benoit Bolsee [Tue, 31 Mar 2009 19:02:01 +0000 (19:02 +0000)]
BGE API cleanup, patch from Moguri: RaySensor, NetworkMessageActuator, NetworkMessageSensor.

11 years ago== etch-a-ton ==
Martin Poirier [Tue, 31 Mar 2009 14:29:58 +0000 (14:29 +0000)]
== etch-a-ton ==

Correct joint-guided roll to use the previous bone, not the following (that was silly). Also made first bone use view axis (since it has no previous), this is much nicer that using rotation correction only. Using the joint roll option makes it MUCH more orientation independant.

11 years ago[#18473] SCons build fails when linking blender when WITH_BF_OGG enabled
Campbell Barton [Tue, 31 Mar 2009 08:13:21 +0000 (08:13 +0000)]
[#18473] SCons build fails when linking blender when WITH_BF_OGG enabled
fix for linking on linux

11 years ago[#18439] Controlling the bevel shape for a text object with a curve no longer works.
Campbell Barton [Tue, 31 Mar 2009 06:22:25 +0000 (06:22 +0000)]
[#18439] Controlling the bevel shape for a text object with a curve no longer works.
own fault, broke rev16702.
Curves created by fonts didnt have their radius set. Forgot do do this when making radius calculated with the curve (like tilt)

11 years ago[#18277] Segfault crash by editing mesh with subsurf+ParticleInstance modifiers
Campbell Barton [Tue, 31 Mar 2009 00:58:02 +0000 (00:58 +0000)]
[#18277] Segfault crash by editing mesh with subsurf+ParticleInstance modifiers
Marked as fixed but was still using uninitialized variables.

11 years agoHide full retarget panels behind rt -1 (not ready for large scale use and not too...
Martin Poirier [Mon, 30 Mar 2009 15:26:14 +0000 (15:26 +0000)]
Hide full retarget panels behind rt -1 (not ready for large scale use and not too well documented yet. Doesn't affect etch-a-ton.

11 years agor19455 to Re-enable vertex welding for soft-bodies failed even on simple cases like...
Campbell Barton [Mon, 30 Mar 2009 00:40:19 +0000 (00:40 +0000)]
r19455 to Re-enable vertex welding for soft-bodies failed even on simple cases like a cube with scrambled mesh data.
Please test before committing.

m_vertexArray has no doubles now and is not aligned to 3, using m_triFaceArray to get the verts for each face.

11 years agoApplied patch #18446, to do versions on damping
Erwin Coumans [Sun, 29 Mar 2009 19:54:05 +0000 (19:54 +0000)]
Applied patch #18446, to do versions on damping

Re-enable vertex welding, only for soft bodies. They require it. Future versions could expose such vertexWeldingThreshold.

11 years agoOnly apply advanced setting of angular/linear factor to rigid bodies (with angular...
Erwin Coumans [Sun, 29 Mar 2009 18:34:35 +0000 (18:34 +0000)]
Only apply advanced setting of angular/linear factor to rigid bodies (with angular rotation). The setting broke 'dynamic'-only objects.

11 years agoBGE API cleanup: CDActuator, ParentActuator, VisibilityActuator done. Thanks to Andre.
Benoit Bolsee [Sun, 29 Mar 2009 15:17:55 +0000 (15:17 +0000)]
BGE API cleanup: CDActuator, ParentActuator, VisibilityActuator done. Thanks to Andre.

11 years agoMoved EXR settings to OS related zone.
Guillermo S. Romero [Sat, 28 Mar 2009 19:31:22 +0000 (19:31 +0000)]
Moved EXR settings to OS related zone.
It had its own "which OS" conditionals, so please check the moving did
change the result.

11 years agogame engine compile fix for MSVC, game engine team might want to check.
Andrea Weikert [Sat, 28 Mar 2009 11:09:53 +0000 (11:09 +0000)]
game engine compile fix for MSVC, game engine team might want to check.

11 years agoremoved unneeded arg from makeknots() and replaced some numbers with defines
Campbell Barton [Sat, 28 Mar 2009 05:51:18 +0000 (05:51 +0000)]
removed unneeded arg from makeknots() and replaced some numbers with defines

11 years agoTooltip fix, there is no such thing as "Tadius interpolation"
Campbell Barton [Sat, 28 Mar 2009 04:25:21 +0000 (04:25 +0000)]
Tooltip fix, there is no such thing as "Tadius interpolation"

11 years agoBGE API Cleanup: GameActuator (patch from Andre)
Benoit Bolsee [Fri, 27 Mar 2009 22:11:30 +0000 (22:11 +0000)]
BGE API Cleanup: GameActuator (patch from Andre)

11 years agoBGE API cleanup: AddObject, DeleteObject and Scene actuator added.
Benoit Bolsee [Fri, 27 Mar 2009 21:54:16 +0000 (21:54 +0000)]
BGE API cleanup: AddObject, DeleteObject and Scene actuator added.

11 years agoFixed a couple of null issues spotted by coverity.
Kent Mein [Fri, 27 Mar 2009 16:27:48 +0000 (16:27 +0000)]
Fixed a couple of null issues spotted by coverity.
CIDS: 42 and 470