2 years agoCleanup: rename BKE_libblock_free_us to BKE_id_free_us.
Bastien Montagne [Mon, 14 Jan 2019 20:08:22 +0000 (21:08 +0100)]
Cleanup: rename BKE_libblock_free_us to BKE_id_free_us.

2 years agoCleanup: removed disabled 'slow but safer' piece of code in make_local process.
Bastien Montagne [Mon, 14 Jan 2019 15:24:50 +0000 (16:24 +0100)]
Cleanup: removed disabled 'slow but safer' piece of code in make_local process.

Has been disabled for nearly two years now, think we can safely assume
new, quicker code is working properly now. :)

2 years agoCleanup: Remove deprecated BKE_libblock_free(_ex) functions, document BKE_id_free...
Bastien Montagne [Mon, 14 Jan 2019 15:22:27 +0000 (16:22 +0100)]
Cleanup: Remove deprecated BKE_libblock_free(_ex) functions, document BKE_id_free(_ex) ones.

2 years agoCleanup: replace usages of deprecated BKE_libblock_free_ex by BKE_id_free_ex.
Bastien Montagne [Mon, 14 Jan 2019 15:15:15 +0000 (16:15 +0100)]
Cleanup: replace usages of deprecated BKE_libblock_free_ex by BKE_id_free_ex.

2 years agoCleanup: replace usages of deprecated BKE_libblock_free by BKE_id_free.
Bastien Montagne [Mon, 14 Jan 2019 14:47:11 +0000 (15:47 +0100)]
Cleanup: replace usages of deprecated BKE_libblock_free by BKE_id_free.

2 years agoCleanup BKE_id_free_ex().
Bastien Montagne [Mon, 14 Jan 2019 14:38:05 +0000 (15:38 +0100)]
Cleanup BKE_id_free_ex().

Add 'missing' bpy code from BKE_libblock_free_ex(), now both functions
do exactly the same thing, only the later is less flexible (fewer
'exotic' behaviors supported, like handling IDs outside of bmain etc.).

Next step: nuke usages of BKE_libblock_free functions, makes no sense to
have twice the same code around!

2 years agoCorrect last commit
Campbell Barton [Tue, 15 Jan 2019 07:54:43 +0000 (18:54 +1100)]
Correct last commit

2 years agoFix T60507: Constrained transform shows all axes
Campbell Barton [Tue, 15 Jan 2019 07:39:11 +0000 (18:39 +1100)]
Fix T60507: Constrained transform shows all axes

Regression in 579c01da600dd

Move values_modal_offset use out of applyMouseInput
to resolve order of initialization issue.

2 years agoRevert fix for T48901: Use of XIWarpPointer
Campbell Barton [Tue, 15 Jan 2019 05:44:08 +0000 (16:44 +1100)]
Revert fix for T48901: Use of XIWarpPointer

Xorg's XIWarpPointer doesn't support multi-head display while
XWarpPointer does.

Revert since this is a known TODO in Xorg and setting a custom
xinput matrix seems not to be used often.

Resolves T50383

2 years agoFix T60504: Armature wire draw type hidden when unselected
Campbell Barton [Tue, 15 Jan 2019 02:58:40 +0000 (13:58 +1100)]
Fix T60504: Armature wire draw type hidden when unselected

2 years agoFix T60506: Menu toggle clicks pass through to area
Campbell Barton [Tue, 15 Jan 2019 00:42:07 +0000 (11:42 +1100)]
Fix T60506: Menu toggle clicks pass through to area

2 years agoCMake: Improve handling of missing TBB & OpenVDB
Guillermo S. Romero [Tue, 15 Jan 2019 00:13:31 +0000 (11:13 +1100)]
CMake: Improve handling of missing TBB & OpenVDB

2 years agoFix T60512: Weight paint brushes show weight when unused
Campbell Barton [Tue, 15 Jan 2019 00:03:33 +0000 (11:03 +1100)]
Fix T60512: Weight paint brushes show weight when unused

2 years agoCleanup: use BrushCapabilities prefix for RNA types
Campbell Barton [Mon, 14 Jan 2019 23:53:02 +0000 (10:53 +1100)]
Cleanup: use BrushCapabilities prefix for RNA types

2 years agoCleanup: style
Campbell Barton [Mon, 14 Jan 2019 21:47:04 +0000 (08:47 +1100)]
Cleanup: style

2 years agoEdit Mesh: Improve selected double vertices visibility
Clément Foucault [Mon, 14 Jan 2019 22:42:52 +0000 (23:42 +0100)]
Edit Mesh: Improve selected double vertices visibility

The issue is that the edge fix geometry goes on top of the actual drawn

This commit reduce the edge fix size to the strict minimum but does not
get rid of it.

Related to T60139

2 years agoFix T59482: Creating 2 Particle systems breaks the app
Clément Foucault [Mon, 14 Jan 2019 17:48:21 +0000 (18:48 +0100)]
Fix T59482: Creating 2 Particle systems breaks the app

2 years agoUI: indent subpanel headers more.
Harley Acheson [Mon, 14 Jan 2019 18:32:58 +0000 (19:32 +0100)]
UI: indent subpanel headers more.

Differential Revision:

2 years agoWindows: add support for Windows Ink.
Christopher Peerman [Mon, 14 Jan 2019 16:46:49 +0000 (17:46 +0100)]
Windows: add support for Windows Ink.

Before this Blender always needed the Wintab driver. This adds support for the
native pressure API in Windows 8+, making it possible to get pressure sensitivity
on e.g. Microsoft Surface hardware without any extra drivers.

By default Blender will automatically use Wintab if available, and if not use
Windows Ink instead. There is also a new user preference to explicitly specify
which API to use if automatic detection fails.

Fixes T57869: no pressure sensitivity with Surface pen or laptop.

Code by Christopher Peerman with some tweaks by Brecht Van Lommel.

Differential Revision:

2 years agoCleanup: refactor GHOST wintab handling.
Brecht Van Lommel [Mon, 14 Jan 2019 18:12:02 +0000 (19:12 +0100)]
Cleanup: refactor GHOST wintab handling.

2 years agoFix T60476 Loose vertices only partially drawn
Clément Foucault [Mon, 14 Jan 2019 17:32:45 +0000 (18:32 +0100)]
Fix T60476 Loose vertices only partially drawn

Was caused by a missing vbo attachement.

Also fix said Vbo refreshing when selecting.

2 years agoObject Mode: Outlines: Add support for thicker outline
Clément Foucault [Mon, 14 Jan 2019 17:20:04 +0000 (18:20 +0100)]
Object Mode: Outlines: Add support for thicker outline

Base outline is 2px wide (because of how we detect them).
And since inflating this outline will only produce outlines that are 2*x
thick we map the UI scalling and the outline width setting to the closest

Do note that thicker outlines have a performance cost since they need more
texture fetches and passes.

This fixes T60252 3D View Outline Width not working

2 years agoGPUMaterial: Cleanup
Clément Foucault [Mon, 14 Jan 2019 16:34:03 +0000 (17:34 +0100)]
GPUMaterial: Cleanup

2 years agoFix T60332: Lattice objects do not display properly in Edit mode
Clément Foucault [Mon, 14 Jan 2019 15:26:32 +0000 (16:26 +0100)]
Fix T60332: Lattice objects do not display properly in Edit mode

This was caused by wires not having alpha by default, making them disapear
with MSAA.

2 years agoFix incorrect individual origins icon in clip editor.
Sebastian Koenig [Mon, 14 Jan 2019 16:35:29 +0000 (17:35 +0100)]
Fix incorrect individual origins icon in clip editor.

Differential Revision:

2 years agoNLA: implement a new blending mode that intelligently combines actions.
Alexander Gavrilov [Sun, 23 Dec 2018 15:43:01 +0000 (18:43 +0300)]
NLA: implement a new blending mode that intelligently combines actions.

The existing Add and Multiply blending modes have limited usability,
because the appropriate operation for meaningfully combining values
depends on the channel. This adds a new mode that chooses the operation
automatically based on property settings:

- Axis+Angle channels are summed, effectively averaging the
  axis, but adding up the angle. Default is forced to 0.

- Quaternion channels use quaternion multiplication:

  result = prev * value ^ influence

- Scale-like multiplicative channels use multiplication:

  result = prev * (value / default) ^ influence

- Other channels use addition:

  result = prev + (value - default) * influence

Inclusion of default in the computation ensures that combining
keyframed default values of properties keeps the default state,
even if the default isn't 0 or 1.

Strips with this mode can be keyframed normally in Tweak mode,
except that for quaternion rotation keyframing always inserts
all 4 channels, and the channel value sliders on the left side
of Graph/Action editors won't insert keys without Auto Key.
Quaternion keys are also automatically normalized.

Differential Revision:

2 years agoKeyframing: refactor insertion code to allow property-global NLA tweaks.
Alexander Gavrilov [Tue, 8 Jan 2019 15:49:38 +0000 (18:49 +0300)]
Keyframing: refactor insertion code to allow property-global NLA tweaks.

Supporting a strip blending type that treats quaternions as a unit
also means being able to adjust all sub-channels as a unit when
inserting keyframes. This requires refactoring keyframe insertion
code to retrieve array property values for all channels at once,
before iterating over the indices being inserted.

2 years agoFix the active sequencer strip not standing out from selected ones.
Brecht Van Lommel [Mon, 14 Jan 2019 15:07:20 +0000 (16:07 +0100)]
Fix the active sequencer strip not standing out from selected ones.

Set outline contrast back to 2.7 values.

2 years agoUI: fix misaligned eyedropper icon in button.
Harley Acheson [Mon, 14 Jan 2019 14:02:49 +0000 (15:02 +0100)]
UI: fix misaligned eyedropper icon in button.

Differential Revision:

2 years agoUI: fix panel header contents alignment.
Harley Acheson [Mon, 14 Jan 2019 14:02:21 +0000 (15:02 +0100)]
UI: fix panel header contents alignment.

The contents is now properly centered at all zoom levels.

Differential Revision:

2 years agoUI: fix horizontal scrollbar overlapping last item.
Harley Acheson [Mon, 14 Jan 2019 14:01:51 +0000 (15:01 +0100)]
UI: fix horizontal scrollbar overlapping last item.

Differential Revision:

2 years agocleanup last commit
Jacques Lucke [Mon, 14 Jan 2019 13:13:39 +0000 (14:13 +0100)]
cleanup last commit

2 years agoFix T60304, T60301: setting error message in bevel modifier results in double free
Jacques Lucke [Mon, 14 Jan 2019 13:10:33 +0000 (14:10 +0100)]
Fix T60304, T60301: setting error message in bevel modifier results in double free

2 years agoFix T60441: entering hex color in picker gives wrong result.
Brecht Van Lommel [Mon, 14 Jan 2019 12:09:06 +0000 (13:09 +0100)]
Fix T60441: entering hex color in picker gives wrong result.

2 years agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 14 Jan 2019 11:43:34 +0000 (12:43 +0100)]
Merge branch 'blender2.7'

2 years agoFix T55589: drawing strokes with Microsoft surface pen misses first part.
Christopher Peerman [Mon, 14 Jan 2019 11:15:59 +0000 (12:15 +0100)]
Fix T55589: drawing strokes with Microsoft surface pen misses first part.

This disables touch gesture recognition in Blender, avoiding any initial delay
when drawing with grease pencil, texture paint, etc.

Differential Revision:

2 years agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 14 Jan 2019 11:13:10 +0000 (12:13 +0100)]
Merge branch 'blender2.7'

2 years agoFix T60450: Cycles broken GPU denoising after recent changes.
Brecht Van Lommel [Mon, 14 Jan 2019 10:42:38 +0000 (11:42 +0100)]
Fix T60450: Cycles broken GPU denoising after recent changes.

2 years agoFix toolbar accelerator w/ user defined keyconfig
Campbell Barton [Mon, 14 Jan 2019 07:59:26 +0000 (18:59 +1100)]
Fix toolbar accelerator w/ user defined keyconfig

2 years ago3D View: don't override animation template view color
Campbell Barton [Mon, 14 Jan 2019 07:09:52 +0000 (18:09 +1100)]
3D View: don't override animation template view color

D4198 by @charlie w/ edits.

2 years agoCleanup: unused function
Campbell Barton [Mon, 14 Jan 2019 07:04:10 +0000 (18:04 +1100)]
Cleanup: unused function

2 years agoAdd font selection to VSE text strips
Richard Antalik [Mon, 14 Jan 2019 05:28:07 +0000 (21:28 -0800)]
Add font selection to VSE text strips

Allows users to select a font for text strips in the video sequence editor.

Related: 3610f1fc43d0 Sequencer: refactor clipboard copy to no longer increase user count.

Reviewed by: Brecht

Differential Revision:

2 years agoFix crash on scene unlink
Richard Antalik [Mon, 14 Jan 2019 05:25:29 +0000 (21:25 -0800)]
Fix crash on scene unlink

Reviewed by: Brecht

Differential Revision:

2 years agoFix drawing metadata
Richard Antalik [Mon, 14 Jan 2019 05:23:32 +0000 (21:23 -0800)]
Fix drawing metadata

ImBuf was freed prior to drawing metadata.

Reviewed by: Brecht

Differential Revision:

2 years agoFix FPS meter not showing properly with no input
Richard Antalik [Mon, 14 Jan 2019 05:21:57 +0000 (21:21 -0800)]
Fix FPS meter not showing properly with no input

Reviewed by: Brecht

Differential revision:

2 years agoCleanup: move comments above definitions
Campbell Barton [Mon, 14 Jan 2019 05:30:43 +0000 (16:30 +1100)]
Cleanup: move comments above definitions

For clang-format not to wrap definitions.

2 years agoCleanup: move comments above definitions
Campbell Barton [Mon, 14 Jan 2019 05:15:33 +0000 (16:15 +1100)]
Cleanup: move comments above definitions

For clang-format not to wrap definitions.

2 years agoCleanup: move comments above definitions, use enum
Campbell Barton [Mon, 14 Jan 2019 04:58:40 +0000 (15:58 +1100)]
Cleanup: move comments above definitions, use enum

For clang-format not to wrap definitions.

2 years agoFix T60248: Crash duplicating collections
Campbell Barton [Mon, 14 Jan 2019 04:36:12 +0000 (15:36 +1100)]
Fix T60248: Crash duplicating collections

2 years agoFix T57852: Mesh X Mirror option not working
Campbell Barton [Mon, 14 Jan 2019 03:59:18 +0000 (14:59 +1100)]
Fix T57852: Mesh X Mirror option not working

D3869 by @lichtwerk w/ own edits

2 years agoFix T60388: Warning entering text edit mode
Campbell Barton [Mon, 14 Jan 2019 03:16:08 +0000 (14:16 +1100)]
Fix T60388: Warning entering text edit mode

2 years agoFix message bus ID remapping
Campbell Barton [Mon, 14 Jan 2019 03:08:01 +0000 (14:08 +1100)]
Fix message bus ID remapping

2 years agoFix T60267: Assert manipulating a collection
Campbell Barton [Mon, 14 Jan 2019 02:58:38 +0000 (13:58 +1100)]
Fix T60267: Assert manipulating a collection

2 years agoCleanup: move comments above definitions
Campbell Barton [Mon, 14 Jan 2019 01:41:01 +0000 (12:41 +1100)]
Cleanup: move comments above definitions

For clang-format not to wrap definitions.

2 years agoCleanup: compiler warnings
Campbell Barton [Mon, 14 Jan 2019 00:42:28 +0000 (11:42 +1100)]
Cleanup: compiler warnings

2 years agoNLA: ignore time range when evaluating a raw action.
Alexander Gavrilov [Sat, 12 Jan 2019 11:10:09 +0000 (14:10 +0300)]
NLA: ignore time range when evaluating a raw action.

When editing an action without a strip, or tweaking a strip without
time mapping enabled or supported, the extents of the virtual strip
can't be controlled and are purely derived from keys in the action.

Thus, cutting off evaluation of the action at these arbitrary points
gets in the way of observing the natural extrapolation of the F-Curves
and thus appears to be a mis-feature.

With this change non-mapped actions are evaluated with infinite
range, exactly like they are handled without NLA, unless extend
mode is set to Nothing.

2 years agoGP: Cleanup missing brackets
Antonioya [Sat, 12 Jan 2019 07:36:00 +0000 (08:36 +0100)]
GP: Cleanup missing brackets

2 years agoViewport: Stereoscopy drawing is back
Dalai Felinto [Fri, 11 Jan 2019 15:38:18 +0000 (13:38 -0200)]
Viewport: Stereoscopy drawing is back

The viewport stereoscopy support helpers are finally ported to 2.80.

We now can scale the camera and the "stereo cameras" will scale
in the viewport as well (unlike 2.7x).

At the moment I disabled the drawing of the camera frame when
stereo is selected and you are looking through the camera.

It is to be fixed later, but for now it draws the border wrong.
In 2.79 this was not a problem because the camera frame was drawn
afterwards as a hack.

Viewport > Stereoscopy:
* Cameras
* Convergence plane
* Convergence plane alpha
* Stereoscopy volume
* Stereoscopy volume alpha

2 years agoBKE_camera_multiview_model_matrix: Add _scaled version
Dalai Felinto [Fri, 11 Jan 2019 20:58:09 +0000 (18:58 -0200)]
BKE_camera_multiview_model_matrix: Add _scaled version

For drawing it is useful to have the non-normalized version of the matrix.
So we can scale up the cameras drawing accordingly.

2 years agoDrawing API: shgroup_instance and shgroup_instance_alpha clarification
Dalai Felinto [Fri, 11 Jan 2019 19:50:45 +0000 (17:50 -0200)]
Drawing API: shgroup_instance and shgroup_instance_alpha clarification

shgroup_instance_alpha was getting a color[4] but would only use the
alpha defined upon creation of the shading group.

This was very limiting since it wouldn't allow for different instances
to have different alpha values.

Patch made with Clément Foucault (he made the code of it, while I fixed
all the parts of the code that were relying on shgroup_instance_alpha.

2 years agoFix T60328: Stereoscopy Convergence Plane broken
Dalai Felinto [Fri, 11 Jan 2019 12:47:48 +0000 (10:47 -0200)]
Fix T60328: Stereoscopy Convergence Plane broken

The original issue is that we were changing the camera shiftx
temporarily for the stereoscopic calculation. However we are using the
evaluated object when calculating the projection matrix.

Note: Camera framing drawing for stereo still seems to be broken.
But the viewport itself is now correct.

2 years agoFix T60401: Shape key's from pointer being set to evaluated CoW ID.
Bastien Montagne [Fri, 11 Jan 2019 22:13:29 +0000 (23:13 +0100)]
Fix T60401: Shape key's from pointer being set to evaluated CoW ID.

Not sure exactly why this happened for 'apply as shape' and not in other
cases (did not took time to fully trace what happens there). But in any
case, `BKE_key_evaluate_object_ex()` can be called from a fair amount of
places, including during depsgraph evaluation, so setting back key's
owner here is plain wrong in CoW era.

2 years agoFix T60402: Increased data.users value, when running: C.active_object.to_mesh(C.depsg...
Bastien Montagne [Fri, 11 Jan 2019 19:26:52 +0000 (20:26 +0100)]
Fix T60402: Increased data.users value, when running: C.active_object.to_mesh(C.depsgraph, True) - on curve.

More like a band-aid than anything else really, that code is horribly
weak and need to be fully re-written at some point (putting all those
temp data-blocks fully outside of bmain...). But for now should do.

2 years ago=Fix unused func warning in GP code...
Bastien Montagne [Fri, 11 Jan 2019 19:14:25 +0000 (20:14 +0100)]
=Fix unused func warning in GP code...

2 years agoFix syntax error breaking compile in GP code.
Bastien Montagne [Fri, 11 Jan 2019 19:11:11 +0000 (20:11 +0100)]
Fix syntax error breaking compile in GP code.

Seriously… Build your code before committing!!!

2 years agoRevert "Fix T57371: Generative modifiers in editmode display vertex group weights...
Clément Foucault [Fri, 11 Jan 2019 19:09:11 +0000 (20:09 +0100)]
Revert "Fix T57371: Generative modifiers in editmode display vertex group weights ..."

This reverts commit 6dbfd7f6d6bc9bea9556861eba682a3126b5ed40.

2 years agoFix T57371: Generative modifiers in editmode display vertex group weights
Clément Foucault [Fri, 11 Jan 2019 19:02:00 +0000 (20:02 +0100)]
Fix T57371: Generative modifiers in editmode display vertex group weights

In a better way...

6dbfd7f6d6bc would make the final vertex weights always calculated in
edit mode. Now it's only if the option is enabled.

2 years agoEditUV: Only clear data VBO when selection changes
Clément Foucault [Fri, 11 Jan 2019 18:07:33 +0000 (19:07 +0100)]
EditUV: Only clear data VBO when selection changes

This is a small optimisation that make UV selection faster.

2 years agoMerge branch 'blender2.7'
Bastien Montagne [Fri, 11 Jan 2019 19:03:42 +0000 (20:03 +0100)]
Merge branch 'blender2.7'

2 years agoFix T55668: Volume Keyframe on Cut-ted Metastrip (re-doing the fix in better way).
Bastien Montagne [Fri, 11 Jan 2019 18:48:56 +0000 (19:48 +0100)]
Fix T55668: Volume Keyframe on Cut-ted Metastrip (re-doing the fix in better way).

Fix T60194: Sequencer cut loses animation data for the right strip.

Fixing the first also fixes the second. First attempt was delaying
uniquename check at a later step of cut process, after everything had
been duplicated. While this fixed first issue, second one became even
more proeminent (it become active for all strips, and not only
video/audio movie strips in meta's).

So instead, passing along the list of (new) sequences, so that duplicated
seqs can be put there immediately, before checking for unique names,
henceforth ensuring even strips inside meta's get properly handled.

2 years agoRevert "Fix T55668: Volume Keyframe on Cut-ted Metastrip."
Bastien Montagne [Fri, 11 Jan 2019 11:01:13 +0000 (12:01 +0100)]
Revert "Fix T55668: Volume Keyframe on Cut-ted Metastrip."

This partially reverts commit bb98e83b99e63348e0396a5ffe5bb2a20ff1607a.
It fixed 'strips having same name' issue, but broke handling of
animation then. Need to find a better way to handle this.

2 years agoGP: New Cutter, Constraints and Segment selection
Antonioya [Fri, 11 Jan 2019 18:15:23 +0000 (19:15 +0100)]
GP: New Cutter, Constraints and Segment selection

This commit groups a set of new tools that were tested in grease pencil object branch before moving to master. We decide to do all the development in a separated branch because it could break master during days or weeks before the new tools were ready to deploy.

The commit includes:

- New Cutter tool to trim strokes and help cleaning up drawings.

- New set of constraints and guides to draw different types of shapes. All the credits for this development goes to Charlie Jolly (@charlie), thanks for your help!

- Segment selection mode to select strokes between intersections.

- New operator to change strokes cap mode.

- New option to display only keyframed frames. This option is very important when fill strokes with color.

- Multiple small fixes and tweaks.

Thanks to @pepeland and @mendio for their ideas, tests, reviews and support.

Note: Still pending the final icons for Cutter in Toolbar and Segment Selection in Topbar. @billreynish could help us here?

2 years agoFix T57371: Generative modifiers in editmode display vertex group weights ...
Clément Foucault [Fri, 11 Jan 2019 17:55:55 +0000 (18:55 +0100)]
Fix T57371: Generative modifiers in editmode display vertex group weights ...

... incorrectly (or assert)

Thanks @angavrilov and @lichtwerk for the fix.

2 years agoFix T59990: Crash when entering edit mode with skin modifier enabled
Clément Foucault [Fri, 11 Jan 2019 16:21:22 +0000 (17:21 +0100)]
Fix T59990: Crash when entering edit mode with skin modifier enabled

The skin modifier does not keep the UV layers.

This just add a safety check when there is no UV layers.

2 years agoMerge branch 'blender2.7'
Sergey Sharybin [Fri, 11 Jan 2019 17:09:05 +0000 (18:09 +0100)]
Merge branch 'blender2.7'

2 years agoFix T60145: Cycles resets manually set affinity
Sergey Sharybin [Fri, 11 Jan 2019 16:55:36 +0000 (17:55 +0100)]
Fix T60145: Cycles resets manually set affinity

This change brings back old original logic which was checking
whether worker threads do fit into an active CPU group. But
it does it a bit smarter now and is also checking affinity
within that group. This way Cycles will use all threads on a
Threadripper2 CPU if it's set to automatic number of threads,
but on another hand will not change affinity if user requested
16 threads and changed Blender affinity.

2 years agoUpdate bundled version of NUMA API library
Sergey Sharybin [Fri, 11 Jan 2019 16:47:10 +0000 (17:47 +0100)]
Update bundled version of NUMA API library

2 years agoGP: Missing in previous count commit
Antonioya [Fri, 11 Jan 2019 16:30:35 +0000 (17:30 +0100)]
GP: Missing in previous count commit

2 years agoFix T60415: wrong font preview image alpha blending.
Brecht Van Lommel [Fri, 11 Jan 2019 16:00:03 +0000 (17:00 +0100)]
Fix T60415: wrong font preview image alpha blending.

2 years agoFix Python errors batch generating preview images.
Brecht Van Lommel [Fri, 11 Jan 2019 15:18:00 +0000 (16:18 +0100)]
Fix Python errors batch generating preview images.

2 years agoFix T60411: crash in multi-object pose mode, with some armatures in rest pose.
Brecht Van Lommel [Fri, 11 Jan 2019 11:19:42 +0000 (12:19 +0100)]
Fix T60411: crash in multi-object pose mode, with some armatures in rest pose.

2 years agoGP: Fix missing Fill properties in Topbar
Antonioya [Fri, 11 Jan 2019 16:22:13 +0000 (17:22 +0100)]
GP: Fix missing Fill properties in Topbar

After some internal changes in the topbar, some properties were not visible if use col() instead of row() in python script.

2 years agoGP: Reduce memory reallocation in multiedit mode
Antonioya [Fri, 11 Jan 2019 15:58:18 +0000 (16:58 +0100)]
GP: Reduce memory reallocation in multiedit mode

There was a problem counting the number of points for edit points and lines. Now the total size is used allocating the VBO size and not the stroke size.

2 years agoUVEdit: Port texpaint_loop_wire to batch request
Clément Foucault [Thu, 10 Jan 2019 21:22:42 +0000 (22:22 +0100)]
UVEdit: Port texpaint_loop_wire to batch request

This removes code duplication and put an end to the old "create at request"
batch creation.

Also it uses the same vbo as the uv layer used for shading. Reducing VRAM

Also fixes the modified uv display in uv edit mode.

2 years agoUVEdit: Add back uv angle stretch aspect correction
Clément Foucault [Thu, 10 Jan 2019 16:59:11 +0000 (17:59 +0100)]
UVEdit: Add back uv angle stretch aspect correction

This is now done in shader so that the batches are shared across ImageUV

2 years agoUVEdit: Port batches to batch request
Clément Foucault [Wed, 9 Jan 2019 21:56:27 +0000 (22:56 +0100)]
UVEdit: Port batches to batch request

This is in order to allow more spaces to have their batches created at the
same time and sharing the batches.

This is part of the effort fo making the drawing code more optimized. This
commit however should not introduce any difference.

This commit bypass the aspect ratio correction for angle stretch display
but this should be fixed in the next commit.

2 years agoWM: Use draw manager to draw UV image editor spaces
Clément Foucault [Wed, 9 Jan 2019 21:26:52 +0000 (22:26 +0100)]
WM: Use draw manager to draw UV image editor spaces

This is in order to use batch cache directly without using tricks like
batch presets reseting the VAOs.

Note: For now it also create a depth buffer for this area which is not
needed. We could get rid of this to lower VRAM usage.

2 years agoBMesh: Add BM_face_calc_area_uv
Clément Foucault [Wed, 9 Jan 2019 21:09:27 +0000 (22:09 +0100)]
BMesh: Add BM_face_calc_area_uv

2 years agoTexture Paint: Add filtering option for texture paint overlay
Clément Foucault [Sun, 23 Dec 2018 15:26:21 +0000 (16:26 +0100)]
Texture Paint: Add filtering option for texture paint overlay

The overlay should now use the texture interpolation setting in material

In image mode, there is now a new button to let the user choose the texture
filter. The option is located in the Texture Slots popover and only shows
in Image mode.

2 years agoWorkbench: Support node texture "closest" interpolation option
Clément Foucault [Sun, 23 Dec 2018 14:20:06 +0000 (15:20 +0100)]
Workbench: Support node texture "closest" interpolation option

This makes it possible to paint pixel art using the workbench.

Cubic interpolation is not supported but could be added if needed.

2 years agoGPUShader: Cleanup Unused shaders
Clément Foucault [Sun, 23 Dec 2018 13:13:24 +0000 (14:13 +0100)]
GPUShader: Cleanup Unused shaders

2 years agoMesh Batch Cache: Cleanup Unused
Clément Foucault [Sat, 22 Dec 2018 23:23:51 +0000 (00:23 +0100)]
Mesh Batch Cache: Cleanup Unused

2 years agoEdit Mode Selection: Make Vertices not occluded by edges
Clément Foucault [Sat, 22 Dec 2018 23:11:42 +0000 (00:11 +0100)]
Edit Mode Selection: Make Vertices not occluded by edges

Debugging the edit mode selection I realized the vertices are often
occluded by edges with the same depth. Sometime it can be the center
pixel of a vertex point and that can lead to some selection issue.

So I increased the offset a bit for the vertices and it seems to fix it.

2 years agoGPUMaterial: Cleanup / optimization
Clément Foucault [Sat, 22 Dec 2018 23:07:52 +0000 (00:07 +0100)]
GPUMaterial: Cleanup / optimization

2 years agoMesh Selection: Port to batch cache request
Clément Foucault [Sat, 22 Dec 2018 22:57:12 +0000 (23:57 +0100)]
Mesh Selection: Port to batch cache request

This makes it more future proof and remove baked id offset inside the vbos.
Instead we add the offset as a uniform. This makes it possible to reuse
the vbos instead of discarding them all the time.

Also using batch request may reduce batches creation time.

2 years agoMesh Batch Cache: Fix wrong assert
Clément Foucault [Sat, 22 Dec 2018 20:04:53 +0000 (21:04 +0100)]
Mesh Batch Cache: Fix wrong assert

2 years agoGPUShader: Add selection id shader
Clément Foucault [Sat, 22 Dec 2018 20:02:30 +0000 (21:02 +0100)]
GPUShader: Add selection id shader

This is to separate id drawing from standard color drawing.

2 years agoMesh Batch Cache: Put context evaluation out of batch cache
Clément Foucault [Sat, 22 Dec 2018 20:00:23 +0000 (21:00 +0100)]
Mesh Batch Cache: Put context evaluation out of batch cache

This is in order to be able to call DRW_mesh_batch_cache_create_requested
outside of the draw manager

2 years agoDRW: Fix texture paint crashing if object has no material slot
Clément Foucault [Sat, 22 Dec 2018 19:17:42 +0000 (20:17 +0100)]
DRW: Fix texture paint crashing if object has no material slot

2 years agoMerge branch 'blender2.7'
Sergey Sharybin [Fri, 11 Jan 2019 14:09:46 +0000 (15:09 +0100)]
Merge branch 'blender2.7'