Commit Graph

65736 Commits

Author SHA1 Message Date
Campbell Barton
29dfe9a614 Cleanup: style 2018-11-06 12:39:51 +11:00
Bastien Montagne
5ae853d20a Fix (unreported) potential race condition in view_layer_bases_hash_create().
When you check for undone work before acquiring a lock that ensures you
are the only one actually doing the work, you have to redo the check
*after* acquiring said lock.

Otherwise, there is room for nasty random race condition issues...
2018-11-05 20:29:36 +01:00
Antonioya
46060d54bf GP: Limit internally Time offset to something logic
If the offset is greater than frame range, the offset could gets some unlogic values, so now the value is normalized in the range.
2018-11-05 19:52:51 +01:00
Jacques Lucke
a8e9959e07 API Docs: gpu api introduction + examples 2018-11-05 19:28:28 +01:00
Antonioya
abbe4df301 GP: More tweaks to Time Offset 2018-11-05 19:10:52 +01:00
Alexander Gavrilov
fee6ab18e7 BLI_heap: implement a limited but faster version of heap.
If the user only needs insertion and removal from top, there is
no need to allocate and manage separate HeapNode objects: the
data can be stored directly in the main tree array.

This measured a 24% FPS increase on a ~50% heap-heavy workload.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3898
2018-11-05 20:49:17 +03:00
Antonioya
a120b120ce GP: Fix Time Offset bug when use range
The frames greater than frame range were wrongly calculated.
2018-11-05 18:35:34 +01:00
Clément Foucault
b4dfe00fd6 Wireframe: Extend Xray slider range
This makes it possible to bypass the depth dithering effect at the cost
of less accurate depth perception.
2018-11-05 16:31:12 +01:00
Clément Foucault
946f9d8fb3 Eevee: Fix "Show Irradiance/cubemap" icons 2018-11-05 16:31:12 +01:00
Clément Foucault
2ae88c4d78 UI: Make the grid alpha themable
Now that the 3d grid is infinite, antialiased, not occluded, and overlaid
on top of rendered view, being able to decrease its opacity to reduce
visual strain is a must.
2018-11-05 16:31:12 +01:00
Clément Foucault
205d1876ff DRW: Fix crash with deferred compilation 2018-11-05 16:31:12 +01:00
Clément Foucault
050e91340d Edit Mesh: Fix wire opacity when not rotating the view in Xray mode 2018-11-05 16:31:11 +01:00
Clément Foucault
3927fbf98e LightProbe: Fix description of influence type 2018-11-05 16:31:11 +01:00
Antonioya
83b3b540de GP: Change Lock icon and Popover title 2018-11-05 16:29:07 +01:00
Pablo Vazquez
3e5e4a05f1 UI VSE: Rename submode Image Preview to Preview.
It's confusing that it says Image when it's also video or final result.
And also since the third option is called Sequencer/Preview, having the
others called Sequencer, and Preview, makes sense.
2018-11-05 15:34:23 +01:00
Alexander Gavrilov
721a484ccb BLI_kdopbvh: reduce branching in calc_nearest_point_squared.
This lets the compiler use min/max instructions for 4.5% FPS
improvement in Shrinkwrap to Nearest Surface Point.
2018-11-05 17:16:06 +03:00
Alexander Gavrilov
a70589e439 BLI_heap: optimize heap_swap, heap_down and heap_up.
The index field of nodes is supposed to be its actual index, so
there is no need to read it in swap. On a 64-bit processor i and
j are already in registers, so this removes two memory reads.

In addition, cache the tree pointer, use branch hints, and
put the most frequently accessed 'value' field at 0 offset.

Produced a 20% FPS improvement for a 50% heap-heavy workload.
2018-11-05 17:16:06 +03:00
Antonioya
7c7c8f3492 GP: Add new layer above active layer
Before, the layer was added to tail always, but this was weird for 2D animators.
2018-11-05 09:59:38 +01:00
Campbell Barton
efd133a9a6 Paint: setting the brush now updates tool slots
Adding a brush wasn't refreshing the tool-system (left blank topbar).
2018-11-05 16:20:15 +11:00
Campbell Barton
1b928c2d9a Paint: add tool offset & mode to runtime data
It was getting too impractical to call BKE_paint_brush_tool_info
which needed to lookup the scene pointers.

Now each store tool offset and brush mode in 'Paint.runtime'
2018-11-05 16:18:43 +11:00
Campbell Barton
56917bcf73 Missing from last commit 2018-11-05 15:47:22 +11:00
Campbell Barton
8b31f6fb21 Paint: add BKE_paint_ensure to initialize toolsettings
Each mode had its own logic for initializing paint structs,
move to a single function.

Also remove "BKE_brush_get_gpencil_paint", entering grease pencil
mode is responsible for ensuring the data is created.
2018-11-05 15:31:25 +11:00
Campbell Barton
25a9816c30 Cleanup: use bool 2018-11-05 13:22:49 +11:00
Campbell Barton
9361c1c83d UI: Add back line to curve map
D3894 by @charlie with edits
2018-11-05 13:04:43 +11:00
Campbell Barton
7c5d014666 UI: rename Cursor 'Depth' -> 'Surface Project' 2018-11-05 12:08:51 +11:00
Campbell Barton
4cdf4d1eba Cleanup: correct last commit, also use font_id var 2018-11-05 11:06:09 +11:00
Campbell Barton
c192ce6717 Gizmo: use fonts for drawing 3D axis characters 2018-11-05 10:48:18 +11:00
Brecht Van Lommel
1e56c8c47d Merge branch 'master' into blender2.8 2018-11-05 00:30:33 +01:00
Brecht Van Lommel
4e37796976 Fix various Freestyle rendering bugs. 2018-11-05 00:22:33 +01:00
Campbell Barton
287c023b85 Gizmo: tweak 3D view navigation axis sizes
This now matches original design more closely, see: T54723.
2018-11-05 08:31:31 +11:00
Campbell Barton
61c5890c2c Fix missing NULL check initializing paint tools 2018-11-05 07:15:47 +11:00
Campbell Barton
5195f03ca1 Cleanup: style, use ARRAY_SET_ITEMS macro 2018-11-05 07:12:53 +11:00
Antonioya
8d9d473eec GP: New API to move layers in layer list
This can be required  in som production scripts
2018-11-04 20:56:38 +01:00
Irie Shinsuke
b98f76cd90 Fix T57388: Blender Internal + Freestyle viewport render wrongly using FSAA. 2018-11-04 20:36:49 +01:00
Antonioya
bbb348afc1 GP: Move init code to new version section 2018-11-04 19:52:42 +01:00
Antonioya
665efe401a Fix T57611: Crash on entering Grease Pencil Sculpt Mode
The problem was when some layers was locked in multiedit. The cache size was not checked and gets an segment fault.
2018-11-04 19:37:03 +01:00
Antonioya
807b460a11 GP: Time Offset verify range if loop is disabled 2018-11-04 13:27:41 +01:00
Antonioya
5cfcee8c39 GP: Reorganize Canvas Grid
Now the grid is always controlled by the topbar selector and not in the canvas panel. To have two places to define orientation was confuse.

The orientation by default (no lock) is always to view plane.
2018-11-04 13:00:37 +01:00
Alexander Gavrilov
d3c815bd08 BLI_heap: add an API function to directly read the top node value.
It is very commonly needed in loop conditions to check if
the items in the heap are good enough to continue.
2018-11-04 13:29:17 +03:00
Campbell Barton
0d69a5aa34 Merge branch 'master' into blender2.8 2018-11-04 18:12:58 +11:00
Campbell Barton
76b9eaf7a8 Fix ghash masking out upper bits on 64bit systems
The code this was taken from assumes a 'size_t' result,
which isn't the case here.

In practice the bucket distribution wasn't bad,
even so this was a nop so best fix.
2018-11-04 16:48:36 +11:00
Campbell Barton
bc870f17a7 Cleanup: style, shadow warning 2018-11-04 10:10:00 +11:00
Antonioya
771b9c8010 GP: Update Canvas grid orientation when change option 2018-11-03 20:33:38 +01:00
Antonioya
0db31c03c6 GP: Fix Time Offset when range frame is 0 2018-11-03 20:27:30 +01:00
Charlie Jolly
f2858fbb9a UI: Draw curve map with solid color
Differential Revision: https://developer.blender.org/D3891
2018-11-03 17:42:40 +00:00
Antonioya
d2b4eaa137 GP: New Time Offset custom frame range parameters
These parameters allow to define a frame range for the animation loop and make possible to loop a section while the scene is playing.
2018-11-03 17:11:38 +01:00
Antonioya
ec017861b6 GP: Fix update problems with Grid Canvas
The grid canvas was not updated when changed parameters
2018-11-03 16:18:54 +01:00
Campbell Barton
f267921774 UI: remove grease pencil icons
Grease pencil tool now uses an icon for each tool,
previously it mapped icons to tool icons which is now not needed
because for each tool a different brush can be selected which has it's
own icon.
2018-11-03 20:35:34 +11:00
Antonioya
c2a12eedd1 GP: Use stroke and fill switches while drawing 2018-11-03 10:01:28 +01:00
Antonioya
628908a710 GP: New main switches to hide stroke and fill material
New parameters to switch visibility of stroke and fill
2018-11-03 08:51:36 +01:00