Commit Graph

13528 Commits

Author SHA1 Message Date
Joshua Leung
88b30a740a A bit of cleanup of warnings (gcc).
Warnings still exist in the following places:
* places (exotic.c, etc.) where format strings still use 'longs' but datatype is uintptr_t (i.e. resulting from the win64 changes)
* shrinkwrap.c - a few "incompatable type" warnings
2008-08-22 12:10:02 +00:00
Joshua Leung
c230bc4a82 Grease Pencil - Drawing Improvements:
This commit finishes the work started in the previous commit. 
1) Reduced the effects of 'shrinking' lines with acute angles (*)
2) Ends of strokes now get crude end-caps which look ok for most purposes (they are really just simple trapeziums not fancy semicircles)

* Note: some shrinking does still occur if the stroke was drawn quickly enough for few points to be recorded. Also, although there are still zones of overlapping when there are acute angles, this is reduced to steeper angles (and is not too bad considering real-life materials)
2008-08-22 11:46:59 +00:00
Campbell Barton
f88dabae8a BGE data conversion was making sound paths absolute, modify a copy rather then the original. 2008-08-22 10:27:16 +00:00
Joshua Leung
eab746fc5f Grease Pencil: WIP commit (nothing new)
Just a little commit so that I can transfer some changes back over to laptop. 
* Line drawing should now be improved for most cases, but acute angles still need more work to reduce 'shrinking' artifacts. As such, this is still hidden behind 'rt' setting
* Preparation work for Grease-Pencil in Image Editor, and also 'Stick to View' for Image/Sequence editors.
2008-08-22 08:36:29 +00:00
Campbell Barton
9b29810912 BGE Python API - GameLogic.getBlendFileList(path='//') to return a list of blend's in the current directory. Needed for creating a level selector that lists all files in the level directory.
CMakeFile include path to compile with recent changes.
2008-08-22 06:02:01 +00:00
Andre Susano Pinto
4655426ec7 Merged shrinkwrap modifier from soc-2008-jaguarandi 2008-08-22 00:35:14 +00:00
Andre Susano Pinto
f4ae23f379 svn merge -r 16174:16215 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-08-21 22:57:25 +00:00
Diego Borghetti
f0d58a8b99 Update scons files in source/gameengine/Physics/Bullet.
Please Nathan double check this, but all compile fine here :)
2008-08-21 21:14:08 +00:00
Janne Karhu
57d1a1eac2 New things for particle effectors:
- For newtonian particles a "self effect" button in particle extras makes the particles be effected by themselves if a particle effector is defined for this system, currently this is a brute force method so things start getting slow with more than ~100 particles, but this will hopefully change in the future.
- Two new effector types: charge and a Lennard-Jones potential based force (inter-molecular forces for example).
   -Charge is similar to spherical field except it changes behavior (attract/repulse) based on the effected particles charge field (negative/positive) like real particles with a charge.
   -The Lennard-Jones field is a very short range force with a behavior determined by the sizes of the effector and effected particle. At a distance smaller than the combined sizes the field is very repulsive and after that distance it's attractive. It tries to keep the particles at an equilibrium distance from each other. Particles need to be at a close proximity to each other to be effected by this field at all.
- Particle systems can now have two effector fields (two slots in the fields panel). This allows to create particles which for example have both a charge and a Lennard-Jones potential.
2008-08-21 21:12:27 +00:00
Benoit Bolsee
3d3527eb6d BGE bug #17411 fixed: the always sensor is called before the the scale of the object is applied. The scale is now applied to the shape before the creation of the rigid body. 2008-08-21 21:04:42 +00:00
Ken Hughes
8551ac5e08 Missing newline at EOF. 2008-08-21 20:28:33 +00:00
Benoit Bolsee
ca1182ff56 fix warning in previous revision, update MSVC project files, scons files in source/gameengine/Physics/Bullet must be updated by adding these directories in the include list: intern/string/include, source/gameengine/Rasterizer, source/kernel/gen_system. I leave it up to more expert than me. 2008-08-21 19:00:24 +00:00
Ken Hughes
0a87d821a9 Python API
----------
Fix typo in Mesh module exception messages (submitted by Teppo Kansala ).
2008-08-21 16:13:26 +00:00
Ken Hughes
7e0c880c2e Python API
----------
Access to empty shapes by object.emptyShape attribute, contributed by Domino
Marama (thanks!)
2008-08-21 16:10:30 +00:00
Benoit Bolsee
e912ca9331 BGE bug #17491 fixed: BGE, Dupli instance with different scale, massive slowdown.
The root cause of this bug is the fact that Bullet shapes 
are shared between duplicated game objects. As the physics
object scale is stored in the shape, all duplicas must 
have the same scale otherwise the physics representation
is incorrect.
This fix introduces a mechanism to duplicate shapes at
runtime so that Bullet shapes are not shared anymore.
The drawback is an increased memory consuption. 
A reference count mechanism will be introduced in a 
later revision to keep Bullet shape shared between
duplicas that have the same scale.
2008-08-21 15:19:54 +00:00
Benoit Bolsee
4b9f5b2710 BGE Bullet fix: physics debug representation of cone shape does not take Up axis into account. Use Bullet 2.69 code to fix that bug. 2008-08-21 14:07:24 +00:00
Geoffrey Bantle
09c4e88336 -> more FLT tweaks
LOD editor input ranges were too low.
Also fixed the interface drawing so it
always started at bottom of screen area.
2008-08-20 20:10:33 +00:00
Geoffrey Bantle
e7cf01d083 -> Fix for last commit
The range of allowed values for the LOD editor
 inputs was too low.
2008-08-20 19:18:52 +00:00
Geoffrey Bantle
6d7fa6020e -> LOD and DOF editor scripts
Two new scripts for the 'Misc' Menu. LOD and DOF
 Editors for creating/editing DOF and LOD FLT nodes
 inside of blender.
2008-08-20 19:10:33 +00:00
Campbell Barton
7608dcfc51 GameLogic.globalDict blenderplayer now keeps settings when loading new blend files.
workaround for python stopping and starting by storing the dictionary as marshal'd data. this means only python types are supported.
This feature is needed so when switching from a menu to a level blendfile, the configuration isnt lost.
2008-08-20 06:11:11 +00:00
Diego Borghetti
b23f3f62c2 Ipo Handle vertex have own color and size (Venom request).
Now the vertex of the ipo handle have own color and
size, can be change from Theme -> Ipo Curve Editor:
	Handle Vertex		-	(Default Color)
	Handle Vertex Select	-	(Selected Color)
	Handle Size		-	(Point size, for vertex)

Add subverion so by default the handler have the same
settings that the ipo vertex options.
2008-08-19 14:39:11 +00:00
Campbell Barton
812583f1fa Added GameLogic.globalDict, this is a place where data can be stored even when new blend files are loaded. Using for apricot so frankie can go into levels in new blendfiles keeping his inventory, currently it dosnt work for the blenderplayer which stops python before loading new blend files. 2008-08-19 11:53:24 +00:00
Daniel Genrich
7f49f67352 Particles now got that force-hiding feature, too --> jahka: please take a look :) 2008-08-19 11:26:18 +00:00
Campbell Barton
a7f5109f23 BGE Blend file loading was using BLO_read_from_memory which meant relative linked libraries could not be found.
This is odd because BLO_read_from_file was commented out with """//this doesn't work anymore for relative paths, so use BLO_read_from_memory instead"""
Undoing Erwins changes from r7497, just use normal file loading. From the commit log its not clear if he means relative filenames or relative linked libs but from testing both work now.
2008-08-18 23:48:59 +00:00
Ken Hughes
deadd5ee01 Python API
----------
Add Material.enabledTextures attribute; this allows users to enable and
disable textures assigned to a material.
2008-08-18 22:39:55 +00:00
Daniel Genrich
17e4222230 Little tweaks so 0 wind results in 0 noise, also removed double-mass dependancy in cloth 2008-08-18 19:32:21 +00:00
Andre Susano Pinto
a06321d55c Implemented a find_nearest with heaps. This reachs a minimal number of distance queries.
But the cost of maintaining the heap seems to be very high.

For now DFS with local heuristics gets better times.. so BVHTree still uses that.
2008-08-18 19:31:40 +00:00
Daniel Genrich
8562efe8a3 a) Forces can be hidden by deflector object now (need to talk with jahka about particle integration - should be copy-paste) see http://dldw.de/tmp/index.php?file=w2.blend (press play button in timeline and change the absorption value ob the cube) b) fixed deflector/collision bug with continues physics c) cloth wind/forces uses masses now d) even faster collision object gathering e) have fun ;) 2008-08-18 14:41:24 +00:00
Andre Susano Pinto
2ce338f7e8 svn merge -r 16077:16174 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-08-18 14:33:26 +00:00
Campbell Barton
410dbe9037 python get/set material function for 3d text 2008-08-18 12:40:31 +00:00
Brecht Van Lommel
5aecd230cb Fix for bug #17485: inter object sensor/controller/actuator links could
get lost in reading libraries. The pointers were being remapped in the
expand stage, but not all objects were guaranteed to be linked in at that
point, so they got lost. Now it always does this in the lib linking stage
for both regular and library objects.
2008-08-18 11:55:40 +00:00
Daniel Genrich
d5a890c078 a) New unified effector system by Janne (jahka) + Me (genscher): particle and cloth/sb don't use different systems anymore. b) cloth wind corrected for new system c) Wind has noise option now d) @ Bjornmose: since the old factors are gone SB doesn't need to divide by 1000 etc. anymore. I didn't want to touch your code - you might like to take a look at it :) 2008-08-18 11:09:27 +00:00
Daniel Genrich
a84d346939 #2: Fixing compile errors on mingw/cygwin (reported by aligorith) 2008-08-18 10:48:37 +00:00
Daniel Genrich
f876fd66b4 Fixing compile errors on mingw/cygwin (reported by aligorith) 2008-08-18 10:37:15 +00:00
Campbell Barton
ff45582551 Added vec.reflect(mirror) method to Python Mathutils Vector type
also made sensor and actuator text areas a bit bigger so full names can be read.
2008-08-18 02:29:25 +00:00
Andre Susano Pinto
89a735e4f8 BVHTree fix (non 2.47)
It was building incorrect trees when there was only 1 leaf.
Code fixed to always generate a tree with at least 1 branch.. since most of bvh code relies on this.
2008-08-17 23:48:16 +00:00
Daniel Genrich
0c79804dbe another compile fix reported by ccherrett 2008-08-17 23:03:45 +00:00
Daniel Genrich
0db489b119 another compile fix reported by ccherrett 2008-08-17 22:58:00 +00:00
Benoit Bolsee
ed9a0fe7e9 Update MSVC project files after Win64 patch 2008-08-17 22:32:40 +00:00
Benoit Bolsee
9f6109002b Fix compile problem in MSVC after Win64 patch 2008-08-17 22:28:30 +00:00
Daniel Genrich
904b97eee9 Win64: Another missing include only appearing with powerpc-apple-gcc-4.x (reported by daredemo/#blendercoders) 2008-08-17 19:58:13 +00:00
Daniel Genrich
0c5adb7504 Win64: compiles fine with scons with gcc now 2008-08-17 17:22:10 +00:00
Daniel Genrich
62845c3d52 Win64: forget include => this compile errors never showed up on msvc (if anyone wonders) 2008-08-17 17:16:49 +00:00
Daniel Genrich
1f46aaa547 Win64: forget include 2008-08-17 17:12:10 +00:00
Willian Padovani Germano
7fd701ab58 == BPython API ==
Bug: Draw.Number wasn't properly checking that the initial, min and max values passed to it were numbers. On errors Python would set an error flag that would only be caught later on, masking where the real problem was. Pesky bug...

Reported by André (jaguarandi) on irc, thanks!

PS for bpy devs: PyInt_AsLong returns -1 on error and sets the error flag. With functions like that we need to take special care or not that obvious bugs appear.
2008-08-17 17:11:51 +00:00
Daniel Genrich
f4d682dd2c Win64: forrget include 2008-08-17 17:11:00 +00:00
Daniel Genrich
fd0072e77c Win64: please check my changes if you ran across them ;) But should be fine since no additional crashes were reported! 2008-08-17 17:08:00 +00:00
Daniel Genrich
68765dc94b Win64 commit: first little commit to test how it compiles on other plattforms - I'll then commit the other changes if all is fine :) 2008-08-17 16:36:37 +00:00
Benoit Bolsee
fda00bc034 BGE patch: New Delay sensor (derived from patch #17472)
Introduction of a new Delay sensor that can be used to 
generate positive and negative triggers at precise time,
expressed in number of frames. 
The delay parameter defines the length of the initial 
OFF period. A positive trigger is generated at the end
of this period. The duration parameter defines the 
length of the ON period following the OFF period.
A negative trigger is generated at the end of the ON period. 
If duration is 0, the sensor stays ON and there is no 
negative trigger. 
The sensor runs the OFF-ON cycle once unless the repeat 
option is set: the OFF-ON cycle repeats indefinately 
(or the OFF cycle if duration is 0).

The new generic SCA_ISensor::reset() Python function
can be used at any time to restart the sensor: the
current cycle is interrupted and no trigger is generated.
2008-08-16 20:45:37 +00:00
Janne Karhu
ae42934c93 Boids didn't get correct fall-off from wind effector.
Boids now react to vortex field also.
2008-08-16 16:29:12 +00:00