Commit Graph

75472 Commits

Author SHA1 Message Date
Sergey Sharybin
9bf3e0299b Subdiv: CCG, initial grids stitching implementation
Currently is only working on an "inner" grid boundaries.
Need to implement averaging across face edges.
2018-09-18 17:09:08 +02:00
Sergey Sharybin
41c039d6e9 Subdiv: CCG, evaluate final position for multires
This makes it so coordinates and normals for CCG are calculated
with mutires displacement taken into account. This solves issues
with multires displacement being lost when entering sculpt mode.

The missing part is averaging of normals along grid boundaries.
But even then sculpting shows decent results.

The plan to solve that would be to introduce function to stitch
grids, which can also be used by Smooth brush which requires
this.
2018-09-18 14:48:27 +02:00
Bastien Montagne
b6ff37ee67 Merge branch 'master' into blender2.8 2018-09-18 14:31:44 +02:00
Bastien Montagne
06fd94140c Fix T56833: "zoom to cursor" in Clip editor not handling aspect ratio.
Trivial fix, just using same code as in Image editor...
2018-09-18 14:31:05 +02:00
Clément Foucault
eafec6d4f7 GPUShader: Manually validate sampler count
This happens on NVidia GPUs, using more textures than the maximum allowed
by the gl will NOT trigger a linking issue (maybe because of bindless
texture implementation?).

So in this case we manually count the number of samplers per shader stage
and compare it against the GL limit. We discard the shader if the sampler
count is too high. This shows the user something is wrong with the shader.
2018-09-18 14:22:42 +02:00
Alexander Gavrilov
bf2a54b058 Support evaluating simple driver expressions without Python interpreter.
Recently @sergey found that hard-coding evaluation of certain very
common driver expressions without calling the Python interpreter
produces a 30-40% performance improvement. Since hard-coding is
obviously not suitable for production, I implemented a proper
parser and interpreter for simple arithmetic expressions in C.

The evaluator supports +, -, *, /, (), ==, !=, <, <=, >, >=,
and, or, not, ternary if; driver variables, frame, pi, True, False,
and a subset of standard math functions that seem most useful.

Booleans are represented as numbers, since within the supported
operation set it seems to be impossible to distinguish True/False
from 1.0/0.0. Boolean operations properly implement lazy evaluation
with jumps, and comparisons support chaining like 'a < b < c...'.

Expressions are parsed into a very simple stack machine program
that can then be safely evaluated in multiple threads.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D3698
2018-09-18 13:25:28 +03:00
Brecht Van Lommel
f3b7e99c04 UI: use monochrome lock icons next to decorators. 2018-09-18 12:11:06 +02:00
Sergey Sharybin
5aa5066c3b Merge branch 'master' into blender2.8 2018-09-18 11:49:08 +02:00
Sergey Sharybin
d04eb330e8 Close OpenEXR thread pool on exit
This partially solves ASAN report about unfreed memory. There is still
something in the report, need to have a closer look with debug version
of OpenEXE library.
2018-09-18 11:10:49 +02:00
Bastien Montagne
eadf0f3d70 Fix T56831: Crash - Transfer Weight & changing it's properties.
Usual Undo/Redo case with operators needing evaluated data...
2018-09-18 09:42:52 +02:00
Campbell Barton
5ae531d813 Cleanup: spelling 2018-09-18 16:35:13 +10:00
Campbell Barton
d421adb83e Gizmo: de-duplicate poll logic
Checking the active tool or operator was a common way to check
if the gizmo was still in use.
2018-09-18 16:15:06 +10:00
Campbell Barton
0a3b66cfb5 Gizmo: dial3d option to get angles w/o wrapping
Needed for spinning multiple revolutions.
2018-09-18 14:58:20 +10:00
Campbell Barton
2b57222ece Gizmo: add snap & tweak to the dial widget
Allows holding Ctrl to snap w/ the spin tool.
2018-09-18 14:38:05 +10:00
Campbell Barton
f677ff274c Cleanup: group gizmo dial members into structs 2018-09-18 14:13:35 +10:00
Campbell Barton
add961c209 Correct view orientation update in last commit 2018-09-18 14:04:55 +10:00
Campbell Barton
e16e17486b Gizmo: use spin widgets by default
- Now the spin tool has a persistent gizmo.
- Uses scene orientation, with additional view orientation.
- Uses the cursor center, ignoring the pivot since the
  selection center is rarely useful.
- Disable most of the redo gizmo's for now since they overlap,
  only allow adjusting the angle.

  Note: mixing new action with adjusting previous is confusing,
  we'll want to have design guidelines regarding this.
2018-09-18 13:44:41 +10:00
Campbell Barton
67f3f31f00 Cleanup: spin redo naming changes 2018-09-18 13:22:14 +10:00
Campbell Barton
2ca7d14814 Cleanup: spin redo naming changes 2018-09-18 09:58:27 +10:00
Campbell Barton
2f8994f4af Cleanup: spin redo naming changes 2018-09-18 09:55:20 +10:00
Campbell Barton
03bccd0010 Cleanup: move editmesh spin gizmo into own file
To mix both initial spin and redo ends up being more involved,
move into own file.
2018-09-18 09:51:12 +10:00
Campbell Barton
5b221f1a6e Gizmo: minor tweak to spin tool
Make main angle adjustment radius larger since it's the most useful.
2018-09-18 09:41:54 +10:00
Bastien Montagne
91e87f5cf2 Merge branch 'master' into blender2.8 2018-09-17 19:40:39 +02:00
Clément Foucault
731d0d8d0f Eevee: Fix shader linking error with volumetric shaders 2018-09-17 15:08:14 +02:00
Clément Foucault
3da5b03b8a Eevee: Fix crash when using refraction with alpha clip blend mode 2018-09-17 14:46:22 +02:00
Brecht Van Lommel
a738586810 Fix object selection with eyerdropper not respecting property poll function. 2018-09-17 12:36:31 +02:00
Clément Foucault
68f139db0d Fix T56800: Reflection Plane in Eevee crashes Blender 2018-09-17 12:20:51 +02:00
Clément Foucault
ad8b187a53 Fix T56803: Indirect lightning bake crashes Blender 2018-09-17 12:20:51 +02:00
Clément Foucault
5bf32f3337 Fix T56801: Enabling smoke crashes Blender. 2018-09-17 12:20:51 +02:00
Sergey Sharybin
dc1e03b4a2 Depsgraph: Cleanup, indentation 2018-09-17 11:19:42 +02:00
Sergey Sharybin
f87fbf9cce Depsgraph: Gnuplot, put heaviest objects at the top 2018-09-17 11:19:42 +02:00
Bastien Montagne
231a384587 Merge branch 'master' into blender2.8 2018-09-17 10:23:55 +02:00
Bastien Montagne
640fcc25a4 Fix T56811: Do not show cancel button for jobs when UI is locked.
Since that button is then totally useless and unusable...
2018-09-17 10:22:00 +02:00
Campbell Barton
2997f11941 Gizmo: start spin gizmo dragging
- Only respond to drag event, so placing the cursor is possible.
- Start off with zero rotation, dragging adjusts.
2018-09-17 14:34:51 +10:00
Campbell Barton
b8592b656b Gizmo: Functions to re-initialize a group type
Partially re-initializing a gizmo is often more trouble then removing
and re-adding.
2018-09-17 14:30:46 +10:00
Campbell Barton
f409c1ec93 Gizmo: only respond to mouse-move events
Missed in recent update to event handling.
2018-09-17 14:30:41 +10:00
Campbell Barton
9759059d58 Cleanup: use SCE_GIZMO_ prefix for gizmo_flag 2018-09-17 12:51:32 +10:00
Campbell Barton
ae3754838a Cleanup: rename gizmo group data
Abbreviate to 'ggd', replacing manipulator reference.
2018-09-17 12:47:45 +10:00
Clément Foucault
a06d803a5a Fix T56817: Assert because of invalid framebuffer 2018-09-16 21:22:55 +02:00
Alexander Gavrilov
8c87e681a5 Fix driver expression bytecode validation crash if parsing fails.
Another NULL pointer access: nothing to validate if it already failed.
2018-09-16 10:46:28 +03:00
Antonioya
db0c37f2f7 GP: Rename select group color to materials 2018-09-16 09:32:54 +02:00
Alexander Gavrilov
9901679ce8 Fix a crash when a driver expression evaluates to NaN.
The debug logging statement was accessing a NULL pointer.
Also happens in 2.79.
2018-09-16 09:06:57 +03:00
Antonioya
1079da9deb GP: Initialize new brush factors 2018-09-15 19:26:01 +02:00
Campbell Barton
ca3628ba0c Cleanup: style 2018-09-15 10:35:03 +10:00
Campbell Barton
83d4328ce7 PyDoc: add gpu.shader
Also some syntax corrections.
2018-09-15 10:35:03 +10:00
Campbell Barton
3f20b3b585 Cleanup: use r_ prefix for return args 2018-09-15 10:34:59 +10:00
Clément Foucault
b3a9069170 GPUTexture: Fix problem with glGenerateMipmap
Fix T56789: There was issue with certain driver with glGenerateMipmap and
GPU_DEPTH_COMPONENT24.
In this case we just create a complete texture with mipmaps manually
without downsampling / initializing the data.
2018-09-15 00:11:25 +02:00
Antonioya
6b024c7e1a GP: Improve errase panel and toolbars
Some names were not clear enough and some parameters were missing.
2018-09-14 22:54:19 +02:00
Antonioya
54f1375e29 GP: Add pressure option to eraser size 2018-09-14 22:54:18 +02:00
Clément Foucault
424aeda112 Object Mode: Draw object center after the floorgrid 2018-09-14 18:32:04 +02:00