Campbell Barton [Mon, 16 Oct 2017 10:58:51 +0000 (21:58 +1100)]
WM: refactor gestures for use as tools
Border and circle select wait for input by default.
This commit uses bool properties on the operators instead of
magic number (called "gesture_mode").
Keymaps that define 'deselect' for border/circle select
begin immediately, exiting when on button release.
Campbell Barton [Mon, 16 Oct 2017 11:20:34 +0000 (22:20 +1100)]
Fix T53054: Parentless bone + IK crashes
Campbell Barton [Mon, 16 Oct 2017 06:01:28 +0000 (17:01 +1100)]
Cleanup: modal operator border callback names
Use same convention as all others.
Remove 'select' since these are used for zoom as well.
Campbell Barton [Mon, 16 Oct 2017 05:35:22 +0000 (16:35 +1100)]
WM: store modal operator last-properties
Avoids modal operators needing to explicitly store them.
Campbell Barton [Mon, 16 Oct 2017 05:11:04 +0000 (16:11 +1100)]
WM: Don't save mouse-paths to operator history
In preparation for modal operators storing their properties,
no need to keep mouse-paths around.
Also use generic function for lasso properties.
Campbell Barton [Mon, 16 Oct 2017 04:32:09 +0000 (15:32 +1100)]
WM: remove hard-coded circle radius memory
Replace with operator type 'last_properties'.
Also use generic function for circle gesture properties.
Campbell Barton [Mon, 16 Oct 2017 03:19:03 +0000 (14:19 +1100)]
Event System: Prevent mouse motion in click events
Don't convert mouse button events to click if they include dragging.
Double-click events already checked for this.
Campbell Barton [Mon, 16 Oct 2017 02:18:50 +0000 (13:18 +1100)]
Cleanup: simplify lasso reallocation
Remove unneeded define, double allocations when increasing.
Campbell Barton [Mon, 16 Oct 2017 02:01:09 +0000 (13:01 +1100)]
Cleanup: rename gesture mode to is_active
Wasn't obvious what this did at a glance.
Brecht Van Lommel [Fri, 13 Oct 2017 17:36:10 +0000 (18:36 +0100)]
Code cleanup: deduplicate primitive refit code.
Bastien Montagne [Sun, 15 Oct 2017 18:38:29 +0000 (20:38 +0200)]
Fix bad 'poll' prop callback API doc.
This was added to all prop types, when it is only available for Pointer ones.
Brecht Van Lommel [Sun, 15 Oct 2017 15:40:01 +0000 (17:40 +0200)]
Fix OpenCL performance regression after cubic interpolation.
Reorganize code to reduce register pressure.
Campbell Barton [Sat, 14 Oct 2017 08:22:44 +0000 (19:22 +1100)]
Edit Mesh/Curve: Median center for click extrude
Was using bound-box center which depends on rotation.
Bastien Montagne [Sat, 14 Oct 2017 08:07:02 +0000 (10:07 +0200)]
Add some basic 4K render presets.
This difinition is becomming rather common now, time to add it to our
collection imho (requested in T53064).
Campbell Barton [Sat, 14 Oct 2017 07:43:02 +0000 (18:43 +1100)]
Edit Mesh: click extrude, ensure inverse matrix
Relied on this being set elsewhere which isn't assured.
Campbell Barton [Sat, 14 Oct 2017 06:54:43 +0000 (17:54 +1100)]
Correct bezier curve assert
Bezier curves should have v-points zero'd.
Campbell Barton [Sat, 14 Oct 2017 06:29:54 +0000 (17:29 +1100)]
Cleanup: use const for events
Julian Eisel [Fri, 13 Oct 2017 23:07:31 +0000 (01:07 +0200)]
Hide "Confirm on Release" button from transfor redo options
Hide-flag wasn't set so option shows up in keymap editor. But seems like
that flag is ignored there by now anyway.
Bastien Montagne [Thu, 12 Oct 2017 13:54:43 +0000 (15:54 +0200)]
Fix T53052: ID decrement error when deleting a scene, either python or GUI.
User count of scenes was inconsistant, screens only have 'user_one' kind
of owning over scenes, which means they shall never increment or
decrement their real user count. And usually, scenes have no real user
at all.
Bastien Montagne [Thu, 12 Oct 2017 12:43:45 +0000 (14:43 +0200)]
Fix T52999: floating (popup) panels/menus could jump around screen in some cases.
Would happen during panel's refresh drawing, if drawing code had to adjust
final panel position compared to the initial one computed based on the
mouse coordinates, and user had dragged the floating panel around.
Issue fixed by adjusting stored mouse coordinates once final panel
position is known, such that they would directly generate those
coordinates. that way, the basic offset applied to those stored mouse
coordinates during panel dragging is valid, and recreating panel based
on those won't make it jump in screen.
Note that panel will still jump in case user dragged it partially out of
view - we could prevent that, but imho it's better to keep that
behavior, since redraw can generate a popup of different size, which
could end up with a totally out-of-view one...
Hopefully this fix does not break anything else!
Campbell Barton [Thu, 12 Oct 2017 11:46:04 +0000 (22:46 +1100)]
Docs: add note for bmesh face_split_edgenet
Sergey Sharybin [Wed, 11 Oct 2017 10:21:26 +0000 (15:21 +0500)]
Fix T53048: OSL Volume is broken in Blender 2.79
Was a mistake in optimization commit which was disconnecting closures and nodes
which does not make sense for volume output.
OSL script we can't ignore and can't currently know in advance if it's a proper
volume shader or not. So we never disconnect OSL nodes from volume output.
This is a good candidate for corrective release.
Sergey Sharybin [Fri, 25 Aug 2017 20:26:04 +0000 (22:26 +0200)]
Cycles: Speedup up tangent space calculation
This patch goes away form using C++ RNA during tangent space calculation which
avoids quite a bit of overhead. Now all calculation is done using data which
already exists in ccl::Mesh. This means, tangent space is now calculated from
triangles, which doesn't seem to be any different (at least as far as regression
tests are concerned).
One of the positive sides is that this change makes it possible to move tangent
space calculation from blender/ to render/ so we will have Cycles standalone
supporting tangent space.
Reviewers: brecht, lukasstockner97, campbellbarton
Differential Revision: https://developer.blender.org/D2810
Sergey Sharybin [Tue, 10 Oct 2017 08:12:06 +0000 (13:12 +0500)]
Cycles: Add utility function to calculate triangle's normal
Sergey Sharybin [Fri, 25 Aug 2017 20:51:44 +0000 (22:51 +0200)]
Cycles: Add utility function to remove given attribute
Sergey Sharybin [Wed, 11 Oct 2017 07:48:19 +0000 (12:48 +0500)]
Cycles: Fix possible race condition when initializing devices list
Sergey Sharybin [Tue, 10 Oct 2017 14:58:37 +0000 (19:58 +0500)]
Cycles tests: Don't proint braces for empty status
Campbell Barton [Tue, 10 Oct 2017 12:23:53 +0000 (23:23 +1100)]
Fix T53040: Vertex paint, texure & symmetry fail
Removed old logic for brush texture which was being applied twice.
Campbell Barton [Tue, 10 Oct 2017 11:32:30 +0000 (22:32 +1100)]
Vertex Paint: add back missing VertProjHandle free
Also avoid passing large struct as value.
Campbell Barton [Tue, 10 Oct 2017 09:25:11 +0000 (20:25 +1100)]
Correct logic for vertex paint smear
Swapping gave values from the state before the last.
Thanks to @angavrilov for spotting.
Campbell Barton [Tue, 10 Oct 2017 08:49:31 +0000 (19:49 +1100)]
Fix Sculpt 2D falloff, missing brush caused crash
Sergey Sharybin [Tue, 10 Oct 2017 07:26:02 +0000 (12:26 +0500)]
Cycles: Fix compilation of sm_20 and sm_21 kernels
Was broken since the bicubic commit for GPU support.
Campbell Barton [Mon, 9 Oct 2017 15:43:56 +0000 (02:43 +1100)]
Recent check for navigation missed NULL check
Aaron Carlisle [Mon, 9 Oct 2017 02:47:05 +0000 (13:47 +1100)]
UI: VSE strip menu reorganization
Add Inputs and Transform submenus.
Brecht Van Lommel [Sun, 8 Oct 2017 17:08:44 +0000 (19:08 +0200)]
Cycles: schedule more work for non-display and compute preemption CUDA cards.
This change affects CUDA GPUs not connected to a display or connected to a
display but supporting compute preemption so that the display does not
freeze. I couldn't find an official list, but compute preemption seems to be
only supported with GTX 1070+ and Linux (not GTX 1060- or Windows).
This helps improve small tile rendering performance further if there are
sufficient samples x number of pixels in a single tile to keep the GPU busy.
Mathieu Menuet [Sun, 8 Oct 2017 16:20:55 +0000 (18:20 +0200)]
Fix T53017: Cycles not detecting AMD GPU when there is an NVidia GPU too.
Best guess is that cuInit() somehow interferes with the AMD graphics driver
on Windows, and switching the initialization order to do OpenCL first seems
to solve the issue.
Bastien Montagne [Sun, 8 Oct 2017 14:08:00 +0000 (16:08 +0200)]
Fix potential string buffer overruns.
Note that our library path handling is still rather dodgy on this
regards, shall take some time at some point to seriously sanitize it...
Brecht Van Lommel [Sun, 8 Oct 2017 02:32:25 +0000 (04:32 +0200)]
Code refactor: use DeviceInfo to enable QBVH and decoupled volume shading.
Campbell Barton [Sun, 8 Oct 2017 07:46:26 +0000 (18:46 +1100)]
Cleanup: --help text
Sync with manual
Campbell Barton [Sun, 8 Oct 2017 03:00:42 +0000 (14:00 +1100)]
CMake: Re-order PYTHON_VERSION check
Missing paths would error first.
Brecht Van Lommel [Sun, 8 Oct 2017 00:36:05 +0000 (02:36 +0200)]
Cycles: OpenCL bicubic and tricubic texture interpolation support.
Brecht Van Lommel [Sat, 7 Oct 2017 19:43:36 +0000 (21:43 +0200)]
Fix incorrect MIS with principled BSDF and specular roughness 0.
Ray Molenkamp [Sat, 7 Oct 2017 13:57:19 +0000 (07:57 -0600)]
[cmake] Add minimum python version check to cmake to prevent later build errors.
Brecht Van Lommel [Sat, 7 Oct 2017 12:08:02 +0000 (14:08 +0200)]
Code cleanup: simplify cmake kernel install.
Brecht Van Lommel [Sat, 7 Oct 2017 00:15:12 +0000 (02:15 +0200)]
Cycles: CUDA bicubic and tricubic texture interpolation support.
While cubic interpolation is quite expensive on the CPU compared to linear
interpolation, the difference on the GPU is quite small.
Brecht Van Lommel [Fri, 6 Oct 2017 19:47:41 +0000 (21:47 +0200)]
Code refactor: make texture code more consistent between devices.
* Use common TextureInfo struct for all devices, except CUDA fermi.
* Move image sampling code to kernels/*/kernel_*_image.h files.
* Use arrays for data textures on Fermi too, so device_vector<Struct> works.
Alexander Gavrilov [Sat, 7 Oct 2017 10:53:54 +0000 (13:53 +0300)]
Actually force accumulate mode for the Smear brush in weight/vertex paint.
Just removing the checkbox from UI isn't enough for proper behavior.
Alexander Gavrilov [Sat, 7 Oct 2017 09:45:21 +0000 (12:45 +0300)]
Make weight paint blur thread safe, and fix smear ignoring mirror.
Instead of trying to be clever with swaps and lazy updating the weight
data, simply recalculate one single array. To improve performance, use
threading for that.
Sergey Sharybin [Fri, 6 Oct 2017 16:06:15 +0000 (21:06 +0500)]
Cycles: Fix possible race condition when generating Beckmann table
Two issues here:
- Checking table size to be non-zero is not a proper way to go here. This is
because we first resize the table and then fill it in. So it was possible that
non-initialized table was used.
Trickery with using temporary memory and then doing table.swap() might work,
but we can not guarantee that table size will be set after the data pointer.
- Mutex guard was useless, because every thread was using own mutex. Need to
make mutex guard static so all threads are using same mutex.
Sergey Sharybin [Fri, 6 Oct 2017 14:33:59 +0000 (19:33 +0500)]
Cycles: Cleanup, indendation
Sergey Sharybin [Fri, 6 Oct 2017 12:27:34 +0000 (17:27 +0500)]
Fix T53012: Shadow catcher creates artifacts on contact area
The issue was caused by light sample being evaluated to nan at some point.
This is root of the cause which is to be fixed, but is very hard to trace down
especially via ssh (the issue only happens on AVX2 release build). Will give it
a closer look when back to my AVX2 machine.
For until then this is a good check to have anyway, it corresponds to what's
happening in regular radiance sum.
Sergey Sharybin [Fri, 6 Oct 2017 11:54:37 +0000 (16:54 +0500)]
Cycles: Cleanup, indentation and wrapping
Campbell Barton [Fri, 6 Oct 2017 10:05:34 +0000 (21:05 +1100)]
Cleanup: Math lib naming (use v3 suffix)
Sergey Sharybin [Fri, 6 Oct 2017 10:00:22 +0000 (15:00 +0500)]
Sequencer: Cleanup, use more BLI utilities where possible
Sergey Sharybin [Fri, 6 Oct 2017 09:36:26 +0000 (14:36 +0500)]
Sequencer: Use BLI math functions where possible
Sergey Sharybin [Fri, 6 Oct 2017 09:32:17 +0000 (14:32 +0500)]
Sequencer: Avoid re-calculation index offset multiple times
Sergey Sharybin [Fri, 6 Oct 2017 09:25:37 +0000 (14:25 +0500)]
Sequencer: Use funciton instead of macr oto avoid argument re-evaluation
Sergey Sharybin [Fri, 6 Oct 2017 09:20:03 +0000 (14:20 +0500)]
Fix T52940: VSE Glow Effect Strip on transparent images has no blur
Campbell Barton [Fri, 6 Oct 2017 09:20:15 +0000 (20:20 +1100)]
Error in falloff_angle range in last commit
Campbell Barton [Fri, 6 Oct 2017 09:11:17 +0000 (20:11 +1100)]
Vertex Paint: move normal falloff into the brush
All related settings are already in the brush,
so it's inconvenient to switch panels to change this one option.
Campbell Barton [Fri, 6 Oct 2017 08:10:33 +0000 (19:10 +1100)]
Vertex Paint: use view normal w/ 2D falloff
When projecting to the view, cull faces pointing
away from the view normal.
Campbell Barton [Fri, 6 Oct 2017 07:57:37 +0000 (18:57 +1100)]
Vertex Paint: use brush front-face setting
Follow sculpt mode more closely by using the brush front-face option.
Campbell Barton [Fri, 6 Oct 2017 07:29:54 +0000 (18:29 +1100)]
Sculpt: use tube falloff when calculating normals
Also apply 2D clamping for other tools when the option is set.
Campbell Barton [Fri, 6 Oct 2017 06:38:56 +0000 (17:38 +1100)]
Sculpt: clamp normal to plane w/ projected falloff
Allows for editing outlines w/o pushing geometry towards/away from
the view.
Campbell Barton [Fri, 6 Oct 2017 06:12:25 +0000 (17:12 +1100)]
Fix ruler access from search pop-up
D2831 by @1xundoredo
Campbell Barton [Fri, 6 Oct 2017 05:56:41 +0000 (16:56 +1100)]
Cleanup: style
Brecht Van Lommel [Thu, 5 Oct 2017 22:18:57 +0000 (00:18 +0200)]
Fix T52514: don't clear filename when dropping directory path in file browser.
Brecht Van Lommel [Thu, 5 Oct 2017 15:46:22 +0000 (17:46 +0200)]
Fix T52998: disabled menu entries responding to key shortcuts.
Bastien Montagne [Thu, 5 Oct 2017 16:12:10 +0000 (18:12 +0200)]
Fix T53002: Batch-Generate Previews generate empty or none image for large objects.
Camera clipping was left to default values, which won't work well for
very large (or small) objects. Now recompute valid clipping start/end
based on boundingbox of rendered data, and final location of camera.
Brecht Van Lommel [Thu, 5 Oct 2017 14:41:41 +0000 (16:41 +0200)]
Fix T53001: more workarounds for crash in AMD compiler with recent drivers.
Brecht Van Lommel [Thu, 5 Oct 2017 13:17:09 +0000 (15:17 +0200)]
Code refactor: split displace/background into separate kernels, remove luma.
Campbell Barton [Thu, 5 Oct 2017 13:18:11 +0000 (00:18 +1100)]
Sculpt Mode: 2D falloff option
This makes brush influence into a tube instead of a sphere.
It can be used along the outline of a mesh to adjust it's silhouette.
Note that all this takes advantage of changes from vertex paint,
from testing this seems useful so exposing from the brush options.
Campbell Barton [Thu, 5 Oct 2017 10:16:25 +0000 (21:16 +1100)]
Vertex Paint: apply when cursor isn't over faces
This behavior makes more sense for sculpt, less so for painting.
Restores non PBVH behavior, adding `BKE_pbvh_find_nearest_to_ray` -
similar to ray-cast except it finds the closest point on the surface.
Campbell Barton [Thu, 5 Oct 2017 10:06:04 +0000 (21:06 +1100)]
Cleanup: rename dist -> depth
Prepare to add code that stores distance to the ray, avoid confusion.
Campbell Barton [Thu, 5 Oct 2017 06:52:05 +0000 (17:52 +1100)]
Cleanup: remove unused struct member
Merged with soc-2016-pbvh-painting, no longer needed.
Campbell Barton [Thu, 5 Oct 2017 06:35:46 +0000 (17:35 +1100)]
Disable cursor drawing while navigating
Was performing ray-casts in sculpt mode on every update.
Campbell Barton [Thu, 5 Oct 2017 01:57:24 +0000 (12:57 +1100)]
Fix sculpt secondary color missing some brushes
D2841 by @uvwxyz w/ edits
Campbell Barton [Thu, 5 Oct 2017 01:51:36 +0000 (12:51 +1100)]
Cleanup: use bool for brush checks
Campbell Barton [Thu, 5 Oct 2017 01:32:24 +0000 (12:32 +1100)]
Fix brush reset (missing notifier)
D2843 by @uvwxyz
Campbell Barton [Thu, 5 Oct 2017 01:08:17 +0000 (12:08 +1100)]
CMake: use restrict w/ gcc, not clang
Campbell Barton [Wed, 4 Oct 2017 23:52:18 +0000 (10:52 +1100)]
PyAPI: fast keyword parsing for bpy modules
No functional changes.
Campbell Barton [Wed, 4 Oct 2017 23:50:02 +0000 (10:50 +1100)]
CMake: add -Wrestrict for GCC
Campbell Barton [Wed, 4 Oct 2017 23:47:08 +0000 (10:47 +1100)]
Fix passing the same argument twice to BLI_strncpy
Campbell Barton [Wed, 4 Oct 2017 23:46:26 +0000 (10:46 +1100)]
Fix setting the operator name in Py operator API
Brecht Van Lommel [Wed, 4 Oct 2017 21:25:51 +0000 (23:25 +0200)]
Fix incorrect CUDA remaining time estimate after previous commit.
Brecht Van Lommel [Tue, 26 Sep 2017 23:38:19 +0000 (01:38 +0200)]
Cycles: CUDA faster rendering of small tiles, using multiple samples like OpenCL.
The work size is still very conservative, and this doesn't help for progressive
refine. For that we will need to render multiple tiles at the same time. But this
should already help for denoising renders that require too much memory with big
tiles, and just generally soften the performance dropoff with small tiles.
Differential Revision: https://developer.blender.org/D2856
Brecht Van Lommel [Tue, 3 Oct 2017 22:28:32 +0000 (00:28 +0200)]
Fix use of uninitialized memory in Cycles normal baking.
Brecht Van Lommel [Wed, 27 Sep 2017 01:53:03 +0000 (03:53 +0200)]
Code refactor: zero render buffers outside of kernel.
This was originally done with the first sample in the kernel for better
performance, but it doesn't work anymore with atomics. Any benefit was
very minor anyway, too small to measure it seems.
Brecht Van Lommel [Tue, 26 Sep 2017 23:03:50 +0000 (01:03 +0200)]
Code refactor: use split variance calculation for mega kernels too.
There is no significant difference in denoised benchmark scenes and
denoising ctests, so might as well make it all consistent.
Brecht Van Lommel [Tue, 26 Sep 2017 22:39:53 +0000 (00:39 +0200)]
Code refactor: remove rng_state buffer and compute hash on the fly.
A little faster on some benchmark scenes, a little slower on others, seems
about performance neutral on average and saves a little memory.
Brecht Van Lommel [Tue, 26 Sep 2017 21:42:36 +0000 (23:42 +0200)]
Code refactor: add WorkTile struct for passing work to kernel.
This makes sharing some code between mega/split in following commits a bit
easier, and also paves the way for rendering multiple tiles later.
Brecht Van Lommel [Wed, 4 Oct 2017 18:45:20 +0000 (20:45 +0200)]
Fix T52645, T52645: AMD OpenCL compiler crash with recent drivers.
Work around the bug by reshuffling code.
Bastien Montagne [Wed, 4 Oct 2017 18:15:35 +0000 (20:15 +0200)]
installdeps: Fix building numpy with newer py system...
Many thanks to Jens Verwiebe for investigating and finding this fix.
Ray Molenkamp [Wed, 4 Oct 2017 17:44:22 +0000 (11:44 -0600)]
Fix T42489 and T52936: Loading blend with minimized window results in crash or empty screen on windows.
Reviewed By: @brecht , @sergey
Differential Revision: http://developer.blender.org/D2866
Campbell Barton [Wed, 4 Oct 2017 15:44:02 +0000 (02:44 +1100)]
Fix error copying smoke modifier uv layer
Bastien Montagne [Wed, 4 Oct 2017 10:42:33 +0000 (12:42 +0200)]
Tssst, we use USA english, not Oxford one... :P
Bastien Montagne [Wed, 4 Oct 2017 10:38:40 +0000 (12:38 +0200)]
Fix i18n messages extraction script, and a few more UI messages...
Sergey Sharybin [Wed, 4 Oct 2017 09:59:44 +0000 (14:59 +0500)]
Fix T52982: Join operator with context override crashes Blender 2.79
Campbell Barton [Wed, 4 Oct 2017 07:01:53 +0000 (18:01 +1100)]
Fix T52923: Circle diameter is in fact radius
Campbell Barton [Wed, 4 Oct 2017 05:44:45 +0000 (16:44 +1100)]
Cleanup: redundant casts