Commit Graph

36940 Commits

Author SHA1 Message Date
a8ec403d72 Fix: Smoke adaptive domain applied velocity in wrong unit space causing high velocities never apply additional margin ahead the fluid.
Also skip new flow velocity because thats not accurate enough to be of any use in there.
2013-05-21 18:59:46 +00:00
68b9794a40 Fix #35232: Marker right-click misbehavior on adding
Made it so Add Marker button from toolbox will place
marker in the middle of the frame.
2013-05-21 14:44:50 +00:00
c4ee1f2658 Fluid simulation manual number of threads option now doesn't set the number
of threads to the number of cores when the fluid is created. Rather it is now
set to 0 which means "use the number of threads specified for the scene".
2013-05-21 11:37:42 +00:00
f937379073 Fix to show numpad . instead of NDOF fit as first shortcut key in menus. 2013-05-21 10:13:45 +00:00
0c4cc6c53f Related to #35452: show warning when unwrapping object with negative scale, same
as we already do for non-uniform scale.
2013-05-21 10:13:44 +00:00
13bde6645b code cleanup: remove callbacks only added to wrap MEM_freeN 2013-05-21 08:45:10 +00:00
cd6b27f2b5 remove return value from MEM_freeN, it wasn't used anywhere and was cast to a different function signature. (which evidently works but error prone). 2013-05-21 07:37:59 +00:00
1031676800 fix own bug [#35451] Extrude -> Grab -> Cancel -> Crash 2013-05-21 05:01:14 +00:00
7b36dea115 code cleanup: scons - binreloc include was copied all over the place for no reason, -pthread too. 2013-05-20 18:55:08 +00:00
6de829cb7a code cleanup: split scons includes onto multiple lines, reduce chance of include conflicts later on. 2013-05-20 18:42:28 +00:00
53fd499d28 Fix: smoke noise tile was saved in Blender executable directory, which is often write protected on modern systems.
This caused high resolution smoke to always regenerate new tile when domain was reinitialized, slowing down especially adaptive domain simulations. Now noise tile is saved in Blender temp directory instead.
2013-05-20 17:48:16 +00:00
7759b2743a code cleanup: replace PARALLEL define with _OPENMP 2013-05-20 16:15:16 +00:00
3758193c18 Cycles / Wireframe node:
* Added a wireframe node (Input category) to get access to Mesh wireframe data. 
The thickness can be controlled via a "Size" parameter, and is available in world units (default) and screen pixel size. 
* Only the triangulated mesh is available now, quads is for later. 

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wireframe

Render and Example file:
http://www.pasteall.org/pic/show.php?id=51731
http://www.pasteall.org/blend/21510
2013-05-20 15:58:37 +00:00
38dc85f296 Math Node:
* Added a Modulo operation to the math node, available in Compositor, Shader and Texture Nodes.
2013-05-20 14:38:47 +00:00
0fb5c9117f no need to add own define for openmp. 2013-05-20 14:38:43 +00:00
19f11fc783 Cmake / Fluids:
* Possible fix for Fluid threads UI not being shown with cmake builds.
2013-05-20 14:00:19 +00:00
7781312346 code cleanup: rename bmesh operator files to be more consistent 2013-05-20 07:38:11 +00:00
5cdddb12d9 fix [#35434] Segmentation fault switching screen layout from python 2013-05-20 05:06:52 +00:00
51f04bf7b8 code cleanup: remove unneeded elements in uv NearestHit. 2013-05-19 18:05:34 +00:00
7e3b06da6d code cleanup: bmesh/uv
- uv_mouse_select() move from BLI_array to alloca
- was unnecessarily looping over faces for an index lookup when an array is already created.
2013-05-19 17:45:42 +00:00
12eb88788d code cleanup: remove some kludge from uv loop select 2013-05-19 17:20:10 +00:00
c47bbae8f0 code cleanup: uv_find_nearest_vert
was doing unneeded lookups on face uv's when the adjacent uv's are known.
2013-05-19 16:52:44 +00:00
eacb629c72 style cleanup 2013-05-19 15:11:25 +00:00
ae0220332e code cleanup: simplify fast_ray_nearest_hit() 2013-05-19 15:03:36 +00:00
196f7f0f1f fix memory corruption: allocated memory space did not match the needed space 2013-05-19 09:45:53 +00:00
61dafba0bc fix for mistake in r56903 2013-05-19 08:46:17 +00:00
3b2256f9af Fix for last fix, compile error in smoke code. 2013-05-19 04:12:00 +00:00
0abe993435 Fix #35407: different particle behavior compared to 2.66, reverted part of 56073. 2013-05-19 04:07:01 +00:00
b614b81a77 Fix for [#35245] Freestyle getting stuck on view map creation + memory leaks.
There were two issues:

- Line visibility computations are very slow in the case of the provided .blend file, which gave
an impression that the rendering process got stuck.  The slowness can be explained by the present
data structures used for the line visibility computations, together with the specific mesh distribution
of the test scene.  At the moment Freestyle uses a regular grid in the 2D image coordinate system
to divide tris/quads into small groups in order to accelerate the line visibility computations.
On the other hand, the test scene is populated a big plane (made of one quad) and a moderately
detailed mesh object (22K tris).  The scale of the latter mesh is animated from nearly zero to
about 0.2 to make the object show up over time.  When the scale is nearly equal to zero, all the
tris concentrate in one grid cell, so essentially there is no performance gain from the grid data
structure optimized for speed.  It looks like a better grid data structure (possibly based on
adaptive grid refinement) is necessary to genuinely address the identified performance issue.  For now
the progress bar of Blender is employed to better inform users of the amount of work done in the line
visibility computations.

- A crash was caused by an excessive memory allocation request.  The X and Y dimensions of the grid
data structure are determined based on the average area of mesh faces in the given scene.  When the big
plane in the test scene is excluded from the rendering, the average area is almost zero (on the order
of 1e-5).  As a result of this extremely small average area, the X and Y dimensions were set to a very
large number, causing a fatal memory allocation error.  The present revision has introduced a hard
upper limit to the dimensions of the grid data structure to avoid this kind of numerical instability.
2013-05-19 00:56:40 +00:00
fa043d208b Optimizations for dyntopo
- creating faces was unnecessarily checking if they already existed.
- deleting a face did edge-lookups, when the edges are already available from the face-loops.
2013-05-18 19:18:55 +00:00
ef40cdc167 Fix crash due to shared paint cursor function. It is necessary to check
if we really are in sculpt mode context since the active object may be
in sculpt mode while cursor is in the 2d paint editor.
2013-05-18 15:51:40 +00:00
1c314aae73 Fix for #35373, calling any paint operator from operator search menu
with mouse crashes blender.

Issue here is that paint operator invocation, immediately calls modal,
which checks if event is the same as initialization event plus keyup.
Since using the mouse on amenu calls the operator on mouse button up,
the operator ended immediately and that cause immediate cleanup and
crash,

Worked around this by forbidding the operator to finish on first modal
call (which is expected by all the asserts on invoke anyway). This
prevents the crash but requires an extra up event to end.

Also, ported part of Jason Wilkins' patch to stroke code to allow for
stroke sampling to be done before a dab is first performed and as soon
as the stroke begins
2013-05-18 15:24:25 +00:00
040279679c Comment out coordinates mapping made in rev55469
Such mapping only worked foe compositor output node
(with some issues btw) and failed dramatically for
nodes like previews and viewers.

For now let's behave the same way as border+crop
worked in 2.66 for until proper feature support
is ready (which could take some time).

Fixes #35313: object and ID anti-aliased masks get messed up
              when using border render + crop
2013-05-18 12:21:01 +00:00
ac2fa65dd9 style cleanup 2013-05-18 11:37:49 +00:00
423ffa6043 Painting / Sculpting: more tweaks to pressure sensitivity
* Also do pressure interpolation for brush size and spacing.
* Do smoothing of pressure when smooth stroke and sample average is enabled.
* Revert the OS X specific pressure change to pressure ^ 2.5, for low pressure
  values like 0.05 it makes the pressure 100x lower, which is problematic. If
  we need to adjust the pressure curve it should be done for all platforms.

Still weak:

* Pressure of first touch on tablet is difficult to control, usually it's low
  which makes the stroke start out small or soft, but other times not. Finer
  event capturing at ghost level would help, along with pressure changes without
  mouse movement, but this may also need different paint stroke logic.
* Brush radius is rounded to integers, this gives noticeable stepping.
* Brush falloff is not antialiased, gives noticeable aliasing for small brush
  sizes which was always a problem, but is more common with size pressure control.
2013-05-18 11:25:24 +00:00
f314ff02bd Fix #35390: sequencer end frame of preview range was not drawing correct. 2013-05-18 10:24:38 +00:00
11186184aa Fix #35404: crash in file save with python code that accesses mesh from panel.
On file save the mesh gets loads from the editmesh but the derived mesh caches
wer not cleared. This usually happens through the depsgraph but it needs to be
done manually here. Most changes are some refactoring to deduplicate derived
mesh freeing code.
2013-05-18 10:24:34 +00:00
8da43c5aaf Stroke code:
* Fix crash on 2d painting when no active object is present (NULL
pointer dereference in cursor drawing)
* Skip conditional on space_stroke function, since this is already
checked for on higher level.
* Interpolate pressure on spaced strokes.
2013-05-18 09:44:30 +00:00
a554a031f1 bump to version '2.67a' 2013-05-18 08:47:34 +00:00
d6d82a95f5 rigidbody: Add missig notifiers for add/remove operators
Fixes [#35403] Highlight not updating instantly when removing from Rigid body
2013-05-17 18:34:13 +00:00
d3a6c0c834 Smoke simulator: Add flow subframes and ability to set custom particle size.
Previously it was nearly impossible to have fast moving objects emitting smoke or they would just leave behind a row of smoke poofs instead of continious stream of smoke. Now it's possible to set number of subframes for each smoke flow.

Another new thing is ability to set size of smoke flow particles instead of using closest smoke cell. This also works with my earlier "full sample" commit, so no more blocky particles either. :)

For more info check my blog post: http://www.miikahweb.com/en/blog/2013/05/17/blender-smoke-subframes

This commit also includes couple of fixes I spotted while testing:
* Fix: dissolve was applied at different time for low res and high res simulations.
* Fix: full sample setting didn't get copied with domain.
2013-05-17 17:45:37 +00:00
c70a900736 More work on 3d view render:
- reverted fix for bug 32537 (error report drawing after thread job didn't show)

  This solves very bad 3d view render updates while using transform, it was
  getting into an eternal feedback loop for dependencies. (jobs sending mousemoves
  causing jobs to end, causing mousemoves, causing etc).
  
- The render-update code was not going over all windows, but over every screen to
  send signals (also the invisble ones)
2013-05-17 16:46:59 +00:00
bbec4c94f9 Fix for #35390 fix: sequencer scene start/end still did not display when they are equal. 2013-05-17 16:37:47 +00:00
ebda20150d fix for crash with toggle-drag on a popup (when the popup is closed while dragging). 2013-05-17 13:54:44 +00:00
e2f58d817a Bug fix, own collection.
Shapekey drivers were executed for every call to derivedmesh, which shouldn't happen.
It now only runs on the object_update() function, once for every depsgraph change.

Error was found while testing preview render in viewport. On each render, the
animsys sent a 'changed data' because of the shapekey drivers being called,
causing eternal re-render loops (without showing anything).
2013-05-17 13:15:43 +00:00
27baa34ba4 Fix #35369: Crop node or FileOutput node bug.
Issue was caused by file output node actually,

The thing here is, compositor output does have fixed
resolution and we could predict how to map coordinates
for border and cropping in that case.

But viewers and file output nodes are currently totally
depending on an input resolution. Could not see how
border could be applied reliably in this cases.

Disabling border option for file output node, so
now it shall behave the same way as it was before.

Discovered issues when using cropping to render border,
namely there's an offset in viewer nodes and previews,
but this is separate issue i guess (file output seems
to work fine). Will revisit this issue in next days.
2013-05-17 13:02:03 +00:00
88d1067f58 code cleanup: use BM_elem_flag_test rather then accessing 'ele->head.hflag' 2013-05-17 12:43:58 +00:00
43748eca2d ignore hidden edges for bmesh grid-fill. 2013-05-17 12:26:14 +00:00
b73c821b5d fix for BM_mesh_edgeloops_find(), could give edge loops with one vert. (caused bridge to crash sometimes) 2013-05-17 12:11:34 +00:00
f79e190307 fix for error in bridge tool, using freed faces from bmo input. 2013-05-17 12:05:07 +00:00