Commit Graph

47761 Commits

Author SHA1 Message Date
Thomas Dinges
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
Thomas Dinges
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
Campbell Barton
0fb5c9117f no need to add own define for openmp. 2013-05-20 14:38:43 +00:00
Thomas Dinges
19f11fc783 Cmake / Fluids:
* Possible fix for Fluid threads UI not being shown with cmake builds.
2013-05-20 14:00:19 +00:00
Campbell Barton
7781312346 code cleanup: rename bmesh operator files to be more consistent 2013-05-20 07:38:11 +00:00
Campbell Barton
5cdddb12d9 fix [#35434] Segmentation fault switching screen layout from python 2013-05-20 05:06:52 +00:00
Thomas Dinges
289ca57e7a Code Cleanup / Cycles:
* Remove an unused parameter from Checker texture and correct a typo in license header.
2013-05-20 00:26:48 +00:00
Campbell Barton
51f04bf7b8 code cleanup: remove unneeded elements in uv NearestHit. 2013-05-19 18:05:34 +00:00
Campbell Barton
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
Campbell Barton
12eb88788d code cleanup: remove some kludge from uv loop select 2013-05-19 17:20:10 +00:00
Campbell Barton
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
Campbell Barton
bf9ddfe86a remove WITH_AVX_CPU, also used add_definitions incorrectly.
single cflags can be added manually and don't need their own options.
2013-05-19 16:47:41 +00:00
Campbell Barton
eacb629c72 style cleanup 2013-05-19 15:11:25 +00:00
Campbell Barton
ae0220332e code cleanup: simplify fast_ray_nearest_hit() 2013-05-19 15:03:36 +00:00
Campbell Barton
6adec303db revert (ifdef) r54745. which enbabled alpha in the GL buffer.
looks to be the cause of bug [#35415]

we can make this optional.
2013-05-19 11:39:22 +00:00
Gaia Clary
196f7f0f1f fix memory corruption: allocated memory space did not match the needed space 2013-05-19 09:45:53 +00:00
Campbell Barton
61dafba0bc fix for mistake in r56903 2013-05-19 08:46:17 +00:00
Brecht Van Lommel
3b2256f9af Fix for last fix, compile error in smoke code. 2013-05-19 04:12:00 +00:00
Brecht Van Lommel
0abe993435 Fix #35407: different particle behavior compared to 2.66, reverted part of 56073. 2013-05-19 04:07:01 +00:00
Mitchell Stokes
76ee6d3fc5 BGE: Applying patch [#35416] "Missing python properties on ActionActuator: layer, layerWeight" from Florian Bantner (scheintodx). 2013-05-19 03:15:50 +00:00
Tamito Kajiyama
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
Thomas Dinges
d12a5d8d63 Cycles:
* Fix OSL compilation for scene_intersect(), when __Hair__ was disabled.
2013-05-18 22:40:21 +00:00
Campbell Barton
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
Antony Riakiotakis
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
Antony Riakiotakis
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
Thomas Dinges
eaf493d323 Cycles / OSL:
* Added Westin Sheen and Westin Backscatter closures for testing, useful for Cloth like effects. 

Only available via OSL, added an example OSL shader to the Templates (Text Editor).
2013-05-18 14:36:03 +00:00
Sergey Sharybin
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
Campbell Barton
ac2fa65dd9 style cleanup 2013-05-18 11:37:49 +00:00
Brecht Van Lommel
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
Thomas Dinges
75e36650e3 Code cleanup / Cycles:
* Simplify shaperadius() function a bit to avoid castings.
* Style cleanup 1.f -> 1.0f, to follow rest of Cycles code.
2013-05-18 11:04:29 +00:00
Brecht Van Lommel
f314ff02bd Fix #35390: sequencer end frame of preview range was not drawing correct. 2013-05-18 10:24:38 +00:00
Brecht Van Lommel
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
Antony Riakiotakis
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
Campbell Barton
a554a031f1 bump to version '2.67a' 2013-05-18 08:47:34 +00:00
Sergej Reich
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
Miika Hamalainen
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
Ton Roosendaal
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
Brecht Van Lommel
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
Campbell Barton
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
Ton Roosendaal
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
Sergey Sharybin
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
Campbell Barton
88d1067f58 code cleanup: use BM_elem_flag_test rather then accessing 'ele->head.hflag' 2013-05-17 12:43:58 +00:00
Campbell Barton
43748eca2d ignore hidden edges for bmesh grid-fill. 2013-05-17 12:26:14 +00:00
Campbell Barton
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
Campbell Barton
f79e190307 fix for error in bridge tool, using freed faces from bmo input. 2013-05-17 12:05:07 +00:00
Ton Roosendaal
7b2172cb0b 3D Viewport rendering (Blender Internal)
Added incremental re-render on view changes. That means all data preprocessing
only needs to be done once on view changes, quite faster that way.

Also fixed a bug in raytracing strands with soft shadows, was wrongly changing
coordinates in a static array.

Note: proper signals for re-renders is still on the todo. Many button options
don't signal a re-render yet. Work around: press G+ESC for quick full renders.
2013-05-17 11:13:46 +00:00
Sergey Sharybin
a4e9edb674 Fix #35393: Sculpt Shortcuts are bananas.
Issue was introduced by self in svn rev56815.
Brushes list was simply not fully traversing
due to mistake in termination condition.
2013-05-17 11:08:50 +00:00
Brecht Van Lommel
79fc2ac845 Fix #35390: the verticel lines indicating scene start and end frame in the
sequencer now draw such that a strip that spans this time is contained just
between these lines.
2013-05-17 09:47:05 +00:00
Campbell Barton
04a9c0e28a bump mathutils callback slot size. 2013-05-17 07:10:40 +00:00
Bastien Montagne
9d567dd366 This commit addresses the somewhat weak handling of stackless textures in Blender with default (BI) renderer. To do so, it's defining an "other" texture context, and when in this one, it switches to using the "new shading" texture handling already known with Cycles engine.
So now, in the new "other" tex context, you can (depending on active data) have direct access to modifiers', force's or brushes' textures...

I also refactored a bit how texture contexts are handled (once again, we had some quite similar code in both space_buttons and RNA sources). This should also solve some harmless glitches like "no texture context selected in UI" sometimes when you remove data related to current texture (see e.g. after removing the material from default cube, in startup scene).

This usage of two different systems for textures, and the handling of switches between them, has been a bit tricky to get working right, but it is OK now I think. I also had to add a bool flag to buttons space, SB_TEX_USER_LIMITED (use_limited_texture_context in RNA), which indicates "new shading" texture code whether it has to ignore materials, lamps etc. (BI) or not (Cycles).

Btw, pinned textures from modifiers/force/etc. were also broken (showing nothing), now it should work too.

Thanks to Brecht for reviewing.
2013-05-17 07:10:10 +00:00