Commit Graph

65036 Commits

Author SHA1 Message Date
Campbell Barton
690063edb9 Fix T48897: Flatten brush fails on first stroke
The flatten brush depended on accumulate being disabled,
Adding dynotopo support for accumulate caused problems for this tool (see T44390).
Enable for existing files.
2016-07-20 13:54:55 +10:00
Germano Cavalcante
f2fa73786b possible fix for crash mentioned in T48887 - Adjust the depth min to the object scale 2016-07-19 22:25:13 -03:00
Campbell Barton
5f7fd0444d BMesh: improve BM_face_splits_check_legal
- remove edge scaling, instead avoid checking intersections with connected edges.
- replace local line intersection functions with BLI_math
- center the projection for more precise calculation.
2016-07-20 10:00:35 +10:00
Campbell Barton
6ff7a891e7 Update tracker URL
Also wrap line-length
2016-07-20 06:37:21 +10:00
Bastien Montagne
5f4a3785c6 Add 'reload' function to libraries' RNA API. 2016-07-19 17:49:33 +02:00
Gaia Clary
6921bb7a4a Improved warning message when creating empty export file 2016-07-19 16:34:22 +02:00
Bastien Montagne
b9e4e69a4d Fix (IRC reported by Sergey) assert regarding icon_id of newly copied datablocks.
BKE_previewimg_copy() would simply copy PreviewImage's icon_id, without bothering about
ID one.

When we duplicate an ID, we want to reset its icon_id to zero (and regenerate it on-demand),
not keep same icon_id as original, so added new BKE_previewimg_id_copy helper to handle that.
2016-07-19 16:27:40 +02:00
Bastien Montagne
eeedcf3892 Usual i18n/UI messages fixes... 2016-07-19 15:41:28 +02:00
Campbell Barton
307250723b Fix building on NetBSD 2016-07-19 22:04:14 +10:00
Sergey Sharybin
eac9d2d430 OpenSubdiv: Fix wrong shading in BI texture mode
This probably makes code somewhat slower, but we can't easily know
whether we can use a shortcut and only use directional lighting from
the scene.

Need some better integration between GPU and OpenSubdiv for that.
2016-07-19 12:49:37 +02:00
Sergey Sharybin
c883946441 OpenSubdiv: Fix broken structure alignment when using color material 2016-07-19 12:49:37 +02:00
Campbell Barton
d8de018398 update player stub 2016-07-19 19:31:27 +10:00
Campbell Barton
95da68822b Fix missing break in libblock relink 2016-07-19 10:27:37 +10:00
Campbell Barton
3948f65686 Cleanup: style, spelling 2016-07-19 10:27:33 +10:00
Campbell Barton
bd59206b5c Cleanup: style, spelling 2016-07-19 09:16:38 +10:00
Alexander Gavrilov
5234e9ddd3 Cycles: add ConstantFolder class for constant folding boilerplate.
Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D2089
2016-07-18 22:54:30 +02:00
Kévin Dietrich
10b0e33de1 Cycles: add support for motion blurring of fluid meshes.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2063
2016-07-18 22:40:08 +02:00
20ec6bc166 Fix Cycles kernel build without render passes support. 2016-07-18 22:40:08 +02:00
Campbell Barton
277cb12395 Fix T48874: Nested pop-up didn't update its parent 2016-07-19 06:01:56 +10:00
lazydodo
399c978a55 fix breakage caused by D2094 / rB404f41d22de46119ee8afb409011eb1ba1840092 2016-07-18 13:09:41 -06:00
Campbell Barton
ffe106a56a Docs: improve bpy.props.EnumProperty reference 2016-07-19 05:03:50 +10:00
Campbell Barton
a99dbb9aa0 Fix T48885: Wheel in image space changes wrong window 2016-07-19 02:46:12 +10:00
Campbell Barton
de0f371528 Fix missing release w/ mouse wheel over layer menu 2016-07-19 02:46:12 +10:00
Ray Molenkamp
404f41d22d [bf_intern_ghost/Windows] Cleanup
This patch addresses the following issues in bf_intern_ghost

```
Warning	C4312	'type cast': conversion from 'GHOST_TEmbedderWindowID' to 'HWND' of greater size	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_WindowWin32.cpp	179
Warning	C4312	'type cast': conversion from 'GHOST_TEmbedderWindowID' to 'HWND' of greater size	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_WindowWin32.cpp	198
```

GHOST_TEmbedderWindowID is defined as long, handles are however of pointer size,
so this should have been an issue when we moved to 64 bits, guess we got lucky.
fixed by turning GHOST_TEmbedderWindowID from long into void*

```
Warning	C4302	'reinterpret_cast': truncation from 'HKL' to 'LANGID'	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_ImeWin32.cpp	67
```

reinterpret_cast emits warnings on truncation, LOWORD does the job just
as well with no warnings.

```
Warning	C4838	conversion from 'int' to 'DWORD' requires a narrowing conversion	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_ContextWGL.cpp	734
Warning	C4838	conversion from 'int' to 'BYTE' requires a narrowing conversion	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_ContextWGL.cpp	734
```

Weird warning, it does a really bad job at telling you what parameter is
causing the warning , tuns out there's a bunch of parameters that cause it
but it still only yields a single warning, the problem is that every
(somevar ? a : b) construct results in an integer type. which needs to be
properly cast to get rid of the warning.

```
Warning	C4996	'GetVersionExA': was declared deprecated	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_WindowWin32.cpp	105
Warning	C4996	'GetVersionExA': was declared deprecated	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_WindowWin32.cpp	107
```

The warning was clear, the code not as much. The version check in place
here is quite convoluted and could be replaced by including VersionHelpers.h
and calling IsWindows7OrGreater, However, CreateInstance will just return NULL
in m_Bar if the interface is not supported, so the whole check is useless.
This however did require that the CreateInstance call actually asked for
ITaskbarList3 and not ITaskBarlist . (You're not really allowed to assign
different interface types to each-other, a roundtrip through QueryInterface
is required there, we were violating spec here by asking for ITaskBarlist and
storing it in ITaskbarList3*  )

Reviewers: sergey

Reviewed By: sergey

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2094
2016-07-18 15:48:51 +02:00
Sergey Sharybin
a76e69f5f7 Additional Waveform Drawing Mode
This diff adds a 6th drawing mode to the Waveform Scope.

The new mode shows the RGB colour channels overlaid as a "Full colour" waveform.

The old "Red Green Blue" mode is renamed "Parade" which is the standard industry
term for RGB channels shown side-by-side.

This full colour style of waveform is very much more useful for colour grading than the
Parade mode and is the default waveform for many artists.

Files from older Blender versions which show scopes open as expected.

Patch by John Cox (johnedwardcox), thanks!

Reviewers: sergey

Reviewed By: sergey

Subscribers: campbellbarton, tmw, Blendify

Differential Revision: https://developer.blender.org/D1936
2016-07-18 15:42:21 +02:00
Ray Molenkamp
3e882c91e0 [MSVC2015/Cycles] MSVC2015 before update 3 produce invalid builds
I'm not quite sure where the codegen bug gets triggered but it's easily
noticeable in the barcelona scene. (extra saturated leafs and illumination
on the right ledge of the pool)

2013 buildbot reference image:
{F320792}

2015 With no updates (compiler version 19.00.23026)
{F320793}

2015 With Update 2 (Compiler version 19.00.23918)
{F320794}

2015 With Update 3 (Compiler version 19.00.24210)
{F320795}

This patch blocks all compiler builds before update 3 in a similar way we
did for msvc 2013 update 4

Reviewers: campbellbarton, brecht, juicyfruit

Reviewed By: juicyfruit

Tags: #bf_blender

Differential Revision: https://developer.blender.org/D2100
2016-07-18 15:26:52 +02:00
Ray Molenkamp
6239afd36f [MSVC/LNK4199/Cleanup] Delay loading is causing linker warnings.
We recently added delay-loading of the openmp dll's so we no longer had to use
the stub loader, we however put these linker flags on the global linker flags
causing any sub projects not using openmp to spit linker warning 4199 while building,

```
Warning	LNK4199	/DELAYLOAD:vcomp140.dll ignored; no imports found from vcomp140.dll	datatoc	k:\BlenderGit\build_windows_2015a\source\blender\datatoc\LINK	1
```

This patch makes the delay-load only apply to the blender project.

Reviewers: sergey

Subscribers: sergey

Tags: #bf_blender

Differential Revision: https://developer.blender.org/D2092
2016-07-18 15:20:29 +02:00
Bastien Montagne
65e7caf950 Fix (unreported) ED_region_tag_redraw_partial() could override a previously defined partial redraw, instead of extending it.
Probably not an issue currently, since partial redraw is not much used
(only from sculpt code and box-rendering it seems?), but logic was broken here.
2016-07-18 14:41:56 +02:00
Sergey Sharybin
bbc1507871 Fix T48848: Cycles - Camera Culling - Camera Culling removes objects which are still in frame 2016-07-18 14:29:37 +02:00
Campbell Barton
6533d72056 Fix T48877: Lightmap Pack fails w/ 1-3 faces
Unnecessary limit was applied.
2016-07-18 19:44:51 +10:00
Campbell Barton
d42cb44ea2 CMake: correct py-module on OSX 2016-07-18 19:30:32 +10:00
Sergey Sharybin
9946cca146 Fix T48860: Cycles SSS artifacts with spatially split BVH
The issue was caused by SSS intersection code gathering all
intersections without check for duplicated ones. This caused
situations when same intersection will be recorded twice in
the case if triangle is shared by several BVH nodes.

Usually this is handled by checking intersection distance
after sorting intersections (in shadow_blocked for example)
but for SSS we don't do such sorting and using number of
intersections to calculate various things.

Didn't find anything smarter than to check intersection
distance in triangle_intersect_subsurface().

This solves render artifacts in the cost of 1.5% slowdown
of extreme case rendering (SSS object filling in whole
FullHD screen).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2105
2016-07-18 10:04:20 +02:00
Lukas Stockner
a2c82f5e5d Cycles: Fix OpenCL compilation after the recent numerical fixes 2016-07-17 19:24:53 +02:00
Campbell Barton
c974def837 BLI_heap: replace memarena w/ local allocator
- Since element size its known it's less work to do inline.
- In test with high-poly model, gave ~9% overall speedup for decimate modifier.
2016-07-17 19:29:30 +10:00
Campbell Barton
c57d823683 Cleanup: minor edits to BLI_heap 2016-07-17 19:29:30 +10:00
Lukas Stockner
d9281a6332 Cycles: Fix three numerical issues in the fresnel, normal map and Beckmann code
- In fresnel_dielectric, the differentials calculation sometimes divided by zero.
- When the normal map was (0.5, 0.5, 0.5), the code would try to normalize a zero vector. Now, it just uses the regular normal as a fallback.
- The approximate error function used in Beckmann sampling sometimes overflowed to inf while calculating r^16. The final value is 1 - 1/r^16, however,
  so now it just returns 1 if the computation would overflow otherwise.
2016-07-16 20:54:14 +02:00
Lukas Stockner
5ba78d76d4 Cycles: Deduplicate geometric factor calculation in the Beckmann distribution
Also, this fixes a numerical issue where A would be inf.
Since later G is set to 1 if A is larger than 1.6, the code now checks the reciprocal of A for being smaller than 1/1.6 - same effect, but no inf involved.
2016-07-16 20:54:14 +02:00
Campbell Barton
a40073ffcc Fix use after free error from ab993e37 2016-07-17 03:03:22 +10:00
Campbell Barton
c885cea7bb Cleanup: spelling 2016-07-16 17:48:57 +10:00
Campbell Barton
f0f9a87614 Cleanup: line length 2016-07-16 17:29:08 +10:00
Germano Cavalcante
4e9409c087 Use the value VIEW_PROJ_PERSP in the remaining places
also changes the name of the callbacks:
- walk_parent_snap_project_cb to cb_walk_parent_snap_project;
- cb_leaf_snap_vert to cb_walk_leaf_snap_vert;
- cb_leaf_snap_edge to cb_walk_leaf_snap_edge;
- test_vert_depth_cb to test_vert_ray_dist_cb;
- test_edge_depth_cb to test_edge_ray_dist_cb;

and cleanup:
2016-07-15 21:25:44 -03:00
Sergey Sharybin
ac061de20d Cycles: Fix refitting of regular BVH
Was causing CUDA issues on viewport edits.
2016-07-15 18:12:34 +02:00
Campbell Barton
69787cb7bd UI: modifier keys now trigger number button updates
Number buttons & sliders weren't updating when shift/ctrl were pressed.

Note that this is a regression in 2.77 but hard to track down since it worked unreliably for some time.
2016-07-16 01:20:16 +10:00
Sergey Sharybin
12cdc67d83 Bump maximum threads number to 1024
This commit contains all the changes required for most optimal maximum threads
number bump. This is needed to avoid possibly unneeded initialization or data
allocation on systems with lower threads count.

TODO: Still need to review arrays in render data structures from render_types.h,

P.S. We might remove actual bump of max threads from this patch, so when we'll
be applying the patch we can do all the preparation work and then do actual
bump of max threads.

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Maniphest Tasks: T43306

Differential Revision: https://developer.blender.org/D1343
2016-07-15 16:47:30 +02:00
Sergey Sharybin
6cd675af30 Cycles: Add option to disable new Hair BVH
While it's an extra option added to the interface which might not be
fully obvious for artists, it allows to save up to 20% of memory in
hairy scenes.

This is high enough memory saver in my opinion which might become
handy for some production files where it's more important to make
scene to fit into memory rather than trying to use more optimal BVH
structure but go into swap or crash.

Reviewers: dingto, brecht

Reviewed By: dingto, brecht

Differential Revision: https://developer.blender.org/D2090
2016-07-15 16:29:28 +02:00
Sandy Carter
b679767656 fix T48857: Improved the handling of Material Alpha, based on patch D1949 with some small modifications 2016-07-15 16:14:53 +02:00
Gaia Clary
27641b51e7 Collada: changed specification of material alpha from using transparency to using transparent with opaque=A_ONE 2016-07-15 16:14:51 +02:00
Sergey Sharybin
e3b79544be Re-initialize source/tools submodule 2016-07-15 15:12:51 +02:00
Campbell Barton
711fca1db5 missed from last commit 2016-07-15 20:00:18 +10:00
Campbell Barton
fafb8aaaf1 Object Snap: make normal argument optional
Often its not needed, setting correctly takes some extra calculation - so allow for it to be left unset.
2016-07-15 19:46:59 +10:00