Commit Graph

12115 Commits

Author SHA1 Message Date
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