Commit Graph

12266 Commits

Author SHA1 Message Date
Campbell Barton
77484d28d5 joystick update
* use SDL events to trigger the sensor, trigger was being forced every tick. removed workaround for this problem.
* added "All Events" option, similar to all keys in the keyboard sensor.
  This means every event from the joystick will trigger the sensor, however only events from the selected type (axis/button/hat) is used to set the positive state of the sensor.
* Added python function sens_joy.GetButtonValues(), returns a list of pressed button indicies.
* Removed pressed/released option for joystick buttons, it was the same as the invert option.
2008-10-07 05:09:24 +00:00
Ian Thompson
8d73ea72a7 Comments for text editor functions. More to come tomorrow. 2008-10-06 22:08:14 +00:00
Martin Poirier
160609bce8 Grease Pencil Bugfix
When converting to armature, don't flag the first bone of each stroke as connected.
2008-10-06 21:41:20 +00:00
Joseph Eagar
16f199bda3 one-liner fix for id property duplication bug 2008-10-06 10:24:32 +00:00
Campbell Barton
ba720030be * dont change handle types when adjusting the radius or tilt of a curve handel.
* dont take the handles into account for the manipulator center when they are not drawn.
2008-10-06 09:17:49 +00:00
Joshua Leung
bd81616ac6 Bugfix:
Grease Pencil sketches in OGL-render should only show up if they were enabled for the original 3d-view.
2008-10-06 08:29:15 +00:00
Campbell Barton
c9634ce5b4 fix for [#17560] Error in BPY_run_python_script
any path starting with a '.' on win32 would be replaced with C:\ (or the default root)
this was added rev 6568 so the file selector would replace "." with C:\. should be moved to fileselector but for now compare with "." rather then checking the first char.

header_view3d.c - prop edit and render were aligning in curve edit mode.
2008-10-06 08:02:35 +00:00
Campbell Barton
6c2738ef48 fix for own bugs in curves.
- the number of segments was always 1 too many on cyclic curves.
- [#17739] - normals were not being calculated when rendering curves.

Replaced macro DL_SURFINDEX with a function. it that assumes variable names and could break from the loop that called it.
2008-10-06 06:10:14 +00:00
Campbell Barton
002725d72a use uint8_t and uint32_t rather then Uint8 and Uint32, (mingw didnt know about Uint's) 2008-10-06 01:59:11 +00:00
Peter Schlaile
34399546b7 == FFMPEG ==
Added optional OGG / theora / vorbis support.
(OGG-format encoding is currently disabled, since the bundled ffmpeg version
is broken here)

Fixed a bug with PTS-encoding, to make theora work.

You have to explicitly enable it and currently only scons is supported.

Otherwise: enjoy! :)
2008-10-05 17:31:33 +00:00
Ken Hughes
e99ff615d7 Python API
----------
Change documentation for Object.getSize(), Object.getEuler(), Object.getLocation() to clear up confusion about 'localspace' parameter.
2008-10-05 14:31:40 +00:00
Joshua Leung
333b7c3668 * Grease Pencil - changed defaulted for sensitivity userprefs. Will overwrite old settings too (to keep users less confused about this).
* Removed some unneeded funcs (compiler warnings)
2008-10-05 12:06:55 +00:00
Ton Roosendaal
86560d6b3f Bugfix #8908
Using shapekeys, you get corruptions in other shapes when you undo into
a previous editmode session. The "key index" values become invalid.
Now, if you have shape keys, entering editmode will clear the previously 
stored undos.
2008-10-05 12:02:36 +00:00
Joshua Leung
5c74db4e4e Grease Pencil:
* Separated duplicate methods out into several functions

* Added copy/paste for gp-frames in Action Editor. Only strokes that are appropriate for the spacetype that the destination layer belongs to will be added to avoid wasted memory usage. Otherwise, was impossible to move sketches between views/layers (which was intended for PyAPI access that didn't get done).

Note: there will currently still be an extra gp-frame created, even if the current no strokes got pasted. There's commented out code which would delete it, but somehow that causes errors, so better to be safe for now.
2008-10-05 11:49:09 +00:00
Joshua Leung
af7033bae4 Bugfix:
Reordering Grease-Pencil frames in the Action Editor after transforms was not working at all. Seems I forgot to fix this part after changing what the 'Grease Pencil' editing mode in Action Editor showed.
2008-10-05 10:48:07 +00:00
Janne Karhu
1695b07bac Fix for [#17758] Particle Caching Problem
-A line initializing particles from pre-cache days was still in place causing the wrong behavior.
2008-10-05 09:44:46 +00:00
Ton Roosendaal
c1223f2459 Bugfix #17750
Wrap text and moving cursor with a selection still crashed.
Thanks Zanqdo! :)

(Also cleaned code layout to use same convention as it was)
2008-10-05 09:27:14 +00:00
Brecht Van Lommel
2ad7aa100d Fix for bug #17762: id property double type did not get copied correct. 2008-10-05 01:15:58 +00:00
Brecht Van Lommel
6800c5725f Fix for bug #17761: small GLSL update tweak, switching ray and
buffer shadow didn't update the viewport correct.
2008-10-05 00:21:43 +00:00
Brecht Van Lommel
1e0f02c2ef Fix for bug #17684: GLSL bug with shadows and material nodes,
missed unbinding a texture giving extremely slow frontbuffer
drawing.
2008-10-04 22:21:46 +00:00
Brecht Van Lommel
639a4ff436 Fix for part of bug #17759: point cache clearing did too much, also
clearing other physics systems on the same object.
2008-10-04 21:26:48 +00:00
Ian Thompson
04226f6f3f Bugfix for [#17748] "Copy and paste under window since rev 16769"
Now actually copies to the clipboard on copy/cut when editing UI fields.
2008-10-04 21:04:16 +00:00
Brecht Van Lommel
7d77b58900 Fix wrong result for GLSL material node with only diffuse output
and shadeless material.
2008-10-04 20:22:43 +00:00
Brecht Van Lommel
7fae6345ab Fix for bug #17752: the particle modifier convert button didn't
do anything for dupli objects and groups, which could already
be converted with ctrl+shift+A, but convert can do it as well.
2008-10-04 19:58:08 +00:00
Brecht Van Lommel
32d7a06131 Bugfix: modified game material settings in blender didn't get
taken into account when loading a new .blend.
2008-10-04 17:04:23 +00:00
Brecht Van Lommel
d7589d8bc8 Game player: preserve material, debug settings, between .blend files. 2008-10-04 16:42:36 +00:00
Ton Roosendaal
a7a4c4113e Bugfix #17753
Fix for rev 16702 commit to better support per-vertex radius in curves.
It caused the directional lines for 3d curves to not draw correct.
2008-10-04 15:02:40 +00:00
Ton Roosendaal
324e1d57ac Bugfix #17750
Texteditor misses NULL checks in 'wrap text' code, moving cursur while
text is selected.
2008-10-04 13:42:45 +00:00
Ton Roosendaal
f8d7da21b1 Bugfix #17746
Curve deform did not work yet on Text and Curve objects, this because it
was not providing the entire array of vertices, for a proper detection of
min/max bounds of the full input.
2008-10-04 12:31:54 +00:00
Ton Roosendaal
046810929e Bugfix #17720
Retopo crashed on undo-redo, caused by bad copying of data for undo stack.
I solved crash or corruptions, but it still is pretty weak code here.
2008-10-04 11:04:09 +00:00
Benoit Bolsee
5298e26b76 More cosmetic changes to the bullet buttons: move most common soft body buttons to main panel, only leave advanced settings in advanced panel. Reduce size of advance panel. 2008-10-03 21:50:42 +00:00
Benoit Bolsee
f80d6efb3b BGE patch: some cosmetic change in the bullet buttons:
- Bring Actor button back in main panel: makes the users
  life easier to identify which object is visible to 
  near and radar sensors.
- Give more space to the Advanced Settings panel.
- Display radius control button even for static objects
  if sphere bound shape is selected. Same for displaying
  the radius in the 3D view.
2008-10-03 20:17:05 +00:00
Brecht Van Lommel
5574655dad Fix for part of bug #17464, though not the original issue yet. A GLSL
shadow drawing fix also affected 3d view opengl render, hiding armatures,
now there's separate flags for it.
2008-10-03 19:34:49 +00:00
Brecht Van Lommel
128ee40d60 Small fix for (harmless) use of uninitialized memory. 2008-10-03 19:30:45 +00:00
Daniel Genrich
59dbf08253 Bugfix for fluidsim UI inconsistencies, please check your settings in old files 2008-10-03 13:02:34 +00:00
Joshua Leung
87b4037733 More Grease Pencil touchups:
* Eraser size is now UserPref. This way it is more easily tweaked than using layer stroke-thickness squared, but it is less accessible.
 
* Restored stroke 'smoothing' (post-conversion) option as UserPref option. Off by default.

* Fixed bug with convert tools. Was adding an extra datablock everytime, that wasn't being used (and was subsequently dicarded).

* Moved pressure vars from paint-loop to temp-struct (during painting). Also, moved the macro which tests for converting straight lines.
2008-10-03 11:56:11 +00:00
Campbell Barton
df00a4b878 interpreted request from Carsten - make message sensor work.
object message actuators needed the prefix OB when sending a message to a specific object.--This line, and those below, will be ignored--

M    source/gameengine/Converter/KX_ConvertActuators.cpp
M    source/blender/blenkernel/BKE_blender.h
M    source/blender/src/buttons_logic.c
M    source/blender/blenloader/intern/readfile.c
2008-10-03 09:51:43 +00:00
Joshua Leung
ae63fcc905 Grease Pencil bugfix:
Disabled fancy 'dot' drawing for Image Editor. This is still just a quick-fix (like for fancy strokes), and it would be nice to get the scaling right someday.
2008-10-03 09:40:48 +00:00
Campbell Barton
a618708f48 Blender works with python 2.6, our own import functions that replace pythons internal function needed updating for an extra in argument in 2.6.
if importing is not working blender should not crash (was crashing on exit)
2008-10-03 06:27:41 +00:00
Campbell Barton
365282e5c8 error with GameLogic.globalDict loading. It would replace the dictionary rather then updating it.
This meant the BGE would load in an old dictonary replacing the loaded dict, loosing settings.

was also missing a decref for marshal data
2008-10-03 04:41:02 +00:00
Joshua Leung
5f7bd14073 Added back a few lines that were accidentally chopped out when fixing pad0 view feature. This means that the grid is drawn correctly (i.e. not shown) when the view is rotated using the numpad up/down/left/right keys. 2008-10-03 03:29:34 +00:00
Brecht Van Lommel
1ce81854f7 Fix for bug #17722: sun light in the texture viewmode was broken. 2008-10-02 23:04:28 +00:00
Brecht Van Lommel
60e32f69b9 Fix for bug #17735: vertex color render layer got invalid value
when switching to weight paint mode.
2008-10-02 22:55:25 +00:00
Martin Poirier
06c43148a1 transform snap bugfix: correctly ignore hidden elements when snapping to edit mode mesh 2008-10-02 17:20:58 +00:00
Campbell Barton
0fcd017031 missing ; in last commit
radius was not being calculated on curves that had a bevel object
2008-10-02 17:11:49 +00:00
Campbell Barton
1b3e2d7c02 blender would crash if the "sys" module didnt import, now just give a warning and continue. 2008-10-02 16:59:08 +00:00
Ton Roosendaal
575b4743ed Bugfix #17723
Clipboard copy/paste error, missing NULL check caused crashes.
2008-10-02 12:29:45 +00:00
Joshua Leung
f66ae0daca Keyframe Checking (i.e. does given frame have a keyframe) is now implemented in the keyframing api.
Replaced the method used in to check if there's a keyframe on the current frame, when drawing the active object name / frame number info with this new code. 
- It should in theory be faster than the previous code, as it doesn't have to build an entire list everytime of all keyframes, and also uses more efficient search method.
- Added some settings to control what sources of animation data are used (per 3d-view). Can be found in the View Properties panel.

This should be stable... release builders should ignore this commit for now (to avoid having differences between release candidates).
2008-10-02 08:39:30 +00:00
Campbell Barton
3659b390bf only paint onto selected faces when painting mask is enabled. (request from Carsten) 2008-10-02 01:12:37 +00:00
Campbell Barton
3ec4f674d0 Python 2.4 should build with the game engine now, no thanks to python for switching from char to const char 2008-10-02 00:22:28 +00:00
Benoit Bolsee
c2b8702a83 BGE patch: add frameProp to Ipo actuator (Carsten's request). 2008-10-01 21:17:00 +00:00
Benoit Bolsee
8550c2b594 BGE patch: new force field constraint actuator
A new type of constraint actuator is available: Force field.
It provides a very similar service to the Fh material feature
but with some specificities:
- It is defined at the object level: each object can have 
  different settings and you don't need to use material.
- It can be applied in all 6 directions and not just -Z.
- It can be enabled/disabled easily (it's an actuator).
- You can have multiple force fields active at the same time
  on the same object in different direction (think of a 
  space ship in a tunnel with a repulsive force field
  on each wall).
- You can have a different damping for the rotation.

Besides that it provides the same dynamic behavior and the 
parameters are self explanatory.
It works by adapting the linear and angular velocity: the
dynamic is independent of the mass. It is compatible with
all other motion actuators.

Note: linear and anysotropic friction is not yet implemented,
the only friction will come from the object damping parameters. 
Support for friction will be added in a future revision.
2008-10-01 19:16:13 +00:00
Joshua Leung
0caa92a49c General tidying of Grease Pencil code... 2008-10-01 08:23:08 +00:00
Benoit Bolsee
949b6ca80f BGE bug #17688 fixed: Near Sensor Reset not working (for Gamekit)
Implementation of the PHY_IPhysicsController::SetMargin(),
GetMargin(), SetRadius() and GetRadius() for Bullet and Sumo
to allow resetting the Near sensor radius. For bullet use 
the new setUnscaledRadius() function to change sphere radius.

In pPreparation of a Fh constraint actuator:
- Add KX_IPhysicsController::GetRadius()
- Fix implementation of KX_BulletPhysicsController::GetVelocity()
  (velocity at a point in geometric coordinate)
- Don't try to set velocity on static object (Bullet will assert)
- Add KX_GameObject::GetVelocity() for C access to local velocity
2008-10-01 07:55:02 +00:00
Erwin Coumans
aa5c4f8801 + hook up a few more parameters, that can be useful for Bullet soft bodies
+ work-in-progress to hook up cluster constraints (they are better than node/vertex pinning, because they maintain a proper world coordinate system)
2008-10-01 06:36:17 +00:00
Joshua Leung
e427b82962 Bugfix #17721: Action Strips added from scripts don't work properly unless at least one strip has already been added by hand.
Synced the behaviour of the PyAPI when adding strips with the behaviour of UI.
2008-10-01 00:14:28 +00:00
Joshua Leung
c3602099c8 Bugfix #17717: IPOs / Sequencer / Markers: deleting an IPO delete also selected markers
Final attempt at solving this problem. This time I've decided to separate the 'delete markers' from the 'delete keys' hotkeys, as it proved to be too problematic for users. 

The new hotkey for deleting markers is "Shift-XKEY". (or Shift-Delkey) 
P.S. I know that 'Shift' is usually used for 'add' operations, but this will have to do for now...

----

Also, rearranged button order in Timeline header a bit to group keyframing buttons together more.
2008-10-01 00:02:06 +00:00
Erwin Coumans
808d6197cf add support for Bullet soft body constraints against a Bullet rigid body, as well as 'fixing' it. Just use the existing rigid body joint to use it. For now, it searches the closest node/vertex to the pivot. So you can use multiple constraints/joint to attach a cloth, soft body etc. 2008-09-30 23:34:25 +00:00
Brecht Van Lommel
66d51d461e Fix for bug #17691: edgesplit was crashing on windows on large meshes
due to stack overflow.
2008-09-30 17:06:41 +00:00
Joshua Leung
da62240ab2 Keyframing:
- More cleanups, to move the return of success from insertkey to take into account results of 'only needed' keying option
- Added a 'better' test for size of area than the previous one (for use with the keyframing buttons in the TimeLine)
- Moved the checks for Action/IPO editors to commonkey_context_get() so that the keyframing buttons in TimeLine could also consider using these editor's keyframing methods too
2008-09-30 12:30:56 +00:00
Joshua Leung
0f5dc86049 A few cleanups in keyframing.c
- Added missing update calls for buttons window keyframing. This should get rid of all those sporadic update problems (using a different keyingset would result in no curve being added)
2008-09-30 12:03:31 +00:00
Joshua Leung
80a4bbf473 Bugfix:
Keyframing from Buttons Window was broken for Materials/Lamps/Worlds due to a mixup regarding the correct adrcodes for texture-slots.
2008-09-30 11:52:59 +00:00
Joshua Leung
1eb06b9370 Action Editor:
* Grease Pencil Mode - now includes the area-ID into the name string. While the numbers currently don't mean much (though they do make it easier to distinguish between views to more than before), they could become handy if/when PyAPI access to Grease Pencil data comes into handy

* Copy + Paste bugfixes
- When there was a collapsed group, it was impossible to get the keyframes in the keyframe summary to be copied too. This fix shouldn't cause any problems with other things...
- Feature to allow pasting to any channel without doing name matching was not working
2008-09-30 10:54:12 +00:00
Brecht Van Lommel
361ff9e525 Fix for bug #13624: knife cut with vertex snapping was broken. 2008-09-30 07:01:37 +00:00
Brecht Van Lommel
8c4744c4d6 Fix for bug #17302: subsurf + particle size vertex groups did not
work correct, also refactored some code here to make it more clear.
2008-09-30 06:12:47 +00:00
Campbell Barton
13c8e189f6 WITH_ELBEEM diabled wasnt working with cmake 2008-09-30 05:05:50 +00:00
Campbell Barton
5871b289cc modify BLI_convertstringcode so windows paths are converted from C:\foo.jpg to /c/foo.jpg
since there is C:\ prefix cant exist on a unix system this wont break any files.
2008-09-30 04:08:00 +00:00
Campbell Barton
16b425b9c0 * free bullet-softbody was using free softbody function.
* mistake from own changes to curves, new curves were being added with too low resolution.
* removed warnings I added recently
2008-09-29 23:46:01 +00:00
Brecht Van Lommel
a32d4280c9 Fix for part of bug #17521: incorrect uv coordinates for particle
density controlled by a texture.
2008-09-29 23:33:27 +00:00
Brecht Van Lommel
31acc8ba9c Fix for bug #17713: touch/no override for rendering was broken. 2008-09-29 22:31:47 +00:00
Brecht Van Lommel
fed535f1fb Fix for bug #17712: fluid button activation crash. 2008-09-29 22:07:13 +00:00
Benoit Bolsee
4aff02006b Add 2 items to CTL-A menu: Scale to ObData and Rotation to ObData. These options allows to apply separately the scale and the rotation to the object data. Usefull to physics compound objects that do not support scaling. 2008-09-29 20:13:40 +00:00
Ton Roosendaal
6deea1a5d7 Bugfix #17711
SunSky didn't include skycolor in raytrace.
Note: there seems to be  an error in sunsky when looking straight down, 
so this option requires raytracing stuff not in outer space. :)
2008-09-29 17:55:11 +00:00
Benoit Bolsee
a1513a8c0f BGE patch: fix force application on soft body. Force is applied on each node, it must be reduced by the same extend. 2008-09-29 17:46:25 +00:00
Campbell Barton
2a331067cc resolve some compiler warnings with intel c/c++ compiler
* subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later.
* some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion.
* removed unused vars
* obscure python memory leak with colorband.
* make_sample_tables had a loop running wasnt used.
* if 0'd functions in arithb.c that are not used yet.
* made many functions static
2008-09-29 17:08:11 +00:00
Ton Roosendaal
7ebeceb399 Updated color calculus for sunsky
- removed ugly clamping function (it was dividing XYZ based on max of
  one of the values)
- added option to use Exposure, this only works for brightness (Y).
  results look very pleasant, foggy and hazy results are possible.
  with exposre==0, no exposure happens for HDR extreme range skies,
  this is how yafray rendered it.
- added menu for choosing color spaces (CIE = modern lcds)

Please review! (and yes i know it's still not in World :)
2008-09-29 17:03:24 +00:00
Daniel Genrich
3996b82b50 [#17707] Slow Cloth Baking 2008-09-29 14:20:27 +00:00
Joshua Leung
a8e97fe1ed Bugfix #17708: layer IPOs doesn't return the correct layer anymore
When doing IPO-cleanup, added two break statements to hopefully optimise the evaluation process a teeny-weeny bit. However, that caused more problems than it was worth!
2008-09-29 11:39:58 +00:00
Ton Roosendaal
2bee679a2d Bugfix #17696
- Area lamp with 1 sample still used an offset for the first sample
- Sample buttons were not visible for area without shadow.
2008-09-29 10:26:20 +00:00
Joilnen Leite
404dad0e7f rewiten a if statment 2008-09-29 09:54:26 +00:00
Ton Roosendaal
445b83e3ce Bugfix #17687
Scaled cameras get orthogonalized on render, and did not get a signal
to refresh the matrix, resulting in wrong display of camera in 3d win.
2008-09-29 09:50:16 +00:00
Joshua Leung
e17c2c51bf Bugfix:
Recoded pidhash's recent Pad0 (Lastview) commits (r.16802 and r.16810). It was causing major issues with Ortho perspective + rotating the view with the MMB. Setting G.vd->view to -1 was not such a valid way to do so (and also, this didn't play nicely with smoothview).

This feature should now work correctly, though there are still one or two places where it doesn't always seem totally correct yet. 
The basic idea of this feature, is that after going into camera mode (Pad0), pressing Pad0 again lets you go back to the view as you had it before entering camera mode.
2008-09-29 08:11:26 +00:00
Erwin Coumans
638c51ba7d don't crash when trying to make a soft body 'fh' object 2008-09-29 08:00:38 +00:00
Erwin Coumans
2c289a02b6 Clarify that in Bullet, the 'radius' is used for both sphere bounds, but also for Fh/Rot Fh.
So even if other bound types are used (such as box etc), the radius will be used for Fh/Rot Fh.
2008-09-29 07:17:12 +00:00
Erwin Coumans
cef5c4b765 Add Fh/Rot Fh to Bullet. 2008-09-29 06:58:49 +00:00
Joilnen Leite
cddd38f539 fixing a little problem with grid after last view commit 2008-09-29 04:36:18 +00:00
Erwin Coumans
425264d7cc Update the Bullet/game buttons_bullet, to better reflect usage.
1) Anisotropic friction works for static and dynamic objects
2) For soft bodies, assume triangle mesh if no bounds a chosen
3) Form factor == inertia scaling factor, it was actually hooked up in Bullet
4) Only show 'radius' if sphere is chosen, or no bounds+dynamics (== sphere bounds)
2008-09-29 04:14:47 +00:00
Joshua Leung
32b733dafb Patch #17500: fixes: multiple IK's on bone + targetless IK
Submitted by: Teppo Kansala (teppoka)

See patch report for details of fixes.
https://projects.blender.org/tracker/index.php?func=detail&aid=17500&group_id=9&atid=127

Note: the patch submitter's test files were quite nice, and would be good to have in our regression suite.
2008-09-29 04:00:42 +00:00
Erwin Coumans
0b622fc07f added anisotropic friction support for Bullet. Both for static and dynamic objects 2008-09-29 03:09:03 +00:00
Campbell Barton
25fc47aaf2 tests for 2d triangle and quad intersection would only work if the points were ordered clockwise.
now return 1 for clockwise, -1 for counter-clockwise and 0 for no intersection.
2008-09-29 02:16:18 +00:00
Joilnen Leite
12c688fd7e Adding last view feature for PAD0 2008-09-29 00:44:33 +00:00
Joshua Leung
cf683729f6 Second try at committing IPO code cleanups... 2008-09-28 23:17:44 +00:00
Janne Karhu
d1ce4fbaff A previous commit by me (16701) broke keyed- and none-physics particles or at least made them do funny things. 2008-09-28 19:53:37 +00:00
Ton Roosendaal
c3794cb983 Bugfix, irc report from slw_sl:
Instert "avail" on object without ipo crashed. Null check missing.
2008-09-28 17:05:58 +00:00
Martin Poirier
1e62b58bcc reverting revision 16784 that broke compilation. Aligorith, please fix and recommit 2008-09-28 15:37:37 +00:00
Joshua Leung
21640badf7 IPO System - Code Cleanup and Commenting:
Went through and commented all the code in ipo.c, tidying up formating and coding style in places, and also rearranging to have a more logical order in some places. There shouldn't be any major issues arising from this commit.
2008-09-28 12:01:41 +00:00
Erwin Coumans
28684b1c09 make gui backwards compatible with this weeks softbody blend files 2008-09-28 03:17:45 +00:00
Erwin Coumans
f8fb61f9fa enable -noaudio option, so it actually works (and doesn't get overwritten by a game flag). audio initialization delays startup of game engine 2 seconds
add -nojoystick commandline option: it takes 5 seconds everytime to start the game engine, while there IS no joystick.

In other words: blender -noaudio -nojoystick improves workflow turnaround times for P - ESC from 7 seconds to 1 second!

Improved Bullet soft body advanced options, still work-in-progress. Make sure to create game Bullet soft bodies from scratch, it is not compatible with last weeks builds.
2008-09-28 03:07:13 +00:00
Benoit Bolsee
c723b91446 BGE patch: create new BulletSoftBody data block to store bullet soft body specific parameters.
Previously we tried to share the parameters with the
blender render soft body but there were too many differences.

MSVC project files updated.
2008-09-27 21:52:20 +00:00
Ian Thompson
5f7359a4ad Cleaned up unused variables and functions. 2008-09-27 19:57:32 +00:00
Ian Thompson
d988ff33db Global Clipboard Patch (17370)
Text, ID names and RGB colours in the interface are now copied to and pasted from the system clipboard allowing them to be copied from and pasted into the text editor. Colours are encoded as floats in the form [r.rrrrrr, g.gggggg, b.bbbbbb] making them easy to use in Python scripts.
2008-09-27 19:47:38 +00:00
Ian Thompson
d7d15c2c66 Fixed recent changes to text editor which broke building with MSVC and also cleaned up some compiler warnings. (Actually, Benoit seems to have beaten me to it, but I found moving the #includes worked without undefining INT)
The header button is great but it didn't function for 2 seconds between clicks due to the old code waiting between modification checks. Fixed that now too :)
2008-09-27 19:20:32 +00:00
Benoit Bolsee
8253b3e2e6 Fix compilation problem in Windows and update MSVC project files 2008-09-27 19:05:00 +00:00
Campbell Barton
ff6d4e84cb text editor changes
* out of sync text dosnt automatically popup a menu anymore since it was too easy to click on it without intending to, moved this to an alert button on the header.
* "_" character was acting as a delimiter, but in python its not.
* renamed "File" to "Text" (so as not to confuse with blenders file menu)
* added redraw_alltext function to remove many duplicate loops where every text display is redrawn.
2008-09-27 15:32:28 +00:00
Campbell Barton
fe5dd01595 linear ipo curves were still using their handles to calculate an extrapolated value.
It would only work when the bezier point had its handles set to auto before changing to a linear IpoCurve since the handles were being recalculated during transform.
2008-09-27 10:08:19 +00:00
Joshua Leung
061c5c7633 Bugfix #17693: Visual Rot Keying Broken
The problem was due to a wrong number of IPO-channels getting keyed for the quaternion channels (3 instead of 4). Was a simple copy+paste error.

Also added in check for using "Limit Distance" constraint when using VisualKeying.
2008-09-27 09:11:44 +00:00
Campbell Barton
99d56a7764 [#17692] Text Editor Line Number Background theme option
from Dalai Felinto (dfelinto)
2008-09-27 08:15:10 +00:00
Joshua Leung
98b2c0626a Lots of mingw/gcc compiler warning fixes 2008-09-27 06:49:10 +00:00
Joshua Leung
50faaccf2e Auto-Keyframing (per scene):
Now auto-keyframing can be enabled/disabled per scene (with the insertion mode also stored per scene). The flags used when insertng keyframes are still stored in the user-prefs. 

New scenes have their auto-keyframing settings initialised from the user-preferences.
2008-09-27 06:29:52 +00:00
Joshua Leung
049b88f0d2 Keyframing:
* Tidied up code a bit to remove an extra var declaration that may have been causing problems with Visual Keying

* Added buttons to Insert/Delete keyframes from current frame into Timeline header. Note that it preferentially works will insert keyframes for a 3d-view (if it exists), otherwise it "should" take the largest area available.
2008-09-27 04:51:42 +00:00
Erwin Coumans
b6405b970c force collision bound type to be convex hull or concave triangle mesh for soft bodies
set collision margin between soft and mesh back to .3, smaller is not useable (yet)
2008-09-27 00:36:18 +00:00
Andre Susano Pinto
6cc87a1047 Merge of SimpleDeform modifier from soc-2008-jaguarandi branch
http://wiki.blender.org/index.php/User:Jaguarandi/SummerOfCode2008/SimpleDeform
2008-09-26 21:21:20 +00:00
Campbell Barton
3ad55e1541 nurbs surface resolution is now per segment rather then being distributed over the whole surface.
This is what 2D do alredy and makes resolution settings more like subsurf level.

- This makes it impossible to have a lower resolution output then the nurbs cage, however this dosnt seem a very useful feature.
- Using the do-versions from recent curve interpolation fix.

Tested with these files.

http://digilander.libero.it/pafurijaz/Files/Blender/Libellula.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Martello.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Punta.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Phones.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Tubo.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Pipe.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Tire.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Cotton.zip
2008-09-26 19:00:49 +00:00
Benoit Bolsee
8e1cf42dbd BGE patch: local/global flag to distance contraint actuator.
Previously the distance constraint actuator was always working
in local axis. The local flag allows to cast the ray along a
world axis (when the flag is not selected). 
The N flag works differently in this case: only the object 
orientation is changed to be parallel to the normal at the hit
point. 

The linear velocity is now changed so that the speed along the 
ray axis is null. This eliminates the need to compensate the 
gravity when casting along the Z axis.
2008-09-26 18:03:14 +00:00
Andre Susano Pinto
b542721f32 Made simple deform limits be relative to BV of object 2008-09-26 16:14:35 +00:00
Brecht Van Lommel
f13bd6ef3c Bugfix: the game player did not initialize tiff and quicktime, so loading
those file formats did not work. Also made sure G.order is initialized as
otherwise some reading tiff goes wrong.
2008-09-26 14:54:21 +00:00
Andre Susano Pinto
03f26fa6e4 Fixed a UI bug on shrinkwrap constraint
Fixed vertexs weights on simpledeform modifier (they weren't working if the modifier was the first on stack, since it wasnt receiving a DerivedMesh with vertex weights)
2008-09-26 13:47:41 +00:00
Joshua Leung
1206061ed4 Patch #17346: Align bones in edit mode
Submitted by: Lorenzo Pierfederici (lento) 

This patch adds the CTRL-ALT-A hotkey to align bones in armature edit mode.

It works the same way as parenting: selected bones will be aligned with active bone, if only one bone is selected it
will be aligned with its parent (if any)

Thanks!
2008-09-26 08:51:05 +00:00
Erwin Coumans
9d3c77ec62 support concave soft bodies, preliminary. could be used for cloth too. need vertex pinning/constraint attach to other objects. 2008-09-26 06:25:35 +00:00
Erwin Coumans
a1bef84ea8 Allow Bullet soft bodies to be created using a AddObject actuator. Added a fake world coordinate system to game soft bodies, although the vertices are already in world space.
Added Bullet/Gimpact concave collision detection to Blender. If your build system isn't updated yet, please add extern/bullet2/src/BulletCollision/Gimpact/*
This allows moving/dynamic concave triangle meshes (decomposing meshes into compound convex shapes, and using 'compound' shapes is still preferred)
2008-09-26 02:27:59 +00:00
Andre Susano Pinto
09e17ac876 SimpleDeform now initializes limit values to the BB when its added to an object 2008-09-26 02:02:02 +00:00
Erwin Coumans
6732718ef1 don't apply vertex transformation for deformable game soft bodies.
set a fake world transform for game soft bodies, based on center of the AABB, so visiblity and some game logic works. note: this world transform is not smooth.
2008-09-25 21:04:41 +00:00
Janne Karhu
9a7c53782b Fix for [#17677] Blender Crash when Baking Boids
- A check for getting the "better" dm was missing from the boids code. I plan on converting the boids code into using the collision modifier one of these days but hopefully this quick fix will do for now.
2008-09-25 18:31:01 +00:00
Erwin Coumans
9c08e86b06 avoid crash and apply force for soft bodies.
copy normals for soft body vertices, to get proper lighting
2008-09-25 17:53:15 +00:00
Campbell Barton
27098d3aa0 [#17679] BGE print statement when start and when finish
from Dalai Felinto (dfelinto) 

would useually not encourage prints in these cases, except its often useful to know if an error happened since you last pressed Pkey and without this you end up needing to manually clear the terminal.
2008-09-25 17:43:06 +00:00
Erwin Coumans
bc28feb997 re-use some Blender soft body settings for Bullet game soft bodies 2008-09-25 16:48:25 +00:00
Benoit Bolsee
c9c9b2e833 BGE patch: add Debug button next to object state. The object state mask will be printed at runtime with the debug info as a comma separated list of state numbers (1..30) for each active state bit. The reserved property name __state__ is used for that purpose (users should not create a property with that name). 2008-09-25 16:19:07 +00:00
Kent Mein
1722aeb6ea This is part of the cleanup Campbell wanted :)
Just getting rid of license_key stuff.

The project files still need to be updated:
projectfiles_vc7/blender/src/BL_src_cre.vcproj
projectfiles_vc7/blender/blendercompactNG.vcproj

Just search for these files in them.
	
Kent
2008-09-25 15:39:46 +00:00
Campbell Barton
6d7fe87767 binreloc include was wrong for make, removed last YESIAMSTUPID 2008-09-25 08:41:11 +00:00
Erwin Coumans
718e2bf74f improved game soft bodies, works for objects that are using 'set smooth'
use shape matching by default for game soft bodies
store soft body index for game vertices
2008-09-25 03:02:30 +00:00
Benoit Bolsee
38a80ff9a5 BGE patch: add advanced parameters for SoftBody. Add Rasterizer.drawLine() Python function. 2008-09-24 22:58:49 +00:00
Joshua Leung
48bc5b2ac6 Made Object-level copy constraints work the same as for bones now too 2008-09-24 11:52:31 +00:00
Erwin Coumans
3b09c0b0d5 Created a KX_SoftBodyDeformer for real-time soft bodies.
Added SetDeformer/GetDeformer() to KX_GameObject.
Store mapping between graphics/soft body vertices (work-in-progress)
Real-time soft body integration is still very premature, but
for a quick preview, see this testfile:
http://bulletphysics.com/ftp/pub/test/index.php?dir=blender/&file=soft_test.blend
2008-09-24 03:12:10 +00:00
Daniel Genrich
7eae8d0c7b Patch #17675: Tooltips for fluid control panel - provided by Kai Kostack 2008-09-24 01:39:55 +00:00
Benoit Bolsee
005c5e6371 BGE bug #17657 fixed: dRotY doesn't work properly after 90 degrees rotation.
This problem is caused by discontinuities in the conversion
orientation matrix -> euler angles: the angle sign can
switch and thus the direction of the rotation produced
by the dRot Ipo.

To avoid this bug, the matrix->euler conversion must be 
avoided during the game. I took the following approach that 
is compatible with Blender (identical effect in the game and
in the 3D view):

- no change in Add mode: Rot and dRot are treated as additional
rotation to the orientation at the start of the Ipo. There is 
no matrix->euler conversion and thus no discontinuities. 

- Rot Ipo are treated as absolute rotation. All 3 axis should
be specified but if they are not, the startup object orientation
will be used to set the unspecified axis. By doing a matrix->
euler conversion once at the start, the discontinuities are
avoided. If there are also dRot curves, they are treated as
delta of the corresponding Rot curve or startup angle.

- dRot Ipo are treated as Add mode in Local axis.

Note about Add mode: Rot and dRot curves are treated identically
during the game. However, only dRot curves make sense because
they don't interfere with the object orientation in the 3D view.
2008-09-23 20:07:15 +00:00
Campbell Barton
3cf87f4c20 calculate curve radius for drawing curve normals 2008-09-23 15:57:05 +00:00
Campbell Barton
bd85367776 disable magnification filtering when mipmap is off. useful for texture low poly models. 2008-09-23 15:21:14 +00:00
Andre Susano Pinto
2ad14ba223 Changed SimpleDeform to be a single modifier with (Twist|Bend|Taper|Strech) options available on the modifier painel/options. 2008-09-23 14:32:14 +00:00
Campbell Barton
d72d4a5058 fix for [#11744] NurbCurve Radius incorrect
removed calc_curve_subdiv_radius(), curve radius is now calculated the same way as tilt.

Added radius interpolation menu matching tilt interpolation, needed to add "Ease" interpolation type to keep 2.47 curves looking the same.
2008-09-23 13:35:32 +00:00
Janne Karhu
47032c251d - Particle-particle effectors we're quite unstable and not accurate at all. Now this should be fixed (especially with other integrators than euler) as the needed inter-frame effector particle positions are interpolated properly from the current and previous positions (previously only the most recent position was used).
- In practice this removes the dependency of particle simulations from the update order of objects and different particle systems inside objects.
- As a nice side effect out of this we also get fully correct birth positions for "near reactor particles" (previously for example smoke trail reactor particles were not born smoothly along the target particles path).
2008-09-23 12:53:00 +00:00
Janne Karhu
a55d591898 "Fix" for [#17671] Particles spin out of control and pass through when hitting collision object
-The fix is that particle random size factor should never ever be bigger than 1.0, else negative sizes are possible! Don't know who to blame, but probably my self :)
-The second issue of passing through the deflection and rotating wildly around strange centers is not a bug, but for particles the group and object visualization objects have to be centered on the global origin. I'll probably make an option later to use the object center, but this is how things are for now.
2008-09-23 11:51:40 +00:00
Campbell Barton
bcba8003c0 changing the number of subdivisions for nurbs curves.
this way each edge/segment gets the same number of points matching the resolution value.
before, a nurbs curve would have the same number of points no matter if it was cyclic or not.

This will make slight changes to objects on an animated path, but only noticable if the path has a low resolution.

bug [#11744] NurbCurve Radius incorrect - now dosnt show bad results with order 4 on non-cyclic curve.
2008-09-23 06:26:48 +00:00
Campbell Barton
f187d680d8 fix for [#13825] Lack of Flags in Face Mode Set
undo was also not working.
2008-09-23 01:28:42 +00:00
Campbell Barton
7a28ca4398 Make GameLogic work for python autocomplete (after running the BGE once at least)
only clear newly added items from the gameLogic dictionary rather then the whole dictionary.
2008-09-23 00:37:19 +00:00
Andre Susano Pinto
2911df487e Fixed shrinkwrap constraint handling of matrixs.
Also since contraint uses BVHCache its now usable and fast.
Being possible to shrinkwrap constraint several objects to another
and only have one BVHTree being build.
2008-09-22 22:48:44 +00:00
Benoit Bolsee
18c954e95b BGE patch #17569 approved: Make FrameProp: work in Shape Action. PyDoc updated. 2008-09-22 21:49:48 +00:00
Brecht Van Lommel
2875cc9cc6 Fix for second part of bug #17506: issue with swapped uv coordinates
on creating multires in editmode, wasn't doing test_index_face for
the face data.
2008-09-22 21:22:16 +00:00
Benoit Bolsee
d438b466b7 Fix file browser for Windows: going to the parent directory introduces ../\. Correct parent is ..\ under Windows. 2008-09-22 21:15:48 +00:00
Brecht Van Lommel
0cf7bf7357 Fix for part of bug #17506: uv editing with multires is only
allowed at level 1, missed a case.
2008-09-22 20:26:28 +00:00
Benoit Bolsee
9b4956ae22 BGE patch: KX_STATEx constant to allow simple state manipulation in setState()
The constants KX_STATE1 to KX_STATE30 can be used 
with setState() to change the object state in a 
python controller. The constants are defined in the 
GameLogic module so that the full name is 
GameLogic.KX_STATE1 to GameLogic.KX_STATE30 but you
can simplify this with the import statement:

from GameLogic import *
cont = getCurrentController()
ob = cont.getOwner()
ob.setState(KX_STATE2)		#go to state 2

KX_STATEx constants are defined as (1<<(x-1))
Binary operators |, &, ^ and ~ can be used to combine states:

You can activate more than one state at a time with the | operator:

ob.setState(KX_STATE1|KX_STATE2)  #activate state 1 and 2, stop all others

You can add a state to the current state mask with:

state = ob.getState()
ob.setState(state|KX_STATE3)      #activate state 3, keep others

You can substract a state to the current state mask with the & and operator:

state = ob.getState()
ob.setState(state&~KX_STATE2)     #stop state 2, keep others

You can invert a state with the ^ operator:

state = ob.getState()
ob.setState(state^KX_STATE2)     #invert state 2, keep others
2008-09-22 19:54:30 +00:00