Commit Graph

63573 Commits

Author SHA1 Message Date
Clément Foucault
3578212e46 Eevee: Fix missing UBO binds.
Some of them are unecessary and should be removed from the shader instead.

But for now we need a quick fix for the crashes happening on some platforms.

See T55475.
2018-08-02 18:33:49 +02:00
Antonioya
ce551ada92 Fix missing type for material arry
This function was called by RNA Api and had grease pencil object type missing.
2018-08-02 18:03:01 +02:00
Antonioya
909556aa26 Fix wrong RNA Api parameter definition 2018-08-02 17:45:32 +02:00
Bastien Montagne
9914c05bd7 Depsgraph: fix some DEG queries crashing with new, empty graph.
Calling code is responsible to check on NULL pointers here, or ensure
is does have a fully built and evaluated depsgraph, but this should
never crash in DEG queries themselves.
2018-08-02 17:17:04 +02:00
Bastien Montagne
771973869d Fix assert in UI string trimming code when we have 'protected' right part. 2018-08-02 16:39:15 +02:00
Campbell Barton
f36855f0fd UI: show all particle brush settings in topbar
Also show particle brush in tool-properties panel.
2018-08-02 22:10:38 +10:00
Sergey Sharybin
200212079d Subsurf: Better crease which represents sharp edges
Enabled infinite sharp patches for topology refiner and evaluator,
which allows to have sharp edge at first subdivision level.

Also tweaked crease export from Blender to OpenSubdiv to have more
artistic control over the whole 0..1 range.
2018-08-02 12:24:55 +02:00
Campbell Barton
3a93314753 Tool System: initial particle system support 2018-08-02 19:27:26 +10:00
Campbell Barton
d79df6c0bc Tool System: sync changes from changes to brushes
Changing a brush now updates the tool.
2018-08-02 18:18:53 +10:00
Campbell Barton
d3c387d605 Merge branch 'master' into blender2.8 2018-08-02 17:52:22 +10:00
Campbell Barton
cb6d7cb0b2 RNA: make particle enum public 2018-08-02 17:49:03 +10:00
Joshua Leung
503866c681 Fix T56199: Crash on Annotation in (VSE) Image Preview
In some cases (e.g. using old userpref settings/keymaps)
it was possible to trigger a crash when the wrong GP/Annotation
operators were triggered in the wrong contexts (e.g. using
the old GPENCIL_OT_paint in annotation-only contexts like
all the 2D editors).

This commit resolves several issues that were caused by sloppy
code-churn + features that had been hacked on.
2018-08-02 16:35:43 +12:00
Joshua Leung
0fdd058991 Dev Tooling: Instrument motion path calculation operator (for bones) to collect timing data
This will be useful for checking on the progress of our optimisation
efforts, and to generate some nice stats for later.
2018-08-02 15:04:58 +12:00
Pablo Vazquez
ab49b7d739 UI: Slightly larger action zone for corner resizing
Pretty minor, from 0.6 to 0.8, but the improvement is noticeable
especially when using a stylus, without overlapping too much with
the buttons and dropdowns in headers.
2018-08-02 01:26:58 +02:00
Campbell Barton
918288138d Cleanup: warnings, trailing space 2018-08-02 08:26:57 +10:00
Clément Foucault
504454ee5e GPUMaterial: Normal Map Node: Make default inputs interactives 2018-08-01 22:08:36 +02:00
Clément Foucault
48e661e05d GPUMaterial: Fix assert when shader failed to compile. 2018-08-01 22:08:36 +02:00
Clément Foucault
e8dd5e5cc6 GPUMaterial: Make Mapping node use UBO storage
This means tweaking parameter is now interactive and does not need to
recompile the shaders.
2018-08-01 22:08:36 +02:00
Clément Foucault
ad64cb6344 GPUMaterial: Make Localize tree live longer
This is in order to reference the localized node->storage when populating
the UBO data.
2018-08-01 22:08:36 +02:00
Clément Foucault
4510f30026 GPUMaterial: Fix nearest sampling
texelFetch return vec4(0.0) if the target pixel is outside the texture
rect. So we mimic the default repeate mode that we have for linear
interpolation.

Fix T56156 Mapping-Node doesn't work
2018-08-01 22:08:36 +02:00
Clément Foucault
c6f55fb0db GPUUniformBuffer: Fix bad memcpy error catched by asan
We need to copy the size of the gputype not the padded type.
2018-08-01 22:08:36 +02:00
Sergey Sharybin
86270b60db Subsurf: Evaluate all UV layers
Before that it was only first UV layer which was properly evaluated,
the rest were ignored. Now all layers are being properly handled.
2018-08-01 18:43:03 +02:00
Sergey Sharybin
5b3b0ed54f Subsurf: Add API to provide vertex sharpness
Currently unused, added for the future and API completeness.
2018-08-01 18:42:59 +02:00
Sergey Sharybin
4fe14d6a26 Subsurf: Support subdivision of mesh with just loose elements 2018-08-01 18:42:59 +02:00
Sergey Sharybin
63058490a3 Subsurf: Cleanup, remove unused mappings and topology queries 2018-08-01 18:42:59 +02:00
Sergey Sharybin
ec4ba68730 Subsurf: Fix/workaround crashes and failures with non-manifold geometry
The idea is simple: do not provide full topology to OpenSubdiv, leave
edges creation to OpenSubdiv itself. This solves issues with non-manifold
meshes which were known to fail, including the ones from T52059.

On a positive side we can simplify our side of converter, keeping code
shorter.

it is still possible that we'll need to ensure all loops has same
winding, but that is less things to worry about.
2018-08-01 18:42:59 +02:00
Sergey Sharybin
08e6bccdf4 Subsurf: Support subdivision of loose elements
Applies to vertices and edges. Biggest annoyance here is that OpenSubdiv's
topology converter expects that there is no loose geometry, otherwise it
is getting confused.

For now solution is to create some sort of mapping from real Mesh vertex
and edge index to a non-loose-index. Now the annoying part is that this
is an extra step to calculate before we can compare topology, meaning FPS
will not be as great as if we knew for sure that topology didn't change.

Loose edges subdivision is different from what it used to be with old
subdivision code, but probably nice feature now is that endpoints of loose
edges are stay at the coarse vertex locations. This allows to have things
like plane with hair strands, without need to duplicate edge vertices at
endpoints.

All this required some re-work of topology refiner creation, which is now
only passing edges and vertices which are adjacent to face. This is how
topology refiner is supposed to be used, and this is how its validator
also works. Vertices which are adjacent to loose edges are marked as
infinite sharp. This seems to be good-enough approximation for now. In the
future we might tweaks things a bit and push such vertices in average
direction of loose edges, to match old subdivision code closer.
2018-08-01 18:42:59 +02:00
Sergey Sharybin
9e2f678ba2 Fix mistake in atomic bitmap
Internally values are stored as 32bit integers, no idea why i thought
they were 8 bit.
2018-08-01 18:42:59 +02:00
Sergey Sharybin
63dc52c66e Subsurf: Cleanup, remove dead code 2018-08-01 18:42:59 +02:00
Bastien Montagne
110abebe1d Fix missing poll function for flip_matcap operator (see T56183). 2018-08-01 17:28:30 +02:00
Bastien Montagne
be5ccb9ce8 Merge branch 'master' into blender2.8 2018-08-01 16:13:13 +02:00
Bastien Montagne
9336aef4eb Fix T56195: Typo in BLI_array_utils.h. 2018-08-01 16:12:36 +02:00
Brecht Van Lommel
c48eb52164 Fix Cycles headless render failing, after grease pencil merge.
Now it should at least succeed when there are no grease pencil objects.
2018-08-01 14:47:02 +02:00
Antonioya
ddd62f1b10 Cleanup: Remove ToDo comment 2018-08-01 11:21:37 +02:00
Antonioya
20e5fc4d32 Fix context problem when render in background mode
Bug reported by Sergey.
2018-08-01 10:58:10 +02:00
Antonioya
af79ac944d Cleanup: Replace "Move Color" to "Assign Material" 2018-08-01 10:39:16 +02:00
Antonioya
c06bed25c7 Fix T56187: Crash using cursor tool in Edit/Sculpt and Weight Paint mode
The transform tried to calculate the multiframe falloff, but there was not any stroke to do that.
2018-08-01 10:17:05 +02:00
Campbell Barton
3f5d3aa057 Merge branch 'master' into blender2.8 2018-08-01 16:39:34 +10:00
Campbell Barton
583b2f9a3d Cleanup: remove unused array member 2018-08-01 16:38:57 +10:00
Campbell Barton
5f55bbf3d0 RNA: add space_type to tool 2018-08-01 16:02:20 +10:00
Campbell Barton
f4a06b390b Keymap: use Q key for quick menu in gpencil mode
Note, the keys for changing line display are now more obscure
(Shift-Q, Shift-Alt-Q), and might be changed.
2018-08-01 12:19:46 +10:00
Campbell Barton
0f449541d2 Merge branch 'master' into blender2.8 2018-08-01 09:01:29 +10:00
Campbell Barton
6a39d72558 Cleanup: declare vars or make static 2018-08-01 08:57:31 +10:00
Campbell Barton
29937dce8f Merge branch 'master' into blender2.8
Move 'View3D.flag3' options into 'gp_flag'.
2018-08-01 08:42:00 +10:00
Campbell Barton
e8d58080df DNA: remove View3D.flag3
Having 'flag, flag2, flag3' is getting out of hand especially
when we support increasing the size of types.

Make flag2 into an int.

Note, this looses the 'show world' option,
but it's not such an important setting.
2018-08-01 08:08:59 +10:00
Clément Foucault
3667a5402e KnifeTool: Use GPUBatch API instead of IMM to fix buffer overflow issue
This also include a small optimisation (remove of a double loop and half of
the memory allocation for hit points)

This should fix T55946 Crash using knife tool on mesh with large number of
vertices.

Tried with a 500K vert suzanne and it seems fine.
2018-07-31 20:10:14 +02:00
Clément Foucault
6ba70d5996 Fix crash when rendering viewport within another area
This also Fix T55574 Crash on sequencer preview
2018-07-31 18:21:23 +02:00
Clément Foucault
7e0eb0d071 GPUFrameBuffer: Put active framebuffer in GPUContext
instead of being ThreadLocal and leading to incorrect usage.

We still enforce no framebuffer when changing context. We can lift this
restriction later.
2018-07-31 18:21:23 +02:00
Clément Foucault
3ecba657bb GPU: Replace malloc/calloc/realloc/free with MEM_* counterpart 2018-07-31 18:21:23 +02:00
Antonioya
9b817bc168 Fix set_pixel overflow in fill brush
The value of the index was above the size of image
2018-07-31 17:03:12 +02:00