Commit Graph

11478 Commits

Author SHA1 Message Date
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
Daniel Genrich
0b523ac3e6 Particle System: a) Fixing visibility bug when a duplipart-system was deleted it didn't show up in during render any more, b) fixing possible crash during render 2008-08-26 01:07:18 +00:00
Kent Mein
b81bdfdc7c TLC needed for Makefiles to get gameengine compiling again.
Sorry it took me so long to do this :)

Kent
2008-08-25 19:50:17 +00:00
Daniel Genrich
10bcba77b1 Crash fix for having wind noise + particles (reported by Wahooney) 2008-08-25 13:49:55 +00:00
Daniel Genrich
683aabae93 Fixing compiler warning due to unsed code 2008-08-25 11:49:58 +00:00
Janne Karhu
d37f0325ca Effector fall-off power was off by one for spherical, magnet, harmonic and charge fields. For example a square fall-off was reduced to linear etc. 2008-08-25 11:46:55 +00:00
Joshua Leung
afa8a76f46 Grease Pencil Eraser - Bugfix:
* 3d strokes could only be erased from start of stroke 
NB: 3d-strokes could be erased starting from previous commit
2008-08-25 11:09:19 +00:00
Campbell Barton
b5d254445c getting the last created object would return an object that had no SG_Node which would crash whenever python tried to get its location.
since the object was removed from the scene anyway, there is no reason to return it.
2008-08-25 09:52:38 +00:00
Joshua Leung
1ed408e8c6 == Grease Pencil - Drawing + Eraser Improvements ==
Drawing Improvements:
* Single 'dots' now draw rounded
* Strokes being drawn are drawn 'solid' instead of as dotted lines

Eraser:
* Now operates interactively, so no more wait to see if stuff was erased
* An influence circle is now drawn - the radius of this is defined as the thickness^2
2008-08-25 06:22:21 +00:00
Martin Poirier
5e13055849 Little feature request
Adding numerical input support to edge slide (and at the same time, loop cut).

Also clean up NumInput functions for external use. I might have a second pass at this to make it even easier.
2008-08-24 20:57:56 +00:00
Martin Poirier
bdcf3783d7 [#17433] Cannot break node links with LMB drag under linux.
Grease pencil commit added some panel draw code or whatnot which seems to change the matrix stack in unwanted (in this case) ways. Reset to identity fixes it.

* I don't think it was limited to Linux though
2008-08-24 15:22:44 +00:00
Hans Lambermont
b33e57952c fix settings for freebsd7 2008-08-23 13:12:17 +00:00
Benoit Bolsee
bc8f002a4c BGE state system improvement: the sensor with Level option enabled will trigger the controller of a newly activated state, even if the sensor is already connected to an active state; new isTriggered() python function to determine which sensor triggered the current controller.
Previously, this behaviour was available only for sensors
that were not connected to any active state, which was
forcing the game designer to duplicate sensors in some 
cases.
For example the Always sensors used to initialize the 
states needed to be duplicated for each state. With this
patch, a single Always sensor with Level option enabled
will suffice to initialize all the states. 
A Python controller can determine which sensor did trigger
with the new SCA_ISensor::isTriggered() function.

Notes:
- When a sensor with level option enabled is connected
  to multiple controllers, only those of newly activated
  states will be triggered. The controllers of already
  activated states will receive no trigger, unless the 
  sensor internal state toggled, in which case all the
  controllers are triggered as always.
- The old isPositive() function returns the internal
  state of the sensor, positive or negative; the new 
  isTriggered() function returns 1 only for sensors
  that generated an event in the current frame.
2008-08-23 11:54:27 +00:00
Andre Susano Pinto
2076703a28 Removed cast warnings from shrinkwrap.c and BLI_kdopbvh.c
Only unused functions and openmp warnings left on those.
2008-08-22 18:28:34 +00:00
Benoit Bolsee
7630539fe8 Fix Windows compilation problem and update MSVC project files 2008-08-22 15:00:30 +00:00
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
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