11 years agomesh proxy attributes from andrecastelo
Campbell Barton [Mon, 13 Apr 2009 03:43:16 +0000 (03:43 +0000)]
mesh proxy attributes from andrecastelo

11 years agothis should fix building with mingw
Campbell Barton [Sun, 12 Apr 2009 22:05:09 +0000 (22:05 +0000)]
this should fix building with mingw

11 years agofix some refcounting issues with PyDict_SetItemString
Campbell Barton [Sun, 12 Apr 2009 20:19:27 +0000 (20:19 +0000)]
fix some refcounting issues with PyDict_SetItemString

11 years ago2DFilter bugfixes:
Dalai Felinto [Sun, 12 Apr 2009 19:46:50 +0000 (19:46 +0000)]
2DFilter bugfixes:

[#18154] 2dFilter and motion blur should run only once to all the scenes
[#18504] The GL_PROJECTION matrix is being reset by the 2dfilter.

11 years ago[#18516] Particle children API for python (Complete).
Campbell Barton [Sun, 12 Apr 2009 17:07:40 +0000 (17:07 +0000)]
[#18516] Particle children API for python (Complete).
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).

11 years agoPropertyActuator toggle option didnt run when the Value field was empty.
Campbell Barton [Sun, 12 Apr 2009 16:10:43 +0000 (16:10 +0000)]
PropertyActuator toggle option didnt run when the Value field was empty.

11 years agoBGE Python API
Campbell Barton [Sun, 12 Apr 2009 14:22:51 +0000 (14:22 +0000)]
BGE Python API

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.

11 years agoneed strtoll defined as _strtoi64 to build on windows
Campbell Barton [Sun, 12 Apr 2009 10:56:36 +0000 (10:56 +0000)]
need strtoll defined as _strtoi64 to build on windows

11 years agoBGE Python API
Campbell Barton [Sun, 12 Apr 2009 09:56:30 +0000 (09:56 +0000)]
BGE Python API

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.

11 years agoadded "toggle" an option for the property actuator.
Campbell Barton [Sun, 12 Apr 2009 07:24:04 +0000 (07:24 +0000)]
added "toggle" an option for the property actuator.
much less hassle then setting up a property sensor and 2 assignment actuators, or through python.

11 years agouse long long rather then int for storing game logic properties.
Campbell Barton [Sun, 12 Apr 2009 06:41:01 +0000 (06:41 +0000)]
use long long rather then int for storing game logic properties.

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

- 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.

11 years agoBGE Py API
Campbell Barton [Sat, 11 Apr 2009 20:58:09 +0000 (20:58 +0000)]
- 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.

11 years agobugfix from Moguri, AddReplica wasnt setting the light layer from the parent
Campbell Barton [Sat, 11 Apr 2009 15:59:11 +0000 (15:59 +0000)]
bugfix from Moguri, AddReplica wasnt setting the light layer from the parent

11 years agoFix for: [#18499] Particle size can only be set in steps of 0.1
Janne Karhu [Fri, 10 Apr 2009 21:07:32 +0000 (21:07 +0000)]
Fix for: [#18499] Particle size can only be set in steps of 0.1
- Some button settings were wrong.

11 years agoMesh effector surface option:
Janne Karhu [Fri, 10 Apr 2009 19:40:21 +0000 (19:40 +0000)]
Mesh effector surface option:
- 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

11 years agoAdded function name to many of the PyArg_ParseTuple calls in gameengine
Andre Susano Pinto [Fri, 10 Apr 2009 16:45:19 +0000 (16:45 +0000)]
Added function name to many of the PyArg_ParseTuple calls in gameengine
This way python raises more useful messages.

11 years agostrip indentation from lines of OBJ files.
Campbell Barton [Fri, 10 Apr 2009 14:33:52 +0000 (14:33 +0000)]
strip indentation from lines of OBJ files.
OBJ's from VMD's molecular visualization program had this.

11 years agoX3D Import was broken because some arguments from VRML were missing.
Campbell Barton [Fri, 10 Apr 2009 14:09:44 +0000 (14:09 +0000)]
X3D Import was broken because some arguments from VRML were missing.

11 years agoParticle effector falloff maxdist etc. didn't work like it was supposed to.
Janne Karhu [Thu, 9 Apr 2009 23:43:25 +0000 (23:43 +0000)]
Particle effector falloff maxdist etc. didn't work like it was supposed to.

11 years agoBGE API cleanup: ConstraintActuator.
Benoit Bolsee [Thu, 9 Apr 2009 23:10:12 +0000 (23:10 +0000)]
BGE API cleanup: ConstraintActuator.

11 years agoBGE Bugfix
Campbell Barton [Thu, 9 Apr 2009 22:15:26 +0000 (22:15 +0000)]
BGE Bugfix
The End key didn't work work at all for the keyboard sensor.
Removed getEventList() since it was added since 2.48a release.

11 years agoBGE API cleanup: StateActuator.
Benoit Bolsee [Thu, 9 Apr 2009 21:15:44 +0000 (21:15 +0000)]
BGE API cleanup: StateActuator.

11 years agoBGE API cleanup: sound actuator.
Benoit Bolsee [Thu, 9 Apr 2009 20:40:12 +0000 (20:40 +0000)]
BGE API cleanup: sound actuator.

11 years agoAdded GameKeys.EventToCharacter(event, is_shift) so you can get the character that...
Campbell Barton [Thu, 9 Apr 2009 16:00:45 +0000 (16:00 +0000)]
Added GameKeys.EventToCharacter(event, is_shift) so you can get the character that would be types when pressing a key.

Last commit was made in the pydocs folder only, so this includes changes mentioned in rev 19620.

11 years agoBGE Py API
Campbell Barton [Thu, 9 Apr 2009 12:53:56 +0000 (12:53 +0000)]
- 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.

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)