Commit Graph

13787 Commits

Author SHA1 Message Date
Campbell Barton
b818b1a164 cleanup mesh materials option was setting incorrect material indicies 2008-09-03 03:24:01 +00:00
Erwin Coumans
1926e84650 Finally upgraded to latest Bullet subversion, about to release 2.71. Some recent changes in extern/bullet2 need to be re-applied, will check with Benoit. Ray tests in 0_FPS_Template.blend is broken, didn't figure out why yet.
HELP BUILD SYSTEM MAINTAINERS: Please help with updating all build systems: the newly added files need to be added. Note that the src/SoftBody has been added for future extension of real-time soft bodies.
2008-09-03 02:27:16 +00:00
Daniel Genrich
33ac84e888 Compile fixes (reported by broken) 2008-09-03 00:00:32 +00:00
Benoit Bolsee
fe93743518 BGE patch 17547 approved: Cleaned up pydoc for BGE, compiles now error free 2008-09-02 22:13:07 +00:00
Ken Hughes
bbf2ff410b Fix some more gcc warnings. 2008-09-02 21:09:29 +00:00
Ken Hughes
e4dbf0e7d6 Fix gcc compiler warnings. 2008-09-02 20:53:07 +00:00
Benoit Bolsee
0fe906f49e BGE patch: simple fix to synchronize sensor pulse mode with sensor state transitions. 2008-09-02 18:34:54 +00:00
Diego Borghetti
dcbf8fbf76 Fix segmentation fault when try separate a mesh with the active face selected.
If the active face is part of the selection, Blender crash when
split the mesh because the act_face have an invalid pointer.

The solution is simple, check if the active face is part of the selection
and in that case, set it to NULL.

Campbell please double check this.
2008-09-02 17:50:54 +00:00
Geoffrey Bantle
ead69661e8 -> Fix for 64 bit alignment of Vertex colors in bmesh
Vertex color structure in bmesh needed to be padded for
8 byte aligned memory access.
2008-09-02 16:39:03 +00:00
Campbell Barton
84dcfa181b BGE Bugfix, SDL joysticks arrow keys didnt work when 2 joysticks were being used at the same time.
The event queue was running for every joystick sensor without checking if the events were for that joystick.
seperating the event queue for each joystick is overkill so instead deal with all joysticks events in once function.

Also removed some unused functions
2008-09-02 06:12:19 +00:00
Campbell Barton
81ad271d15 BGE joystick sensor bugfix, was sending true events logic tick (as if the true pulse option was enabled). 2008-09-02 02:03:03 +00:00
Ian Thompson
aa4e4da8c3 Text Editor (GSOC 2008)
=======================
Merge of branch soc-2008-quorn to trunk:
Merged 14970:16308 to trunk@16307, updated to HEAD.
Merged 16318

Main features from this branch:
 - Python text plugins
 - Suggestions and documentation elements
 - Improved syntax highlighting
 - Word wrap
 - Additional editing tools
 - Various undo and clipboard fixes
 - File header info and modification checks
2008-09-01 14:04:22 +00:00
Campbell Barton
7b9ee57c0b BGE joystick sensor py api function 'getConnected()', returns true if the joystick is connected and working.
SCA_Joystick.h seemed to have twice as many newlines as needed.
2008-09-01 06:25:13 +00:00
Joshua Leung
6f3a8519da Bugfix #17557: Segfault when no active node and trying to insert keyframe
When there is no active node in the Composite Nodes, Blender crashes when trying to insert a keyframe using IKEY.
2008-09-01 04:09:07 +00:00
Campbell Barton
e8049903ac BGE python api for get/setting the joystick index, minor cleanup also. 2008-09-01 00:12:39 +00:00
Benoit Bolsee
234b616078 BGE bug #17459 fixed: action actuators depending on their order in the actuator list. 2008-08-31 21:53:39 +00:00
Benoit Bolsee
7f257df5b4 BGE patch 17547 applied in trunk: Cleaned up pydoc for BGE, compiles now error free 2008-08-31 19:07:10 +00:00
Benoit Bolsee
74339c639a BGE patch approved: BGE Multiple Joysticks 2008-08-31 18:42:58 +00:00
Ian Thompson
062bf735e7 Minor tidying and commenting 2008-08-31 16:23:31 +00:00
Joshua Leung
a4e74c92f7 == Grease Pencil Conversions - Armature ==
Can now also convert active layer to a series of bone chains. Each stroke will be converted to a chain of connected bones.

At the moment, it is still necessary to manually recalculate roll angles after the armature has been created, as the bones are not assigned the correct roll angles yet.
2008-08-31 12:47:04 +00:00
Joshua Leung
6aee42daaf Bugfix #17551: AutoKey for Visual Keying non-functional
No VisualKeying checks were being done
2008-08-31 07:33:27 +00:00
Daniel Genrich
9818b8a95c Fix for win64 building (gettextlib had wrong name) 2008-08-31 01:57:53 +00:00
Daniel Genrich
25c116e80a Fixing typo to make compile working again 2008-08-30 23:12:01 +00:00
Nathan Letwory
ff0aab05b2 patch for bug #17553: material emit is allowed to go from 0.0 to 2.0; however curves only make it go to 1.0
reported and patched by slikdigit
2008-08-30 21:41:02 +00:00
Ian Thompson
3bab89cc1c Merge from trunk 16122-16307 2008-08-30 14:32:16 +00:00
Ian Thompson
bccce7e30e Fix for class variable parsing/listing bug. 2008-08-30 11:27:27 +00:00
Kent Mein
4d888fb6c8 Added missing null check to convertmenu
Remported by alxarch.
If you remove the active object and then tried alt-c it would crash.

Kent
2008-08-29 14:19:34 +00:00
Joshua Leung
b77e130dd6 Grease Pencil:
* Added 'Convert To...' button for easy access to conversion tool. The hotkey has been mentioned in the tooltip. This replaces the 'Del Active Frame' button in 3d view only.

Armature Apply Pose:
* Added menu entry (beside Relax Pose)
* Bone-parented objects now get their parent inverse matrices correctly recalculated
* Changes for 'scale' code in previous commit wasn't correct... reverting
* IPO/anim flush protection is now set on bones to prevent them from being sprawled everywhere after applying
2008-08-29 12:24:07 +00:00
Joshua Leung
ff06fcfc33 Bugfix:
* Roll is now correctly calculated for Apply Armature
* Scale on x,z axes is no longer cleared (only scale on y axis needs to be)
2008-08-29 11:15:24 +00:00
Joshua Leung
bcff5afeb2 == Grease Pencil ==
Special request by Alxarch for Architecture:
Hold Ctrl-Key when 'Draw Mode' is enabled to draw straight lines. 
Although when drawing the stroke, the stroke will still be freehand, the final result will be a line between the endpoints of that stroke. This is useful for annotations of sectioning lines + site maps, etc.
2008-08-29 10:47:53 +00:00
Campbell Barton
e21b3d81c5 Use Py_ssize_t rather then int, broke building on 64bt linux 2008-08-29 06:32:42 +00:00
Campbell Barton
f60992daae BGE Py API - GameKeys.EventToString() utility function, makes key configuration menu's easier to write.
own error with blenderplayer, wasnt decreffing the GameLogic module, probably didnt matter since python was restarted anyway, but is incorrect.
2008-08-29 03:15:17 +00:00
Benoit Bolsee
272132888f BGE patch: add X-Ray option to ray sensor. The option is effective only if a property is set: the sensor will ignore the objects that don't have the property. 2008-08-28 19:37:49 +00:00
Joshua Leung
9f10007bfb == Apply Current Pose as New Restpose ==
In PoseMode, the Ctrl-A hotkey can now be used to apply the current pose as the new restpose for the armature. 

Notes:
* Roll correction may not be totally correct on bone chains, but is ok in most cases.
* Objects that are bone parented to the armature where this is applied are not correctly adjusted yet. 
* It is advisable to 'apply' the existing armature deformations to geometry deformed by the armature before applying this, to prevent unexpected results.
* No menu entry yet... will add in due course.
2008-08-28 12:22:55 +00:00
Benoit Bolsee
9f89f4cf34 compilation problem with gcc, memset undeclared 2008-08-28 12:12:56 +00:00
Benoit Bolsee
6a98b9215c final fix for compilation problem with KX_RayCast::Callback template in gcc 2008-08-28 11:13:04 +00:00
Benoit Bolsee
116001ac34 more fix for compilation problem with KX_RayCast::Callback template in gcc 2008-08-28 11:06:46 +00:00
Joshua Leung
bf7387b2d8 GPencil Bezier Curve Conversion:
Now sets vector/free handles by default
2008-08-28 10:43:17 +00:00
Benoit Bolsee
84d1dfb89b patch for compilation problem around KX_RayCast::Callback template with gcc 2008-08-28 10:28:06 +00:00
Joshua Leung
1032da67cc Grease Pencil - Curve Conversion Improvements:
* Changed hotkey from Alt-C to Alt-Shift-C so that it works when the active object cannot be deselected/deactivated.
* Added option to convert to bezier curves. Note that currently, the handles are simply placed to the same location as the point so that there is an exact match with the gpencil strokes. In future, it would be interesting to investigate using proper curve-fitting algos instead.
2008-08-28 10:19:34 +00:00
Campbell Barton
794ffdcd2c didnt build before committiong this small change :/
isLight() is apricot only. Add this back when GLSL is merged to avoid conflicts.
2008-08-28 09:02:04 +00:00
Benoit Bolsee
c8d0a540f5 BGE patch: fix division by 0 error when sound sample cannot be loaded in sound actuator. 2008-08-28 08:13:58 +00:00
Campbell Barton
f88c5d9721 BGE Bugfix, lights were not being removed when their gameobject was removed causing odd shadows to hang about the scene. 2008-08-28 07:03:23 +00:00
Campbell Barton
2934e78a86 remove more python functions from builtins that could allow scripts to do bad stuff.
- reload, file, execfile, compile
These are only removed when running in higher security mode thats not default in blender.
2008-08-28 05:45:20 +00:00
Benoit Bolsee
becd467be8 BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information.
rayCast(to,from,dist,prop,face,xray,poly):

The face paremeter determines the orientation of the normal: 
  0 or omitted => hit normal is always oriented towards the ray origin (as if you casted the ray from outside)
  1 => hit normal is the real face normal (only for mesh object, otherwise face has no effect)
The ray has X-Ray capability if xray parameter is 1, otherwise the first object hit (other than self object) stops the ray.
The prop and xray parameters interact as follow:
    prop off, xray off: return closest hit or no hit if there is no object on the full extend of the ray.
    prop off, xray on : idem.
    prop on,  xray off: return closest hit if it matches prop, no hit otherwise.
    prop on,  xray on : return closest hit matching prop or no hit if there is no object matching prop on the full extend of the ray.
if poly is 0 or omitted, returns a 3-tuple with object reference, hit point and hit normal or (None,None,None) if no hit.
if poly is 1, returns a 4-tuple with in addition a KX_PolyProxy as 4th element.

The KX_PolyProxy object holds information on the polygon hit by the ray: the index of the vertex forming the poylgon, material, etc.

Attributes (read-only):
 matname: The name of polygon material, empty if no material.
 material: The material of the polygon
 texture: The texture name of the polygon.
 matid: The material index of the polygon, use this to retrieve vertex proxy from mesh proxy
 v1: vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
 v2: vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
 v3: vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
 v4: vertex index of the fourth vertex of the polygon, 0 if polygon has only 3 vertex
     use this to retrieve vertex proxy from mesh proxy
 visible: visible state of the polygon: 1=visible, 0=invisible
 collide: collide state of the polygon: 1=receives collision, 0=collision free.
Methods:
 getMaterialName(): Returns the polygon material name with MA prefix
 getMaterial(): Returns the polygon material
 getTextureName(): Returns the polygon texture name
 getMaterialIndex(): Returns the material bucket index of the polygon. 
 getNumVertex(): Returns the number of vertex of the polygon.
 isVisible(): Returns whether the polygon is visible or not
 isCollider(): Returns whether the polygon is receives collision or not
 getVertexIndex(vertex): Returns the mesh vertex index of a polygon vertex
 getMesh(): Returns a mesh proxy

New methods of KX_MeshProxy have been implemented to retrieve KX_PolyProxy objects:
 getNumPolygons(): Returns the number of polygon in the mesh.
 getPolygon(index): Gets the specified polygon from the mesh.

More details in PyDoc.
2008-08-27 19:34:19 +00:00
Benoit Bolsee
f6bdba8351 Bullet patch: option to return true face normal, complete triangle information and broad phase filter. This patch is needed to support enhanced ray cast function in the BGE. I have proposed it to the Bullet forum for inclusion in the next Bullet version. 2008-08-27 19:16:21 +00:00
Joshua Leung
c6acbc3047 == Grease Pencil - Conversions + Bugfixes ==
* New stuff: Grease Pencil strokes on the active layer can now be converted to 3d curves (geometry). More work is still needed to make the result look be more optimal (i.e. extruded curve)

* Bugfix: Spacing between collapsed layers is more compact now
2008-08-27 13:02:44 +00:00
Campbell Barton
6cccdf0cb2 BGE bugfix, ipo actuator's foce option didnt check that the object was dynamic. 2008-08-27 06:02:10 +00:00
Campbell Barton
d566765635 get/set Angular velocity for KX_GameObjects python api and for the AddObject actuator.
Needed so objects created in an explosion could start spinning without having motion actuators and collision sensors on each item.
2008-08-27 03:34:53 +00:00
Campbell Barton
6778c8dc29 BGE: allow sound actuators to be converted even when they have invalid samples
without this, an incorrect sound path could cause scripts to to fail, making some functionality not work at all.

This also fixes a problem where samples would be loaded multiple times.
2008-08-27 01:03:55 +00:00