Commit Graph

16797 Commits

Author SHA1 Message Date
Lukas Steiblys
3ec79d79e9 normals were updated incorrectly in buffers when sculpting. Still not perfect. 2009-10-05 09:03:35 +00:00
Campbell Barton
0f07bea06b remove unused defines, cant check every case but from grepping the souece it should go ok. 2009-10-05 07:08:59 +00:00
Matt Ebb
af522abf33 * changes/additions to volume lighting
Volumes can now receive shadows from external objects, either raytraced shadows or shadow maps.

To use external shadows, enable 'external shadows' in volume material 'lighting' panel. This an extra toggle since it causes a performance hit, but this can probably be revisited/optimised when the new raytrace accelerator is integrated. For shadow maps at least, it's still very quick.

Renamed 'scattering mode' to 'lighting mode' (a bit simpler to understand), and the options inside. Now there's:

- Shadeless
  takes light contribution, but without shadowing or self-shading (fast)
  good for fog-like volumes, such as mist, or underwater effects
  
- Shadowed (new)
  takes light contribution with shadows, but no self-shading. (medium)
  good for mist etc. with directional light sources
  eg. http://vimeo.com/6901636
  
- Shaded
  takes light contribution with internal/external shadows, and self shading (slower)
  good for thicker/textured volumes like smoke
  
- Multiple scattering etc (still doesn't work properly, on the todo).
2009-10-05 02:59:47 +00:00
Nathan Letwory
729a63bbb6 * update default physics settings for jahka 2009-10-04 19:53:06 +00:00
Lukas Steiblys
f82847687e VBOs weren't fully turned off in edit mode. Fixed that 2009-10-03 22:14:19 +00:00
Dalai Felinto
78d9891dfe mathutils: bugfix for matrix * vector
- terrible typo was making the multiplication to run in an infinite loop.
- Any matrix * vector multiplication would crash Blender.
eg
####
import Mathutils
from Mathutils import *

vec_ray = Vector(0.0, 0.0, 1.0)
tilt_mat = RotationMatrix(0.0, 3, "y")
vec_ray = tilt_mat * vec_ray
####
2009-10-03 21:48:15 +00:00
Guillermo S. Romero
74e1093007 SVN maintenance. 2009-10-03 16:21:47 +00:00
Lukas Steiblys
853f8212ca sculpt mode crash fix when VBOs disabled 2009-10-03 16:21:35 +00:00
Lukas Steiblys
e80d2cc426 imbusy GSoC'09 branch merge (Vertex Buffer Object support) 2009-10-03 15:35:01 +00:00
Joshua Leung
8204dffe8a UI: Bugfixes
* #19529: Saving in edit mode causes problems in mode buttons when reopening
* Fixed compiler warning in writefile for mingw
* AnimData for Lamp data was not recognised by RNA
2009-10-03 11:23:31 +00:00
William Reynish
2cbf21b582 UI tweaks
*Fixed some spacing issues in 3D View and Outliner headers
*Made the Bone properties layout consistent with Object properties
*Put Rotation Mode menus below transformation channels, being less important.
*Tiny layout tweak for area lamps
2009-10-03 11:19:14 +00:00
Joshua Leung
f4c697cf7f Keying Sets UI:
Added a way to view and edit Keying Sets via the Scene Buttons. These are still some tweaks needed to make this really workable, but should still work well enough for simply viewing and tweaking existing Keying Sets created using other means.

Additional bugfixes:
* Adjusted the size of labels on properties that had a 'label' for their name. Now it uses 1/3 of the total width instead, which looks much better for most cases.
* Added missing entries for adding Force Fields from the Info-header 'Add' menu. At some point we should unify this menu with the popup operator's one, since this is exactly the kind of situation we had hoped in avoid with new UI architectures.
* Moved all the operator defines for keyframing stuff to the 'intern' anim header instead
2009-10-03 04:21:38 +00:00
Joshua Leung
97d8839ad5 F-Modifiers: Fix for Function Generator's "type" field not working
The field in RNA got renamed, but the UI code didn't get corrected, so the field for this wasn't working
2009-10-02 23:36:02 +00:00
Joshua Leung
72554c5dbb Quick Animation Editors Bugfix:
The settings for expanding the set of materials and/or particles on Objects were inverted, resulting in the wrong icon being shown.
2009-10-02 23:28:58 +00:00
Thomas Dinges
44b74fa0ac Fixed [#19506] Missing buttons : Curve Guide.
Jahka: please check on the Kink type and axis RNA Wrapping. 
Todo: Make Curve Guide Field only available for Curve Objects.
2009-10-02 20:15:25 +00:00
Nathan Letwory
ca54ea078e * due to the setup of headers in mingw 4.4.0, includes could mess up. Making sure that windows.h isn't included where it shouln't (outside of __cplusplus) 2009-10-02 15:51:25 +00:00
Thomas Dinges
9ac8a1368f Fix for [#19524] Lamp icons are not updated in outliner. 2009-10-02 15:27:26 +00:00
Daniel Genrich
625da05e3a Smoke:
* Fix loading issue of blend files with smoke collision objects (was disabled on purpose since it will be subject of change, but can be solved using do_versions() later)
2009-10-02 14:40:51 +00:00
Joshua Leung
0a374e6679 Anim Bugfixes:
* Add F-Modifiers (for Graph Editor) was using a buggy poll() method. Silly typo.
* Bone groups now get duplicated when duplicating an armature object
2009-10-02 11:15:24 +00:00
Daniel Genrich
fbb47e8604 Smoke:
* Dissolve is back
* Obstacles coming back (some bugs left i think)
2009-10-02 11:09:05 +00:00
Benoit Bolsee
14619ec98d Move Inverse Kinematics panel to Constraint context. Make iTaSC parameter panel more readable. 2009-10-02 07:20:07 +00:00
Campbell Barton
ba2f052a37 projection painting changes from 2.4x r23600 2009-10-02 07:03:58 +00:00
Brecht Van Lommel
b26ef33b8e Fix #19311: adding/opening datablocks did not always make the right
one active. Now there's a function to get the pointer + property from
the UI, just like for the animation operators.

Also two fixes for fileselect events, regions are now preserved so that
context is restored to the old region, and the cancel callback is called
when the operator is cancelled.
2009-10-01 23:32:57 +00:00
Martin Poirier
57cf7d2d4a Bug fix
Snapping: transform snap in editmode couldn't snap to data in the same mesh.
2009-10-01 18:00:00 +00:00
Brecht Van Lommel
606e609f5d Fix cmake compilation on Windows, adding pthread includes,
patch by Guillaume, thanks!
2009-10-01 17:24:24 +00:00
Brecht Van Lommel
022a343223 Texture stack influences are now all separate values, and negative
mapped values now have their influence negated instead. Also a few
RNA changes for TextureSlot.

Bumped subversion for the version patch.
2009-10-01 17:15:23 +00:00
Roland Hess
1525ed42c9 Brought back mousewheel multicut to Ctrl-R loopcut tool that was recently added. Tweak still doesn't work for the loopcut op, but it didn't before, so at least we're advancing. 2009-10-01 16:37:08 +00:00
Martin Poirier
15d81b21f6 Fixing scons compile on windows.
Since bli_threads.h now includes pthreads directly, we need to had instructions in SConscripts everywhere for proper include path.

Frankly, I feel like this should be done in a global manner and not in a per lib fashion, but that is for another day.

This commit also fixes more missing properties
2009-10-01 16:32:33 +00:00
Brecht Van Lommel
37a729cb1d Fix crashes with .blend files saved in particle mode, derivedmesh
can't be assumed to be made yet then.
2009-10-01 16:30:05 +00:00
Thomas Dinges
1c3faa97ff Fixed a part of [#19494]. Transform Lock Options didn't updated 3D View's Transform manipulator.
* Minor Code tweak in material RNA.
2009-10-01 14:41:45 +00:00
Brecht Van Lommel
988e9132b8 Fix #19513: scroll wheel did not work when over disabled buttons. 2009-10-01 12:33:35 +00:00
Campbell Barton
492c545e05 only link against python when its enabled
remove duplicate linking flags (looks like a copy/paste error)
2009-10-01 11:21:40 +00:00
Matt Ebb
0901eafa8f * Added proper update/conversions for changing between degrees and "mm" in camera 2009-10-01 04:14:43 +00:00
Campbell Barton
bf3374426a Use curve twist for the CurveDeform modifier and bones (anything that uses curve_deform_verts() and curve_deform_vector()).
So means minimum twist and twist smoothing are now used.

the Z up quaternion from the path is rotated to match the up axis given.

There was no logical rule for the up vector, some cases flipped the normals when used with the CurveDeform modifier.
Use the default X-Up behavior and match other settings with this. (comments explain this in detail).



- Interpolating quaternions didn't work in some cases, disabled for now.
- 'no_rot_axis' is different from in 2.4x since it now removes rotation from the tilt whereas before it edited the axis before calculating the tilt.
2009-09-30 23:31:10 +00:00
Janne Karhu
bff893a420 Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons) 
  instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group 
  setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
	- "Point" is most like the old effectors and uses the 
	  effector location as the effector point.
	- "Plane" uses the closest point on effectors local xy-plane 
	  as the effector point.
	- "Surface" uses the closest point on an effector object's 
	  surface as the effector point.
	- "Every Point" uses every point in a mesh effector object 
	  as an effector point.
	- The falloff is calculated from this point, so for example 
	  with "surface" shape and "use only negative z axis" it's 
	  possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer 
  just spherical.
* New effector parameter "flow", which makes the effector act as 
  surrounding air velocity, so the resulting force is 
  proportional to the velocity difference of the point and "air 
  velocity". For example a wind field with flow=1.0 results in 
  proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random 
  flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force 
  (note. the z-axis is the surface normal in the case of 
  effector shape "surface")
* New "force field" submenu in add menu, which adds an empty 
  with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector 
  system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for 
  particles, softbody & cloth, since their final effect depends on many external 
  factors, like for example the surface area of the effected faces.

Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through 
  DAG_id_flush_update(..).
  
Known issues
* Curve guides don't yet have all ui buttons in place, but they 
  should work none the less.
* Hair dynamics don't yet respect force fields.

Other changes
* Particle emission defaults now to frames 1-200 with life of 50 
  frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to 
  free pidlists after use :).
2009-09-30 22:10:14 +00:00
Campbell Barton
7d9bfdc31a building without bullet didnt work 2009-09-30 21:31:08 +00:00
Brecht Van Lommel
b466286c3e Render & Compositing Thread Fixes
* Rendering twice or more could crash layer/pass buttons.
* Compositing would crash while drawing the image.
* Rendering animations could also crash drawing the image.
* Compositing could crash 
* Starting to rendering while preview render / compo was
  still running could crash.
* Exiting while rendering an animation would not abort the
  renderer properly, making Blender seemingly freeze.
* Fixes theoretically possible issue with setting malloc
  lock with nested threads.
* Drawing previews inside nodes could crash when those nodes
  were being rendered at the same time.

There's more crashes, manipulating the scene data or undo can
still crash, this commit only focuses on making sure the image
buffer and render result access is thread safe.


Implementation:
* Rather than assuming the render result does not get freed
  during render, which seems to be quite difficult to do given
  that e.g. the compositor is allowed to change the size of
  the buffer or output different passes, the render result is
  now protected with a read/write mutex.
* The read/write mutex allows multiple readers (and pixel
  writers) at the same time, but only allows one writer to
  manipulate the data structure.
* Added BKE_image_acquire_ibuf/BKE_image_release_ibuf to access
  images being rendered, cases where this is not needed (most
  code) can still use BKE_image_get_ibuf.
* The job manager now allows only one rendering job at the same
  time, rather than the G.rendering check which was not reliable.
2009-09-30 18:18:32 +00:00
Campbell Barton
c3ff4b09be svn merge https://svn.blender.org/svnroot/bf-blender/branches/blender2.4 -r23566:23567 2009-09-30 13:58:21 +00:00
Joshua Leung
2a21c1acbe Animato: Bugfixes
* #19501: Only the first user of multi-user IPO's were getting converted to AnimData. 
Now, this AnimData gets converted multiple times - once for each user. This will mean that multi-user actions will no longer be multi-user after conversion though, although this could be fixed manually if there really is such a need.

* #19503: Nasty memory leaks when duplicating objects with AnimData
Fixed a few little oversights made when coding the copying code for NLA-data (which resulted in exponential copying-loops of doom), and sanitised the AnimData copying code for ID-blocks to be simpler to manage.
2009-09-30 04:59:14 +00:00
Campbell Barton
8b6f5c171d - rather then passing the python namespace dictionary to the controller function get the namespace from the converter.
- renamed SetPythonDictionary() to SetPyNamespace()
- remove IsLight(), GetGameObjectType() existed before this but wasnt used for lights.
2009-09-29 22:49:33 +00:00
Matt Ebb
71b3088596 Rework of volume shading
After code review and experimentation, this commit makes some changes to the way that volumes are shaded. Previously, there were problems with the 'scattering' component, in that it wasn't physically correct - it didn't conserve energy and was just acting as a brightness multiplier. This has been changed to be more correct, so that as the light is scattered out of the volume, there is less remaining to penetrate through.

Since this behaviour is very similar to absorption but more useful, absorption has been removed and has been replaced by a 'transmission colour' - controlling the colour of light penetrating through the volume after it has been scattered/absorbed. As well as this, there's now 'reflection', a non-physically correct RGB multiplier for out-scattered light. This is handy for tweaking the overall colour of the volume, without having to worry about wavelength dependent absorption, and its effects on transmitted light. Now at least, even though there is the ability to tweak things non-physically, volume shading is physically based by default, and has a better combination of correctness and ease of use.

There's more detailed information and example images here:
http://wiki.blender.org/index.php/User:Broken/VolumeRendering

Also did some tweaks/optimisation:
* Removed shading step size (was a bit annoying, if it comes back, it will be in a different form)
* Removed phase function options, now just one asymmetry slider controls the range between back-scattering, isotropic scattering, and forward scattering. (note, more extreme values gives artifacts with light cache, will fix...)
* Disabled the extra 'bounce lights' from the preview render for volumes, speeds updates significantly
* Enabled voxeldata texture in preview render
* Fixed volume shadows (they were too dark, fixed by avoiding using the shadfac/AddAlphaLight stuff)

More revisions to come later...
2009-09-29 22:01:32 +00:00
Campbell Barton
98ee2a781d option to build the BGE without python, uses existing python check (cmake and scons)
when python is disabled videotextures are not built.
2009-09-29 21:42:40 +00:00
Diego Borghetti
53f0c3b018 Fix link problem: Rename libed_preview -> libed_render 2009-09-29 20:26:06 +00:00
Brecht Van Lommel
15d07720e5 Sorry, three commits in one, became difficult to untangle..
Editors Modules

* render/ module added in editors, moved the preview render code there and
  also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
  making a single physics_ops.c for operators and keymaps. Also move all
  particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
  specificially.

Updates & Notifiers

* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
  which will go back to a callback in editors. Eventually these should
  be in the depsgraph itself, but for now this gives a unified call for
  doing updates.
* GLSL materials are now refreshed on changes. There's still various
  cases missing, 
* Preview icons now hook into this system, solving various update cases
  that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
  problem is avoided in the new system.

Icon Rendering

* On systems with support for non-power of two textures, an OpenGL texture
  is now used instead of glDrawPixels. This avoids problems with icons get
  clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
  and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
  with the default setup. The glDrawPixels implementation on Mac seems to
  have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
  you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
  be used with threads reliably.
2009-09-29 19:12:12 +00:00
Arystanbek Dyussenov
5443844cf6 Fixed import scripts: OBJ, 3DS. 2 bugs still perist though: imported meshes appear upside-down (foreach_set?) and materials don't import. 2009-09-29 12:34:05 +00:00
Brecht Van Lommel
704a677498 Fix for CMake/OS X, would fail to copy files to bundle sometimes,
doing make twice would avoid this, but that's not very convenient.
2009-09-29 09:48:30 +00:00
Campbell Barton
c8b7384c4b remove ray sensors own logic manager (now stored in parent class) + other minor changes. 2009-09-29 07:51:54 +00:00
Dalai Felinto
64a093ea77 bge player - stubs update
*note in order to build blenderplayer with cmake+msvc one needs to comment all smoke references in stubs.c
- scons + msvc is building fine (raising some warnings for the smole references though)
- cmake in linux should be building as well (the smoke references were inserted in stubs to please this building environment IIRC)
2009-09-29 05:22:44 +00:00
Joshua Leung
3198ff876b Bugfix #19490: Adding UV texture, adds Vertex color instead
Seems to have been a copy+paste error (code for Vertex Color adding was pasted in place of texture paint). Restored the code from an earlier revision (from another file).
2009-09-29 02:19:27 +00:00
Joshua Leung
52b28fddec Removed the termporary defines added to make the Game Engine compile. Hopefully this fixes all of the cases which broke. 2009-09-29 01:52:54 +00:00