Commit Graph

15076 Commits

Author SHA1 Message Date
Janne Karhu
a127f259da 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.
2009-04-07 03:00:32 +00:00
Janne Karhu
7e23b7dc54 Texture effector nabla didn't have a correct initial value and it's button explanation needed some work. 2009-04-07 00:15:58 +00:00
Janne Karhu
b8270db75c Harmonic effector force wasn't working properly at all. A silly vector normalization where it shouldn't have been. 2009-04-06 23:23:36 +00:00
Janne Karhu
30ce01f23f 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.
2009-04-06 19:32:23 +00:00
Ton Roosendaal
445ca000bc 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!
2009-04-06 18:08:15 +00:00
Campbell Barton
46a440c7a5 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
2009-04-06 13:27:28 +00:00
Campbell Barton
960fa534b7 BGE Epydocs were missing some functions
renamed KX_Light -> KX_LightObject
added some missing controllers
2009-04-06 13:13:25 +00:00
Campbell Barton
64fe09ab20 - 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.
2009-04-06 12:47:15 +00:00
Ton Roosendaal
fdceee0088 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.
2009-04-06 09:05:37 +00:00
Campbell Barton
c10d1c2853 Python ref-counting fixes 2009-04-06 08:17:04 +00:00
Kent Mein
a95f97cb28 cast needed to get things compiling again on my machine.
Kent
2009-04-06 01:43:01 +00:00
Janne Karhu
fe562f0dd4 Fix for: [#18482] Mixed object and halo visualization for particles needs "Emitter" to be activated. 2009-04-06 00:43:59 +00:00
Joshua Leung
ab467e7238 2.4x Bugfix #18279 - Copy Vertex Group Location doesn't work with subsurf modifier 2009-04-06 00:22:58 +00:00
Janne Karhu
58b1e04fe0 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.
2009-04-06 00:10:52 +00:00
Joshua Leung
9a1e1912e1 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.
2009-04-06 00:04:04 +00:00
Campbell Barton
b4e4ccf92d 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.
2009-04-05 19:37:13 +00:00
Campbell Barton
3dacfbb231 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]))
2009-04-05 14:55:50 +00:00
Campbell Barton
033a63f858 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.
2009-04-05 14:01:49 +00:00
Campbell Barton
7d4dc4f0f5 - fixed errors with bge epydocs
- changed epy_docgen.sh so inherited attributes & methods are included inline for each type, removed source option since its not useful and makes the download bigger.
2009-04-05 10:03:23 +00:00
Campbell Barton
f8cc272575 added experimental KX_GameObject attributes "sensors", "controllers" and "actuators" 2009-04-05 08:48:51 +00:00
Campbell Barton
77da8461f3 Make materials use PyAttributeDef's 2009-04-05 07:41:03 +00:00
Joshua Leung
3fa7717b57 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. 2009-04-05 06:54:47 +00:00
Campbell Barton
53e721305e 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
2009-04-05 06:08:41 +00:00
Campbell Barton
04ef5a492a 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)
2009-04-04 15:54:07 +00:00
Janne Karhu
9982217a72 Fix for: [#18273] reactor particle spowns to earlier.
Particle life "rand" value could be set above "1.0" allowing for negative particle lifetimes.
2009-04-04 14:34:39 +00:00
Janne Karhu
d84dc44835 Fix for [#18017] reactor particles affected by a curve guide emit at a wrong position. 2009-04-04 12:48:40 +00:00
Campbell Barton
cb26c7e75a BGE Py API, mistake when redoing set action as a static function. 2009-04-04 11:02:13 +00:00
Campbell Barton
b6114be5e3 include PyObjectPlus method in __dict__ 2009-04-04 09:54:05 +00:00
Campbell Barton
a35a8f7a38 - 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
2009-04-04 08:20:52 +00:00
Campbell Barton
c31f806c99 fix for [#18484] Bullet Crash (possibly because of overlapping rigid body balls)
simple missing negative index check.
2009-04-04 04:56:05 +00:00
Campbell Barton
6be6921184 moved more attributes from getattr into PyAttributeDef's 2009-04-04 02:57:35 +00:00
Benoit Bolsee
29f5c7dd5d MSVC9 project file. 2009-04-03 19:19:02 +00:00
Benoit Bolsee
07930c0b09 BGE API cleanup: RandomActuator. 2009-04-03 19:09:52 +00:00
Janne Karhu
3b23224061 Fix for [#18372] object-particle in other layer not editable correctly. 2009-04-03 18:13:51 +00:00
Campbell Barton
e6985d31b5 Some users could not build with python 2.5, hopefully this fixes it. 2009-04-03 15:08:38 +00:00
Janne Karhu
bc789af5a9 Cleanup of particle object visualization code. No new features and hopefully no new bugs. 2009-04-03 14:54:29 +00:00
Campbell Barton
fd2b115678 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()
2009-04-03 14:51:06 +00:00
Janne Karhu
e30cb79aaa Major cleanup of particle render & drawing code. No new features and hopefully no new bugs. 2009-04-03 14:50:54 +00:00
Janne Karhu
5934757089 Bug fix: hair or child particles didn't react to density texture. 2009-04-03 14:41:31 +00:00
Joseph Eagar
60bd7d12fc fix for last commit, needed some additional checks 2009-04-03 04:36:38 +00:00
Campbell Barton
d573e9c539 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.
2009-04-03 04:12:20 +00:00
Dalai Felinto
0499d98311 Setting ignore_deprecation_warnings as 1 by default in GamePlayer
(in the embed BGE it is still 0)
2009-04-03 03:52:19 +00:00
Joseph Eagar
8ca30120a2 made grease pencil delete a frame if you delete all the strokes in it. 2009-04-03 03:16:31 +00:00
Campbell Barton
b22705f169 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()
2009-04-03 02:16:56 +00:00
Campbell Barton
2178fcea6e Script written for apricot, poly reduces based on known topologies, keeping edge loops unlike edge collapsing poly reduction.
Example
http://www.graphicall.org/ftp/ideasman42/unsubsurf.gif
2009-04-02 11:30:27 +00:00
Campbell Barton
da39179afd [#17963] NearSensor segmentation fault
bugfix in bullet
Caused by using the index from closestAxis4 before checking its -1
2009-04-02 08:33:45 +00:00
Campbell Barton
941a8a2504 [#18472] [patch] Speeding up Blenderplayer's profile drawing
from Mitchell Stokes (moguri)
2009-04-02 06:59:27 +00:00
Campbell Barton
686b92f7b4 [#18477] Prevent .svn directories being included in OS X app bundles
from James Crosby (sheep)
2009-04-02 06:46:56 +00:00
Campbell Barton
655177aebd [#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..."
2009-04-02 06:39:09 +00:00
Campbell Barton
fcc23faa3a 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.
2009-04-02 05:38:05 +00:00