blender.git
2 hours agoUI: Rename "View Camera Center" Op to "Frame Camera Bounds" master
Hans Goudey [Mon, 1 Jun 2020 15:35:16 +0000 (11:35 -0400)]
UI: Rename "View Camera Center" Op to "Frame Camera Bounds"

The current name isn't very specific about what the operator does.
The operation is more about lining up the edges with the viewport
edges than centering the view.

Differential Revision: https://developer.blender.org/D7866

2 hours agoFix T77139: UI: Add "View Camera Center" to View Menu
Hans Goudey [Mon, 1 Jun 2020 15:34:07 +0000 (11:34 -0400)]
Fix T77139: UI: Add "View Camera Center" to View Menu

The "View Camera Center" operator was not accessible by the new menu search.

Differential Revision: https://developer.blender.org/D7865

5 hours agoFix T74552: Distribute negatives in number input
Hans Goudey [Mon, 1 Jun 2020 12:22:27 +0000 (08:22 -0400)]
Fix T74552: Distribute negatives in number input

This applies a relatively simple solution for fixing some unintuitive
cases in unit handling.

Currently entering -1m50cm evaluates to -0.5m, and similarly 1'6"
evaulates to just half a foot. So effectively there's an implied + just
between the numbers, which is quite confusing.

This works by adding parentheses so the negative distributes to the
block of values before the next operator.

For example:
|         Before         |           After            |
| `-1m50cm + 1m -2m50cm` | `-(1m50cm) + 1m -(2m50cm)` |
|   `-4m + 0.5 / -1.1`   |   `-(4m) + 0.5 / -(1.1)`   |
|         `-1'6"`        |         `-(1'6")`          |
|        `-1e-2cm`       |        `-(1e-2cm) `        |

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7813

7 hours agoMerge branch 'blender-v2.83-release'
Bastien Montagne [Mon, 1 Jun 2020 10:12:57 +0000 (12:12 +0200)]
Merge branch 'blender-v2.83-release'

7 hours agoFix py api doc gen script after recent versionning changes. blender-v2.83-release
Bastien Montagne [Mon, 1 Jun 2020 10:10:56 +0000 (12:10 +0200)]
Fix py api doc gen script after recent versionning changes.

8 hours agoMerge branch 'blender-v2.83-release'
Campbell Barton [Mon, 1 Jun 2020 09:00:23 +0000 (19:00 +1000)]
Merge branch 'blender-v2.83-release'

8 hours agoFix T77217: Object mode toggle doesn't work
Campbell Barton [Mon, 1 Jun 2020 07:38:35 +0000 (17:38 +1000)]
Fix T77217: Object mode toggle doesn't work

Toggling object mode to the previous wasn't working, also resolves a
case when toggling modes would cause an extra, unnecessary mode switch.
Own regression in 5159b8e1eadb3.

11 hours agoMerge branch 'blender-v2.83-release'
Campbell Barton [Mon, 1 Jun 2020 06:27:23 +0000 (16:27 +1000)]
Merge branch 'blender-v2.83-release'

11 hours agoMerge branch 'blender-v2.83-release'
Campbell Barton [Mon, 1 Jun 2020 06:27:18 +0000 (16:27 +1000)]
Merge branch 'blender-v2.83-release'

11 hours agoFix T77241: NDOF navigation doesn't work with the knife tool
Campbell Barton [Mon, 1 Jun 2020 06:21:30 +0000 (16:21 +1000)]
Fix T77241: NDOF navigation doesn't work with the knife tool

Also allow NDOF with loop-cut.

12 hours agoCleanup: unused variable warning
Campbell Barton [Mon, 1 Jun 2020 05:04:47 +0000 (15:04 +1000)]
Cleanup: unused variable warning

Also remove unnecessary function return value.

12 hours agoCleanup: clang-format
Campbell Barton [Mon, 1 Jun 2020 05:04:30 +0000 (15:04 +1000)]
Cleanup: clang-format

12 hours agoUI: rename "Select Playhead" to "Select -> Side of Current Frame"
Campbell Barton [Mon, 1 Jun 2020 04:46:46 +0000 (14:46 +1000)]
UI: rename "Select Playhead" to "Select -> Side of Current Frame"

Make this consistent with meshes select side of active,
also rename "Under" to "Overlap" as this is confusing since
strips can be considered above/under each other
relative to their channels.

12 hours agoUI: use term current frame instead of playhead
Campbell Barton [Mon, 1 Jun 2020 04:41:12 +0000 (14:41 +1000)]
UI: use term current frame instead of playhead

Avoid mixing different terminologies up,
current frame is used in a majority of Blender.

12 hours agoCleanup: warning
Campbell Barton [Mon, 1 Jun 2020 05:00:16 +0000 (15:00 +1000)]
Cleanup: warning

13 hours agoFix T77043: Incorrect cache invalidation when changing resolution.
Richard Antalik [Mon, 1 Jun 2020 04:21:52 +0000 (06:21 +0200)]
Fix T77043: Incorrect cache invalidation when changing resolution.

Invalidate cache of scene, not scene strips using said scene.

13 hours agoCleanup: error building on Linux
Campbell Barton [Mon, 1 Jun 2020 04:14:21 +0000 (14:14 +1000)]
Cleanup: error building on Linux

13 hours agoFix T67577: Add-on unregister can't access preferences on factory reset
Campbell Barton [Mon, 1 Jun 2020 03:57:41 +0000 (13:57 +1000)]
Fix T67577: Add-on unregister can't access preferences on factory reset

14 hours agoVSE UI: Text panel adjustments
Peter Fog [Mon, 1 Jun 2020 03:38:48 +0000 (05:38 +0200)]
VSE UI: Text panel adjustments

This patch adjusts a number of text panel elements:

- The text entry widget has become larger in order to distinguish it from the strip name.
- Wrap has been moved up under the text, since this doesn't relate to bounding box.
- Alignment X/Y has been renamed to Anchor X/Y, since this is the achor point of the text point, and not the Alignment of the text.
- Offset and Crop was completely missing from the Text strip panel, these has been added.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7869

14 hours agoVSE UI: Add a proxy menu to Preview/View menu
Peter Fog [Mon, 1 Jun 2020 03:32:36 +0000 (05:32 +0200)]
VSE UI: Add a proxy menu to Preview/View menu

Add Proxy Setup, Build and View to a menu in the Preview View menu.

Reviewed By: ISS, billreynish, pablovazquez

Differential Revision: https://developer.blender.org/D7734

14 hours agoVSE: Use color picker for color strip.
Peter Fog [Mon, 1 Jun 2020 03:17:20 +0000 (05:17 +0200)]
VSE: Use color picker for color strip.

Reviewed By: billreynish, ISS

Differential Revision: https://developer.blender.org/D6114

14 hours agoVSE: Add warnings for failed proxy encoding
Peter Fog [Mon, 1 Jun 2020 02:41:52 +0000 (04:41 +0200)]
VSE: Add warnings for failed proxy encoding

Add more descriptive warnings if building proxy fails.
Prevent progressbar from showing if no valid strip is selected.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7689

15 hours agoVSE: Add select under playhead, and shortcuts for left, right, under.
Peter Fog [Mon, 1 Jun 2020 02:14:54 +0000 (04:14 +0200)]
VSE: Add select under playhead, and shortcuts for left, right, under.

Add `UNDER` option for `left_right` property of `sequencer.select` operator.
Add Equal as shortcut for select under playhead, and move Insert Gaps to backspace + ctrl.
Add extend shortcut for left, right under options.
The function is added to Select > Playhead menu.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7679

15 hours agoMerge branch 'blender-v2.83-release'
Campbell Barton [Mon, 1 Jun 2020 02:12:06 +0000 (12:12 +1000)]
Merge branch 'blender-v2.83-release'

15 hours agoCleanup: warnings
Campbell Barton [Mon, 1 Jun 2020 01:23:08 +0000 (11:23 +1000)]
Cleanup: warnings

20 hours agoCleanup: Remove unnecessary step in calling snap callback
Germano Cavalcante [Sun, 31 May 2020 21:09:50 +0000 (18:09 -0300)]
Cleanup: Remove unnecessary step in calling snap callback

20 hours agoFix T77194: Force global orientation on select constraint (Shift MMB) not working
Germano Cavalcante [Sun, 31 May 2020 18:19:29 +0000 (15:19 -0300)]
Fix T77194: Force global orientation on select constraint (Shift MMB) not working

This feature was a hack to prevent mmb select to print the orientation from menu in pre 2.80 versions.
Removing this feature as it is no longer an issue.

22 hours agoDeps: Update OIIO + ImageLibs + OSL + Helpers
Ray Molenkamp [Sun, 31 May 2020 19:15:40 +0000 (13:15 -0600)]
Deps: Update OIIO + ImageLibs + OSL + Helpers

This is the cluster of OIIO and friends , since they are all kinda tangled best to deal with this as a single unit

OIIO 2.1.15.0
png 1.6.37
jpeg 2.0.4
opencolorio 1.1.1
tiff 4.1.0
OSL 1.10.10
pugixml 1.10
openjpeg 2.3.1

Differential Revision: https://developer.blender.org/D7727
Reviewed by: brecht

25 hours agoDeps: iconv 1.16
Ray Molenkamp [Sun, 31 May 2020 16:33:11 +0000 (10:33 -0600)]
Deps: iconv 1.16

44 hours agoFix T77206: G + MMB Doesn't work in Graph Editor if the transform orientation is...
Germano Cavalcante [Sat, 30 May 2020 21:11:36 +0000 (18:11 -0300)]
Fix T77206: G + MMB Doesn't work in Graph Editor if the transform orientation is set to 'Local'

Scene orientation is used only for 3DView.

44 hours agoRemove leftover debugging code
Germano Cavalcante [Sat, 30 May 2020 21:10:32 +0000 (18:10 -0300)]
Remove leftover debugging code

2 days agoMerge branch 'blender-v2.83-release'
Antonio Vazquez [Sat, 30 May 2020 15:33:34 +0000 (17:33 +0200)]
Merge branch 'blender-v2.83-release'

2 days agoGPencil: Fix unreported wrong Sculpt brushes initialization in Templates
Antonio Vazquez [Sat, 30 May 2020 15:31:54 +0000 (17:31 +0200)]
GPencil: Fix unreported wrong Sculpt brushes initialization in Templates

The Sculpt brushes were not properly initialized when use 2D template or other templates.

Also, using the default template (not factory settings) could be situations where the brushes were not updated.

This problem was introduced when some versioning code was removed in order to avoid duplicated brush creation.

2 days agoFix T77166: Transforming bone with constraint does not follow mouse position
Germano Cavalcante [Sat, 30 May 2020 15:12:36 +0000 (12:12 -0300)]
Fix T77166: Transforming bone with constraint does not follow mouse position

Bug introduced in rBc75a665c442e

2 days agoCleanup: Deduplicate code
Germano Cavalcante [Sat, 30 May 2020 14:28:53 +0000 (11:28 -0300)]
Cleanup: Deduplicate code

2 days agoFix T77183: Axis moves with object when constraint movement and using local transform
Germano Cavalcante [Sat, 30 May 2020 14:10:07 +0000 (11:10 -0300)]
Fix T77183: Axis moves with object when constraint movement and using local transform

2 days agoCleanup: Initialize gizmo snap keymap before using
Germano Cavalcante [Fri, 29 May 2020 21:35:48 +0000 (18:35 -0300)]
Cleanup: Initialize gizmo snap keymap before using

2 days agoGHOST/wayland: use 'is_dialog' flag to prevent drawing into same window
Christian Rauch [Sat, 30 May 2020 11:23:39 +0000 (12:23 +0100)]
GHOST/wayland: use 'is_dialog' flag to prevent drawing into same window

2 days agoFix LayerTypeInfo for CD_PROP_COL
Philipp Oeser [Fri, 29 May 2020 15:57:58 +0000 (17:57 +0200)]
Fix LayerTypeInfo for CD_PROP_COL

This was introduced in rBd7282537f016 and had the wrong struct name
specified, leading to errors in writing/saving.

Stumbled over this when testing a color layer for pointclouds.

Differential Revision: https://developer.blender.org/D7882

2 days agoCleanup: Use Consistent Capitalization of "Anti-Aliasing"
Aaron Carlisle [Fri, 29 May 2020 17:57:40 +0000 (13:57 -0400)]
Cleanup: Use Consistent Capitalization of "Anti-Aliasing"

2 days agoMerge branch 'blender-v2.83-release'
Clément Foucault [Fri, 29 May 2020 17:43:32 +0000 (19:43 +0200)]
Merge branch 'blender-v2.83-release'

2 days agoEEVEE: Fix memory leak when using SSS render pass.
Clément Foucault [Fri, 29 May 2020 10:31:02 +0000 (12:31 +0200)]
EEVEE: Fix memory leak when using SSS render pass.

Differential Revision: https://developer.blender.org/D7876

3 days agoModifiers: add invert vgroup weights options to operands of Mix modifier.
D. O [Fri, 29 May 2020 16:52:29 +0000 (18:52 +0200)]
Modifiers: add invert vgroup weights options to operands of Mix modifier.

Please note that vertices which are in a vgroup are not affected by this
option (which means that affected vertices from 'selection' modes remain
the same). Only the weights of selected vertices get inverted.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7811

3 days agoMerge branch 'blender-v2.83-release'
Brecht Van Lommel [Fri, 29 May 2020 16:05:04 +0000 (18:05 +0200)]
Merge branch 'blender-v2.83-release'

3 days agoFix: Array modifier start cap not updating with object changes
Cody Winchester [Fri, 29 May 2020 15:55:13 +0000 (17:55 +0200)]
Fix: Array modifier start cap not updating with object changes

When setting the start cap of the array modifier it does not update when
updating the start cap objects geometry.

This patch switches the property update to rna_Modifier_dependency_update,
the same as the end cap which works properly.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7584

3 days agoBlender: change bugfix release versioning from a/b/c to .1/.2/.3
Brecht Van Lommel [Mon, 25 May 2020 08:49:04 +0000 (10:49 +0200)]
Blender: change bugfix release versioning from a/b/c to .1/.2/.3

The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.

User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".

Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility

This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.

Fixes T76058.

Differential Revision: https://developer.blender.org/D7748

3 days agoVSE: Remove delete confirmation pop-up
Peter Fog [Fri, 29 May 2020 13:53:52 +0000 (09:53 -0400)]
VSE: Remove delete confirmation pop-up

It is not needed with the current undo system.

Differential Revision: https://developer.blender.org/D7807

3 days agoUndo: Writefile: fix 'id changed' detected when resorting IDs.
Bastien Montagne [Fri, 29 May 2020 12:30:02 +0000 (14:30 +0200)]
Undo: Writefile: fix 'id changed' detected when resorting IDs.

The ListBase next/prev pointers will change everytime you add or rename
an ID, also for 'neighbors' data-blocks in the list, causing unnecessary
'changed' detection.

This info is not needed in blendfile anyway, so just NULLify it.

3 days agoFix T77130: Visually broken/stepped wireframe in object mode (regression)
Clément Foucault [Fri, 29 May 2020 09:14:10 +0000 (11:14 +0200)]
Fix T77130: Visually broken/stepped wireframe in object mode (regression)

Create a new shader for the selection fix.

Differential Revision: https://developer.blender.org/D7873

3 days agoFix T73972: Collection in outliner grayed out when all collection children are disabled
Manuel Castilla [Fri, 29 May 2020 09:28:20 +0000 (11:28 +0200)]
Fix T73972: Collection in outliner grayed out when all collection children are disabled

There is no reason to have the children enable/disable state to
influence the parent collection. Specially considering that the parent
collection itself can have objects that would be visible.

Reviewed by: dfelinto, brecht

Differential Revision: http://developer.blender.org/D7864

3 days agoKeymap: remove explicit 3D cursor entry for add tool
Campbell Barton [Fri, 29 May 2020 08:12:30 +0000 (18:12 +1000)]
Keymap: remove explicit 3D cursor entry for add tool

Passing through events to place the cursor, as other tools do.

3 days agoGizmo: fix crash in recent snap gizmo addition
Campbell Barton [Fri, 29 May 2020 06:12:44 +0000 (16:12 +1000)]
Gizmo: fix crash in recent snap gizmo addition

3 days agoPyAPI: use bpy_rna_types_capi.c to set type methods
Campbell Barton [Fri, 29 May 2020 04:50:29 +0000 (14:50 +1000)]
PyAPI: use bpy_rna_types_capi.c to set type methods

Remove use of '_bpy' as an intermediate module to store functions
which were then assigned in bpy_types.py.

3 days agoPyAPI: support static & class methods for C RNA API methods
Campbell Barton [Fri, 29 May 2020 04:14:43 +0000 (14:14 +1000)]
PyAPI: support static & class methods for C RNA API methods

Previously the static/class flag was ignored,
always using class methods.

3 days agoKeymap: swap shift and alt for interactive add tool
Campbell Barton [Fri, 29 May 2020 03:18:50 +0000 (13:18 +1000)]
Keymap: swap shift and alt for interactive add tool

Match original proposal.

3 days agoCleanup: spelling, correct reference to 'Mesh.mcol'
Campbell Barton [Fri, 29 May 2020 02:58:07 +0000 (12:58 +1000)]
Cleanup: spelling, correct reference to 'Mesh.mcol'

3 days agoCleanup: line length, single quote enums, invalid URL
Campbell Barton [Fri, 29 May 2020 02:45:20 +0000 (12:45 +1000)]
Cleanup: line length, single quote enums, invalid URL

3 days agoDocs: replace warnings with note for complexity information
Campbell Barton [Fri, 29 May 2020 02:42:09 +0000 (12:42 +1000)]
Docs: replace warnings with note for complexity information

Reserve warnings for situations such as corrupt data which can
cause crashes.

3 days agoFix for T77111: Joins Areas Without Creating Invalid Edges soc-2020-soft-body
Harley Acheson [Thu, 28 May 2020 18:34:31 +0000 (11:34 -0700)]
Fix for T77111: Joins Areas Without Creating Invalid Edges

Properly align every involved edge when performing 'tolerant' area joins.

Differential Revision: https://developer.blender.org/D7859

Reviewed by Brecht Van Lommel

3 days agoVSE UI: Add buttons for swap Effect strip inputs
Peter Fog [Thu, 28 May 2020 18:17:22 +0000 (14:17 -0400)]
VSE UI: Add buttons for swap Effect strip inputs

The feature where the active strip determines what strip will be the
first input in effect strips can be quite a puzzle for users.
The operator to swap the inputs is hidden in the Strip menu.

This adds the swapping to the Effect sidebar panel.

Differential Revision: https://developer.blender.org/D7849

4 days agoVSE UI: Move Scene strip and Mask strip above Adjustment in Sidebar
Peter Fog [Thu, 28 May 2020 16:53:06 +0000 (12:53 -0400)]
VSE UI: Move Scene strip and Mask strip above Adjustment in Sidebar

This is consistent with the other strip specific properties.

Differential Revision: https://developer.blender.org/D7677

4 days agoVSE UI: Rename Scene Strip Panel and Move View Panel Up
Peter Fog [Thu, 28 May 2020 16:42:44 +0000 (12:42 -0400)]
VSE UI: Rename Scene Strip Panel and Move View Panel Up

 - Rename "Scene Preview/Render" to "Scene Strip Display",
   since this relates to Scene Strips.
 - Move the "Scene Strip Display" down, so the view settings are on top.

Differential Revision: https://developer.blender.org/D7676

4 days agoVSE UI: Group Show Elements in View Menu, Use Consistent Naming
Peter Fog [Thu, 28 May 2020 16:23:11 +0000 (12:23 -0400)]
VSE UI: Group Show Elements in View Menu, Use Consistent Naming

Use the "Show..." syntax for Show elements in View menu.

Differential Revision: https://developer.blender.org/D7344

4 days agoVSE UI: rename Trim Offset to Slip Offset
Peter Fog [Thu, 28 May 2020 16:15:41 +0000 (12:15 -0400)]
VSE UI: rename Trim Offset to Slip Offset

The operator was at some point renamed from Trim to Slip,
but not yet in the header text.

Differential Revision: https://developer.blender.org/D7712

4 days agoUI: Use Heading to Remove Text strip Shadow Subpanel
Peter Fog [Thu, 28 May 2020 16:11:53 +0000 (12:11 -0400)]
UI: Use Heading to Remove Text strip Shadow Subpanel

The new "heading=" option allows for a more simple way to expose the
Text strip Shadow operator.

Differential Revision: https://developer.blender.org/D7535

4 days agoCleanup: GPU: Fix warning
Clément Foucault [Thu, 28 May 2020 12:04:52 +0000 (14:04 +0200)]
Cleanup: GPU: Fix warning

4 days agoMerge branch 'blender-v2.83-release'
Clément Foucault [Thu, 28 May 2020 11:43:57 +0000 (13:43 +0200)]
Merge branch 'blender-v2.83-release'

4 days agoGPencil: Reduce aliasing for subpixel lines
Clément Foucault [Thu, 28 May 2020 11:36:24 +0000 (13:36 +0200)]
GPencil: Reduce aliasing for subpixel lines

4 days agoGPU: Fix compilation warning about uninitialized values
Clément Foucault [Thu, 28 May 2020 11:41:33 +0000 (13:41 +0200)]
GPU: Fix compilation warning about uninitialized values

4 days agoCleanup: DRW: Remove array suffix from uniform name
Clément Foucault [Wed, 27 May 2020 23:17:06 +0000 (01:17 +0200)]
Cleanup: DRW: Remove array suffix from uniform name

4 days agoDRW: Add DRW_shgroup_uniform_vec4_array_copy
Clément Foucault [Wed, 27 May 2020 23:14:45 +0000 (01:14 +0200)]
DRW: Add DRW_shgroup_uniform_vec4_array_copy

4 days agoReadfile: move all calls to 'id_us_ensure_real' to direct_link functions.
Bastien Montagne [Thu, 28 May 2020 10:13:16 +0000 (12:13 +0200)]
Readfile: move all calls to 'id_us_ensure_real' to direct_link functions.

That kind of 'own' ID management has really nothing to do in lib_link
code.

4 days agoFix T65889: Hair Particles not updating when using image sequence
Sergey Sharybin [Thu, 28 May 2020 08:46:04 +0000 (10:46 +0200)]
Fix T65889: Hair Particles not updating when using image sequence

4 days agoDepsgraoh: Fix missing texture node allocation
Sergey Sharybin [Thu, 28 May 2020 08:44:07 +0000 (10:44 +0200)]
Depsgraoh: Fix missing texture node allocation

It was causing wrong binding for image animation: since there was no
ID node for texture at the moment of build_animdata original texture
ID was passed to the callback. This is not what is supposed to happen.

This is part of fix for T65889.

4 days agoCleanup: remove unused struct members from RenderStats
Campbell Barton [Thu, 28 May 2020 06:54:27 +0000 (16:54 +1000)]
Cleanup: remove unused struct members from RenderStats

4 days agoCleanup: spelling
Campbell Barton [Thu, 28 May 2020 06:42:31 +0000 (16:42 +1000)]
Cleanup: spelling

4 days agoFix cone primitive creating duplicate vertices
Campbell Barton [Thu, 28 May 2020 06:04:49 +0000 (16:04 +1000)]
Fix cone primitive creating duplicate vertices

Using remove double wasn't reliable as the matrix argument
could cause vertices to be further apart than the threshold allowed for.

This happened when adding cones using the new add tool.

4 days agoObject: new add object tool, currently for primitive types
Campbell Barton [Thu, 28 May 2020 04:34:17 +0000 (14:34 +1000)]
Object: new add object tool, currently for primitive types

- Interactively adding primitives with two clicks.
- Scene orientation used for new objects.
- Depth [view-plane, axis-plane, surface]
- Origin [base, center]
- Primitive types [cube, cylinder, cone, uv-sphere, ico-sphere ]
- Settings for object types in the top-bar.

Shortcuts:

- Snapping (Ctrl).
- Constrain 1:1 aspect (Shift).
- Toggle center (Alt).

Part of T57210 design task.

4 days agoObject: add scale argument to creation operators
Campbell Barton [Thu, 28 May 2020 04:30:42 +0000 (14:30 +1000)]
Object: add scale argument to creation operators

Needed for to create objects of a specific size.

4 days agoGizmo: add flag for gizmos to ignore keymap events
Campbell Barton [Thu, 28 May 2020 04:28:06 +0000 (14:28 +1000)]
Gizmo: add flag for gizmos to ignore keymap events

Needed for the snap gizmo not to steal mouse events from the tool.

4 days agoCleanup: missing braces warning
Campbell Barton [Thu, 28 May 2020 04:33:37 +0000 (14:33 +1000)]
Cleanup: missing braces warning

4 days agoCD_PROP_COL datalayer
Pablo Dobarro [Wed, 27 May 2020 18:04:09 +0000 (20:04 +0200)]
CD_PROP_COL datalayer

This implements a generic color datalayer and its functions. Based on
D5975.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7838

5 days agoRuler: Remove highlight hack
Germano Cavalcante [Wed, 27 May 2020 17:27:28 +0000 (14:27 -0300)]
Ruler: Remove highlight hack

5 days agoCleanup: Use bitmaps insteand of bool and char arrays
Pablo Dobarro [Wed, 27 May 2020 15:42:06 +0000 (17:42 +0200)]
Cleanup: Use bitmaps insteand of bool and char arrays

This was propsed in D7059, so I applied it to the rest of the code

Reviewed By: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D7480

5 days agoFix T77109: Cycles viewport render crash after object add and undo
Brecht Van Lommel [Wed, 27 May 2020 16:00:59 +0000 (18:00 +0200)]
Fix T77109: Cycles viewport render crash after object add and undo

5 days agoUpdate the default Face Set when creating Face Sets from visible
Pablo Dobarro [Sat, 25 Apr 2020 19:44:44 +0000 (21:44 +0200)]
Update the default Face Set when creating Face Sets from visible

If all vertices in the sculpt are visible create the new face set and
update the default face set. This is the same as disabling the overlay,
so it will not have the extra performance cost of rendering a colored
face set twice that gives no information.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7530

5 days agoFix T75096: Crash when using liquid simulation as dynamic paint brush
Jacques Lucke [Wed, 27 May 2020 14:15:06 +0000 (16:15 +0200)]
Fix T75096: Crash when using liquid simulation as dynamic paint brush

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7853

5 days agoMerge branch 'blender-v2.83-release'
Patrick Mours [Wed, 27 May 2020 13:31:03 +0000 (15:31 +0200)]
Merge branch 'blender-v2.83-release'

5 days agoFix T76947: Optix realtime denoiser progressively reduces brightness of very bright...
Patrick Mours [Wed, 27 May 2020 13:17:47 +0000 (15:17 +0200)]
Fix T76947: Optix realtime denoiser progressively reduces brightness of very bright objects

The input data to the OptiX denoiser was clamped to 0..10000 as required, but it could easily
exceed that range with a high number of samples (since the data contains the overall sum). To
fix that, divide by the number of samples first and multiply it back in after the denoiser ran.

5 days agoOpenSubdiv: Only store edges topology for non-smooth edges
Sergey Sharybin [Tue, 26 May 2020 10:42:13 +0000 (12:42 +0200)]
OpenSubdiv: Only store edges topology for non-smooth edges

This change makes it so vertices of edge are only stored when edge
has non-zero crease. This allows to lower memory footprint of 1.5M
faces from 78 MiB to 54 MiB in the case all creases are zero.

Meshes with crease are more hard to predict due to array-based
storage, so it all depends on index of edge with crease. Worst case
(all edges are creased) still stays at 78 MiB.

5 days agoOpenSubdiv: Allow any order of edge topology/sharpness assignment
Sergey Sharybin [Tue, 26 May 2020 10:37:03 +0000 (12:37 +0200)]
OpenSubdiv: Allow any order of edge topology/sharpness assignment

Makes it possible to set adjacent vertices after edge sharpness.

Initially it seemed like useful sanity check, but with time it
became rather a burden.

5 days agoOpenSubdiv: Optimize faces storage in mesh topology
Sergey Sharybin [Tue, 26 May 2020 08:54:46 +0000 (10:54 +0200)]
OpenSubdiv: Optimize faces storage in mesh topology

Avoid per-face pointer and allocation: store everything as continuous
arrays.

Memory footprint for 1.5M faces:

- Theoretical worst case (all vertices and edges have crease) memory
  goes down from 114 MiB to 96 MiB (15% improvement).

  This case is not currently achievable since Blender does not expose
  vertex crease yet.

- Current real life worst case (all edges have crease) memory goes
  down from 108 MiB to 90 MiB (17% improvement).

- Best case (no creases at all) memory goes down from 96 MiB to 78 MiB
  (19% improvement).

5 days agoOpenSubdiv: Add regression tests for mesh topology
Sergey Sharybin [Tue, 26 May 2020 08:23:29 +0000 (10:23 +0200)]
OpenSubdiv: Add regression tests for mesh topology

While this looks trivial it already allowed to catch issues in one
of previous attempt to optimize memory usage. It will totally be
useful for an upcoming refactor of face topology storage.

5 days agoOpenSubdiv: Hide individual topology elements
Sergey Sharybin [Tue, 26 May 2020 08:01:46 +0000 (10:01 +0200)]
OpenSubdiv: Hide individual topology elements

Move all API to happen via MeshTopology.

This is a preparation for an upcoming memory optimization.

5 days agoOpenSubdiv: Cleanup, remove unused code
Sergey Sharybin [Tue, 19 May 2020 14:43:16 +0000 (16:43 +0200)]
OpenSubdiv: Cleanup, remove unused code

There is no need in edge map anymore.

5 days agoOpenSubdiv: Add TODO avoid checking face-varying topology for equality
Sergey Sharybin [Tue, 19 May 2020 14:38:31 +0000 (16:38 +0200)]
OpenSubdiv: Add TODO avoid checking face-varying topology for equality

5 days agoOpenSubdiv: Move preliminary geometry counters check to mesh topology
Sergey Sharybin [Tue, 19 May 2020 14:37:19 +0000 (16:37 +0200)]
OpenSubdiv: Move preliminary geometry counters check to mesh topology

5 days agoOpenSubdiv: Keep explicit storage of base mesh faces
Sergey Sharybin [Tue, 19 May 2020 14:19:40 +0000 (16:19 +0200)]
OpenSubdiv: Keep explicit storage of base mesh faces

Allows to perform comparison by doing linear comparison of indices.

Before cyclic match was used to deal with possibly changed winding from
OpenSubdiv side.

Speeds up comparison (and hence improves FPS), makes code more reliable
nut uses more memory.

5 days agoOpenSubdiv: Compare edge topology
Sergey Sharybin [Tue, 19 May 2020 13:48:57 +0000 (15:48 +0200)]
OpenSubdiv: Compare edge topology

This change makes it so topology refiner comparison will check vertices
of all existing/provided edges.

The initial claim that due to manifold nature of mesh there is no need
in "deep" edges check was wrong: some areas might only provide edges
with non-zero creases. So if crease of one edge goes changes from 1.0
to 0.0 and crease of other edge goes from 0.0 to 1.0 the old comparison
code would not have caught it.

5 days agoOpenSubdiv: Refactor, move mesh topology comparison to own file
Sergey Sharybin [Tue, 19 May 2020 12:30:58 +0000 (14:30 +0200)]
OpenSubdiv: Refactor, move mesh topology comparison to own file

Makes it easier to follow and extend.