blender-staging.git
11 months agoCleanup: remove UV name syncing function
Campbell Barton [Sun, 25 Aug 2019 04:54:48 +0000 (14:54 +1000)]
Cleanup: remove UV name syncing function

MTFace's on the mesh are now only used for conversion.
There is no need to keep both UV layers in sync at once.

11 months agoCleanup: rename mesh looptri/tessface functions
Campbell Barton [Sun, 25 Aug 2019 04:32:47 +0000 (14:32 +1000)]
Cleanup: rename mesh looptri/tessface functions

Use consistent terminology.

11 months agoCleanup: remove tessface check when entering edit-mode
Campbell Barton [Sun, 25 Aug 2019 02:41:31 +0000 (12:41 +1000)]
Cleanup: remove tessface check when entering edit-mode

11 months agoCleanup: remove BKE_mesh_calc_normals_tessface
Campbell Barton [Sun, 25 Aug 2019 04:08:01 +0000 (14:08 +1000)]
Cleanup: remove BKE_mesh_calc_normals_tessface

This was used for versioning, now normals are calculated after
initializing MPoly data.

11 months agoCleanup: remove unused ED_mesh_*_tessface functions
Campbell Barton [Sun, 25 Aug 2019 03:15:39 +0000 (13:15 +1000)]
Cleanup: remove unused ED_mesh_*_tessface functions

11 months agoCleanup: remove unused DM_to_mesh function
Campbell Barton [Sun, 25 Aug 2019 03:12:42 +0000 (13:12 +1000)]
Cleanup: remove unused DM_to_mesh function

11 months agoRNA: remove Mesh.update() calc_loop_triangles argument
Campbell Barton [Sun, 25 Aug 2019 02:38:10 +0000 (12:38 +1000)]
RNA: remove Mesh.update() calc_loop_triangles argument

This calculated tessfaces, not loop-triangles.

Remove this since they aren't accessible from RNA anymore.

11 months agoCleanup: remove USE_TESSFACE_DEFAULT define
Campbell Barton [Sun, 25 Aug 2019 02:21:09 +0000 (12:21 +1000)]
Cleanup: remove USE_TESSFACE_DEFAULT define

11 months agoCleanup: remove tessface loop from set-smooth function
Campbell Barton [Sun, 25 Aug 2019 02:00:03 +0000 (12:00 +1000)]
Cleanup: remove tessface loop from set-smooth function

11 months agoGPencil: Fix unreported unable to deselect when masking is OFF
Antonio Vazquez [Sat, 24 Aug 2019 15:58:14 +0000 (17:58 +0200)]
GPencil: Fix unreported unable to deselect when masking is OFF

When the mask is disabled, all select operators must be disabled, but the deselect all operator must work or it's impossible to deselect.

11 months agoFix crash when snapping ruler
mano-wii [Sat, 24 Aug 2019 12:21:13 +0000 (09:21 -0300)]
Fix crash when snapping ruler

11 months agoBKE_bvhutils: implement hiden check
mano-wii [Sat, 24 Aug 2019 12:20:55 +0000 (09:20 -0300)]
BKE_bvhutils: implement hiden check

Accidentally unused in rB7c3bbe93aaa2

11 months agoGPencil: Use evaluated data in selection
Antonio Vazquez [Sat, 24 Aug 2019 11:46:00 +0000 (13:46 +0200)]
GPencil: Use evaluated data in selection

Now the selection is using the position after evaluating the modifiers and makes possible to select a stroke point that has been moved from the original location.

Related to T66294

11 months agoCleanup: use eval as suffix
Antonio Vazquez [Sat, 24 Aug 2019 11:26:08 +0000 (13:26 +0200)]
Cleanup: use eval as suffix

Follow conversion already used in most places.

11 months agoFix object origin transform with vertex snapping
Campbell Barton [Sat, 24 Aug 2019 11:22:30 +0000 (21:22 +1000)]
Fix object origin transform with vertex snapping

11 months agoUI: Add Meta strip icon to Sequencer sidebar
William Reynish [Sat, 24 Aug 2019 10:25:51 +0000 (12:25 +0200)]
UI: Add Meta strip icon to Sequencer sidebar

Patch by Peter Fog (tintwotin).

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

Reviewers: Brecht Van Lommel (brecht), William Reynish (billreynish)

11 months agoGPencil: Fix typo error
Antonio Vazquez [Sat, 24 Aug 2019 07:02:42 +0000 (09:02 +0200)]
GPencil: Fix typo error

11 months agoFix T68807: smoothing group issue
Philipp Oeser [Sat, 24 Aug 2019 06:50:58 +0000 (08:50 +0200)]
Fix T68807: smoothing group issue

Showed in OBJ export.
Caused by comparison mistake in rB2e91fc39ac7.

Reviewers: mont29

Maniphest Task: T68807

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

11 months agoFix BKE_bvhtree_from_editmesh_get not setting cached value
Campbell Barton [Sat, 24 Aug 2019 02:16:30 +0000 (12:16 +1000)]
Fix BKE_bvhtree_from_editmesh_get not setting cached value

The stored value was always false because of shadowing.

Also disable unused code.

11 months agoCleanup: use doxy sections for editfont
Campbell Barton [Sat, 24 Aug 2019 02:04:43 +0000 (12:04 +1000)]
Cleanup: use doxy sections for editfont

11 months agoCleanup: correct use of term 'split'
Campbell Barton [Fri, 23 Aug 2019 22:54:48 +0000 (08:54 +1000)]
Cleanup: correct use of term 'split'

11 months agoCleanup: use eval as a suffix
Campbell Barton [Fri, 23 Aug 2019 22:50:58 +0000 (08:50 +1000)]
Cleanup: use eval as a suffix

Follow conversion already used in most places.

11 months agoBKE bvhutils: create and use new `BKE_bvhtree_from_editmesh_get`
mano-wii [Fri, 23 Aug 2019 22:45:09 +0000 (19:45 -0300)]
BKE bvhutils: create and use new `BKE_bvhtree_from_editmesh_get`

With this function it is easier to create and have control over editmeshes `BHVtree`s.

11 months agoUI: Various tooltip corrections and fixes
William Reynish [Fri, 23 Aug 2019 22:45:21 +0000 (00:45 +0200)]
UI: Various tooltip corrections and fixes

Patch by Yevgeny Makarov (jenkm)

Differential Revision: D5514

11 months agoUI: Sequencer: Move header spacer in to Preview modes
William Reynish [Fri, 23 Aug 2019 22:24:43 +0000 (00:24 +0200)]
UI: Sequencer: Move header spacer in to Preview modes

Patch by Peter Fog (tintwotin)

Differential Revision: D5511

11 months agoUI: Clip Editor: Move fractional zoom values into sub-menu
William Reynish [Fri, 23 Aug 2019 22:22:38 +0000 (00:22 +0200)]
UI: Clip Editor: Move fractional zoom values into sub-menu

Patch by Peter Fog (tintwotin)

Differential Revision: D5525

11 months agoTransform: option to transform origins in object mode
Campbell Barton [Thu, 22 Aug 2019 03:45:31 +0000 (13:45 +1000)]
Transform: option to transform origins in object mode

Currently supports mesh, armature, lattice, curve & metaballs.

Access from pivot popover.

11 months agoCleanup: unused args
Campbell Barton [Fri, 23 Aug 2019 21:33:15 +0000 (07:33 +1000)]
Cleanup: unused args

11 months agoCleanup: Fix PEP8 issues
Antonio Vazquez [Fri, 23 Aug 2019 21:24:07 +0000 (23:24 +0200)]
Cleanup: Fix PEP8 issues

11 months agoFix T66924 : Move GPencil Modifiers evaluation to Depsgraph
Antonio Vazquez [Fri, 23 Aug 2019 21:10:41 +0000 (23:10 +0200)]
Fix T66924 : Move GPencil Modifiers evaluation to Depsgraph

Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place.

This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes.

Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data.

As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today.

Reviewed By: brecht

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

11 months agoGPencil: Object data UI updates
Matias Mendiola [Fri, 23 Aug 2019 21:01:06 +0000 (23:01 +0200)]
GPencil: Object data UI updates

Some tweaks for the Grease Pencil object data UI:
- Update main layers controls for consistency (Opacity, Blend mode).
- Move "Show only On Keyframed" checkbox to Display section.
- Change "Duplicate Layer" icon in Layer menu.

{F7695928}

Reviewers: antoniov, pepeland, billreynish

Reviewed By: billreynish

Tags: #bf_blender, #grease_pencil

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

11 months agoRevert "Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading"
Brecht Van Lommel [Fri, 23 Aug 2019 18:28:43 +0000 (20:28 +0200)]
Revert "Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading"

This reverts commit d357e7b06535. This caused crashes in UV editor drawing and
updates in lookdev mode.

Fixes T69087, T69083, T69088, T69096.

11 months agoSnapping System: Improve drawing indicating `Perpendicular` snap
mano-wii [Fri, 23 Aug 2019 18:20:25 +0000 (15:20 -0300)]
Snapping System: Improve drawing indicating `Perpendicular` snap

Since pependicular snap depends on `snapTarget` it is important to indicate where this target is so as not to confuse users.
So draw a pivot where the target is and a dotted line toward the perpendicular snap point.

Reviewers: campbellbarton, brecht, billreynish

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

11 months agoLibOverride: Disable the re-parenting of overriding objects to the instancing empty.
Bastien Montagne [Fri, 23 Aug 2019 16:56:48 +0000 (18:56 +0200)]
LibOverride: Disable the re-parenting of overriding objects to the instancing empty.

Does not seems to be that useful... And it's breaking the objects also
'parented' to an armature through a modifier...

11 months agoUI: layout padding changes to autorun dialog, to match save dialog
Yevgeny Makarov [Fri, 23 Aug 2019 16:41:25 +0000 (18:41 +0200)]
UI: layout padding changes to autorun dialog, to match save dialog

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

11 months agoUI: layout and text changes for unsaved changes dialog
Harley Acheson [Fri, 23 Aug 2019 15:53:36 +0000 (17:53 +0200)]
UI: layout and text changes for unsaved changes dialog

Patch by Harley Acheson, with additional changes by Yevgeny Makarov.

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

11 months agoGPencil: Fix unreported set origin from Python
Antonio Vazquez [Fri, 23 Aug 2019 15:19:55 +0000 (17:19 +0200)]
GPencil: Fix unreported set origin from Python

The set origin was not working from python because the operator was checking if the stroke was valid in the console area.

As the stroke only can be valid for GP obects, this check is not needed.

11 months agoLibOverride: Fixed bug in removing override op operator.
Bastien Montagne [Fri, 23 Aug 2019 13:39:19 +0000 (15:39 +0200)]
LibOverride: Fixed bug in removing override op operator.

In case the property is a RNA pointer, `RNA_path_resolve()` will try to
resolve it and return that pointer, instead of returning expected
container... That is a bad inconsistency in the rNA path API, but no
proper way to solve it for now...

11 months agoFix potential issues when loading files with missing libraries
Sebastian Parborg [Fri, 23 Aug 2019 13:50:53 +0000 (15:50 +0200)]
Fix potential issues when loading files with missing libraries

This is a continuation of rB39f005eae8eed8b939579aff8c9a05a4f50e5e38

Now all the fields where we check for object type in RNA (like
rna_Curve_object_poll) will have a safe guard for when this isn't the
case.  For example when loading files that has missing object libraries
and all missing objects are replaced with empties (placeholders).

Reviewed By: Brecht

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

11 months agoUI: use consistent "Color Burn" name for blend mode
EitanSomething [Fri, 23 Aug 2019 11:13:59 +0000 (13:13 +0200)]
UI: use consistent "Color Burn" name for blend mode

Previously it was named just "Burn" in some places.

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

11 months agoFix T67140: transforming bone does not update bone tab in properties editor
Brecht Van Lommel [Fri, 23 Aug 2019 11:04:54 +0000 (13:04 +0200)]
Fix T67140: transforming bone does not update bone tab in properties editor

11 months agoFix T69075: OSL build with install_deps.sh failing at runtime
Brecht Van Lommel [Fri, 23 Aug 2019 09:55:58 +0000 (11:55 +0200)]
Fix T69075: OSL build with install_deps.sh failing at runtime

Now uses the same cmake flags as make deps.

11 months agoLibOverride: Add some basic non-nodal material properties to override realm.
Bastien Montagne [Fri, 23 Aug 2019 08:26:55 +0000 (10:26 +0200)]
LibOverride: Add some basic non-nodal material properties to override realm.

11 months agoRNA: Cleanup PointerRNA struct
Jacques Lucke [Fri, 23 Aug 2019 07:52:12 +0000 (09:52 +0200)]
RNA: Cleanup PointerRNA struct

The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
  struct {
    void *data;
  } id;

  struct StructRNA *type;
  void *data;
} PointerRNA;
```

This patch updates it to:
```
typedef struct PointerRNA {
  struct ID *owner_id;
  struct StructRNA *type;
  void *data;
} PointerRNA;
```

Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.

Reviewers: brecht, campbellbarton

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

11 months agoArmature: use BKE_armature_transform when applying transformation
Campbell Barton [Fri, 23 Aug 2019 01:53:45 +0000 (11:53 +1000)]
Armature: use BKE_armature_transform when applying transformation

Keep ED_armature_transform for RNA Armature.transform
since it operates on edit-bones in edit-mode.

Rename ED_armature_transform_bones to ED_armature_edit_transform
since it wasn't obviously an edit-mode function.

11 months agoArmature: add BKE_armature_transform
Campbell Barton [Fri, 23 Aug 2019 00:38:30 +0000 (10:38 +1000)]
Armature: add BKE_armature_transform

ED_armature_transform uses edit-mode conversion which re-creates bones.
Needed for efficiently transforming object-data in object-mode.

11 months agoCleanup: const args, naming, doxy groups, clang-format
Campbell Barton [Thu, 22 Aug 2019 23:03:57 +0000 (09:03 +1000)]
Cleanup: const args, naming, doxy groups, clang-format

11 months agoOutliner: new icons for sequences and contraints
Nathan Craddock [Thu, 22 Aug 2019 20:00:22 +0000 (14:00 -0600)]
Outliner: new icons for sequences and contraints

Adds a new icon for the action constraint so the icon draws with the
constraints color. Also adds two new icons for sequencer meta strips
and duplicate strips for use in the outliner sequence display mode.

The meta strip icon could be used in the sequencer sidebar.

11 months agoUI: Changes to Area Options Menu
Harley Acheson [Thu, 22 Aug 2019 20:19:11 +0000 (13:19 -0700)]
UI: Changes to Area Options Menu

Adds more options to the context menu that pops up on area edges. Both Split types, Join, and Swap.

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

Reviewed by Brecht Van Lommel

11 months agoCleanup/Refactor: Simplify/deduplicate bvhutils code
mano-wii [Thu, 22 Aug 2019 17:07:40 +0000 (14:07 -0300)]
Cleanup/Refactor: Simplify/deduplicate bvhutils code

This is a step that allow using `bvh_cache` for `EditMeshe`s.

11 months agoCleanup: undeclared variable warnings
Campbell Barton [Thu, 22 Aug 2019 16:22:23 +0000 (02:22 +1000)]
Cleanup: undeclared variable warnings

Forward declare variables, or make them static.

11 months agoGPencil: Fix missing variable due typo error
Antonio Vazquez [Thu, 22 Aug 2019 16:28:00 +0000 (18:28 +0200)]
GPencil: Fix missing variable due typo error

11 months agoCmake/MSVC: Enable Edit and Continue for debug builds.
Lazydodo [Thu, 22 Aug 2019 16:20:40 +0000 (10:20 -0600)]
Cmake/MSVC: Enable Edit and Continue for debug builds.

This change switches the debug symbol format from /Zi to /ZI for
debug builds of blender, allowing Edit and Continue to work.

This allows limited [1] code changes in the debugger without
having to stop the process and recompile a new binary leading
to improved developer productivity.

All MSVC versions we support support this flag, Clang on
windows does not mind the /ZI flag, but doesn't currently
emit the required information to have this feature work.

[1] https://docs.microsoft.com/en-us/visualstudio/debugger/supported-code-changes-cpp

11 months agoUI: Remove "Show Frame Indicator" option
Jacques Lucke [Thu, 22 Aug 2019 15:55:21 +0000 (17:55 +0200)]
UI: Remove "Show Frame Indicator" option

This option was doing nothing in Blender 2.80.
I don't really see a reason for keeping it around.

Reviewers: campbellbarton

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

11 months agoRevert "Fix T68971: Copy As New Driver from Material node creates a bad reference."
Bastien Montagne [Thu, 22 Aug 2019 14:00:59 +0000 (16:00 +0200)]
Revert "Fix T68971: Copy As New Driver from Material node creates a bad reference."

This reverts commits 54fd8176d7e914c5becb6b1 and 8f578150e.

Those kind of commits must be reviewed and approved by project owners.

That one:
* Broke Collada building by not properly updating all calls to modified
function.
* Broke *whole* ID management by not properly updating library_query.c.

And in general, I am strongly against backward ID pointers, those are
*always* a serious PITA for ID management. Sometimes  they cannot be
avoided, but in general other ways to get that kind of info should be
investigated first.

11 months agoFix crash using 'Mesh > Normals > Point to Target' from the header menu
Philipp Oeser [Thu, 22 Aug 2019 12:53:44 +0000 (14:53 +0200)]
Fix crash using 'Mesh > Normals > Point to Target' from the header menu

This was working from Alt+N menu but was passing wrong ARegion
(alongside wrong mouse coords) to ED_view3d_win_to_3d_int when called
from the header menu.

Operator context INVOKE_REGION_WIN takes care of this.

This also fixes wrong behavior of 'Mesh > Normals > Rotate' when called
from the header menu.

part of T69019

Reviewers: billreynish, mont29

Maniphest Tasks: T69019

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

11 months agoNodeTree: also assign the owner pointer when copying.
Alexander Gavrilov [Thu, 22 Aug 2019 13:54:51 +0000 (16:54 +0300)]
NodeTree: also assign the owner pointer when copying.

11 months agoSnapping System: Return element type in 'ED_transform_snap_object_project_view3d_ex'
mano-wii [Thu, 22 Aug 2019 13:53:21 +0000 (10:53 -0300)]
Snapping System: Return element type in 'ED_transform_snap_object_project_view3d_ex'

11 months agoCleanup: Split some code out of rna_access.c
Bastien Montagne [Thu, 22 Aug 2019 13:31:07 +0000 (15:31 +0200)]
Cleanup: Split some code out of rna_access.c

That file was getting out of control, now comparison/override RNA code is
in `rna_access_compare_override.c`. 1K lines of code for now, but that
area is likely to grow more in the future...

Note that we can probably split more out of `rna_access.c`, but for now
that will do.

11 months agoMulti-View user interface minor tweak
Dalai Felinto [Wed, 21 Aug 2019 18:11:47 +0000 (15:11 -0300)]
Multi-View user interface minor tweak

There is no reason to not expand this enum as we did for 2.79.
It is self explanatory enough and it has only two options.

11 months agoFix missing argument.
Alexander Gavrilov [Thu, 22 Aug 2019 13:14:48 +0000 (16:14 +0300)]
Fix missing argument.

Missed because of broken dependency tracking in msvc build process.

11 months agoFix T68971: Copy As New Driver from Material node creates a bad reference.
Alexander Gavrilov [Thu, 22 Aug 2019 12:40:10 +0000 (15:40 +0300)]
Fix T68971: Copy As New Driver from Material node creates a bad reference.

NodeTree structures of materials and some other data blocks are
effectively node group data block objects that are contained inside
the parent block. Thus, direct references to them are only valid
while blender is running, and are lost on save.

Fix Copy As New Driver to create a reference that goes through
the owner data block, by adding a new runtime field to bNodeTree.

11 months agoLibOverride: Enforce full override operations check on file save.
Bastien Montagne [Thu, 22 Aug 2019 12:32:17 +0000 (14:32 +0200)]
LibOverride: Enforce full override operations check on file save.

We try to avoid diffing too much things during edition, but when saving
a file we need to check all possible overridable IDs to ensure we have
all needed override operations...

Was pretty sure that was already in code, but apparently not (or it got
lost at some point...).

11 months agoLibOverride: Cleanup: tget rid of G.main usage when we can get it from context.
Bastien Montagne [Thu, 22 Aug 2019 12:31:39 +0000 (14:31 +0200)]
LibOverride: Cleanup: tget rid of G.main usage when we can get it from context.

11 months agoLibOverride: Fix broken logic in code checking and adding new override ops.
Bastien Montagne [Thu, 22 Aug 2019 12:28:31 +0000 (14:28 +0200)]
LibOverride: Fix broken logic in code checking and adding new override ops.

When we wanted to force all overidable IDs to be checked, code would end
up checking the whole Main DB, instead of only overrideable ones.

11 months agoShading: Add object color to Object Info node.
OmarSquircleArt [Thu, 22 Aug 2019 12:26:09 +0000 (14:26 +0200)]
Shading: Add object color to Object Info node.

The object color property is added as an additional output in
the Object Info node.

Reviewers: brecht

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

11 months agoFix T68969: current value '0' matches no enum in 'ToolSettings', '(null)', 'snap_node...
mano-wii [Thu, 22 Aug 2019 12:07:07 +0000 (09:07 -0300)]
Fix T68969: current value '0' matches no enum in 'ToolSettings', '(null)', 'snap_node_element'

I don't think a versioning solution is necessary in this case.
But it can still be implemented.

11 months agoRevert "Fix grid snap value in recent snapping updates"
mano-wii [Thu, 22 Aug 2019 12:03:20 +0000 (09:03 -0300)]
Revert "Fix grid snap value in recent snapping updates"

This reverts commit 48a7f979a5cf2669656d25767c4173fb65bfb67d.

Another solution to come.

11 months agoFix T69044: OpenCL fail due to bad fract function.
OmarSquircleArt [Thu, 22 Aug 2019 11:47:24 +0000 (13:47 +0200)]
Fix T69044: OpenCL fail due to bad fract function.

The fract function in OpenCL does more than just return the fraction.
It also writes the floor to the second argument. Which wasn't put
in consideration.

Instead, we use a simple `a - floor(a)` like the Math node.

Reviewers: brecht

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

11 months agoTransform: Snap Perpendicular: Avoid snapping to snapTarget
mano-wii [Thu, 22 Aug 2019 11:07:41 +0000 (08:07 -0300)]
Transform: Snap Perpendicular: Avoid snapping to snapTarget

11 months agoTransform: Snap Perpendicular: Use `snapTarget` instead of `center_global`
mano-wii [Thu, 22 Aug 2019 11:00:53 +0000 (08:00 -0300)]
Transform: Snap Perpendicular: Use `snapTarget` instead of `center_global`

11 months agoLibOverride: Cleanup: rename parameters in RNA apply code.
Bastien Montagne [Thu, 22 Aug 2019 10:19:37 +0000 (12:19 +0200)]
LibOverride: Cleanup: rename parameters in RNA apply code.

We cannot use local/reference here, that is very confusing, since at
that stage current local is kind of src of data for the future local ID,
that is currently a mere copy of the linked data... ;)

So we are much better with src/dst names here.

11 months agoNodes: Support for socket shapes other than circle
Charlie Jolly [Thu, 22 Aug 2019 09:10:11 +0000 (11:10 +0200)]
Nodes: Support for socket shapes other than circle

Previously there was already "draw_shape" property,
but it was doing nothing. This commit renames the
property to "display_shape". Furthermore, different
shapes like SQUARE and DIAMOND are supported now.

Currently, the shapes are drawn using the shader that also
draws keyframes. In the future we might want to separate
this.

The new shapes are not used anywhere yet, but they can
be used by addon developers and will probably be useful
when we want to support different kinds node systems later.
For example, different shapes can be used to distinguish
between data and control flow.

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

11 months agoCleanup: remove edit-mode check in vertex coordinate access
Campbell Barton [Thu, 22 Aug 2019 03:20:05 +0000 (13:20 +1000)]
Cleanup: remove edit-mode check in vertex coordinate access

This makes the function more predictable since other object
types don't access edit-mode data.

11 months agoCleanup: typo in last commit
Campbell Barton [Wed, 21 Aug 2019 23:13:17 +0000 (09:13 +1000)]
Cleanup: typo in last commit

11 months agoCleanup: vertex coordinate access, naming & minor changes
Campbell Barton [Wed, 21 Aug 2019 20:28:35 +0000 (06:28 +1000)]
Cleanup: vertex coordinate access, naming & minor changes

This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.

11 months agoCleanup: use doxy groups
Campbell Barton [Wed, 21 Aug 2019 18:56:18 +0000 (04:56 +1000)]
Cleanup: use doxy groups

11 months agoCleanup: clang-format
Campbell Barton [Wed, 21 Aug 2019 18:36:04 +0000 (04:36 +1000)]
Cleanup: clang-format

11 months agoShading: Add Volume Info node.
OmarSquircleArt [Wed, 21 Aug 2019 18:22:24 +0000 (20:22 +0200)]
Shading: Add Volume Info node.

The Volume Info node provides the Color, Desnity, Flame, and Temperature
of smoke domains.

Reviewers: brecht

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

11 months agoShading: Add White Noise node.
OmarSquircleArt [Wed, 21 Aug 2019 18:04:09 +0000 (20:04 +0200)]
Shading: Add White Noise node.

The White Noise node hashes the input and returns a random number in the
range [0, 1]. The input can be a 1D, 2D, 3D, or a 4D vector.

Reviewers: brecht, JacquesLucke

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

11 months agoShading: Add more operators to Vector Math node.
OmarSquircleArt [Wed, 21 Aug 2019 17:36:33 +0000 (19:36 +0200)]
Shading: Add more operators to Vector Math node.

Add Multiply, Divide, Project, Reflect, Distance, Length, Scale, Snap,
Floor, Ceil, Modulo, Fraction, Absolute, Minimum, and Maximum operators
to the Vector Math node. The Value output has been removed from operators
whose output is a vector, and the other way around. All of those removals
has been handled properly in versioning code.

The patch doesn't include tests for the new operators. Tests will be added
in a later patch.

Reviewers: brecht, JacquesLucke

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

11 months agoCleanup: remove old Windows scons installer, this is handled by CMake now
Brecht Van Lommel [Wed, 21 Aug 2019 15:08:12 +0000 (17:08 +0200)]
Cleanup: remove old Windows scons installer, this is handled by CMake now

11 months agoCleanup: Fix build error with MSVC
Lazydodo [Wed, 21 Aug 2019 16:38:33 +0000 (10:38 -0600)]
Cleanup: Fix build error with MSVC

Previously eigens internal include order somehow implicitly provided
M_PI and friends. The recent eigen version bump broke this implicit
behaviour, better to be explicit that we need the math defines for MSVC.

11 months agoTimeline: refactor cache drawing
Jacques Lucke [Wed, 21 Aug 2019 15:21:06 +0000 (17:21 +0200)]
Timeline: refactor cache drawing

I did this mostly to get to know the point cache from this direction.
This should not change anything from the user perspective.

11 months agoLibOverride: Fix inverted logic in RNA collection operation application.
Bastien Montagne [Wed, 21 Aug 2019 15:10:40 +0000 (17:10 +0200)]
LibOverride: Fix inverted logic in RNA collection operation application.

Note to self: need to recheck the namings of whole override code,
currently this is way to confusing and inconsistent.

11 months agoCleanup: minor error in assert message in libOverride collection code.
Bastien Montagne [Wed, 21 Aug 2019 15:10:10 +0000 (17:10 +0200)]
Cleanup: minor error in assert message in libOverride collection code.

11 months agoFix T68826 Eevee: Multi-Mat not working if switching from Solid shading
Clément Foucault [Wed, 21 Aug 2019 13:53:57 +0000 (15:53 +0200)]
Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading

The correct fix would be to avoid all those hacks but this is needed if
we want to be able to parallelize object vbo extractions.

11 months agoGPU: Fix Element index range calculation
Clément Foucault [Wed, 21 Aug 2019 12:47:41 +0000 (14:47 +0200)]
GPU: Fix Element index range calculation

Fix T68880 2D line display is broken

11 months agoUpdate Eigen to 3.3.7
Sebastian Parborg [Wed, 21 Aug 2019 12:13:09 +0000 (14:13 +0200)]
Update Eigen to 3.3.7

This is in preparation for the QuadriFlow remesher lib.

Reviewed By: Brecht

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

11 months agoFix T68837 Eevee: Fix "GPU failed to find function math_max" message
Clément Foucault [Wed, 21 Aug 2019 11:39:09 +0000 (13:39 +0200)]
Fix T68837 Eevee: Fix "GPU failed to find function math_max" message

Was a missing rename.

11 months agoUpdate CUEW to latest version
Brecht Van Lommel [Wed, 21 Aug 2019 09:49:29 +0000 (11:49 +0200)]
Update CUEW to latest version

11 months agoFix T68951: Incrementing int property causes overflow
Jacques Lucke [Wed, 21 Aug 2019 09:30:27 +0000 (11:30 +0200)]
Fix T68951: Incrementing int property causes overflow

This was probably introduced in rBfdef1a6712b.

11 months agoFix T68943: GPencil Time modifier gets strange value in offset parameter
Antonio Vazquez [Wed, 21 Aug 2019 09:05:44 +0000 (11:05 +0200)]
Fix T68943: GPencil Time modifier gets strange value in offset parameter

This is due a limitation in the RNA property when the range is too extreme. As we don't need that, the value was set to SHRT_MAX frames as maximum offset.

Also fixed the same problem in other modules of Grease Pencil.

11 months agoUI: Don't left align operator buttons in toolbars
Julian Eisel [Wed, 21 Aug 2019 08:32:23 +0000 (10:32 +0200)]
UI: Don't left align operator buttons in toolbars

This hack would make operator (push down) buttons without icons align
their text to the left in toolbars. Everywhere else in Blender, we
center it by default.

We barely use operator buttons in toolbars anymore. Even if we do and
there's a good reason to make text left aligned, it's better to use
`uiLayout.alignment = 'LEFT'` to achieve the same effect, but without
lowish-level hacks for a specific region type.

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

11 months agoFix T65671: Armature X-Mirror inconsistencies
Demeter Dzadik [Wed, 21 Aug 2019 07:59:11 +0000 (09:59 +0200)]
Fix T65671: Armature X-Mirror inconsistencies

This fixes bendy bone properties not being mirrored correctly

Reviewed By: Brecht

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

11 months agoGPencil: add new filter by material to modifiers
Matias Mendiola [Wed, 21 Aug 2019 06:30:45 +0000 (08:30 +0200)]
GPencil: add new filter by material to modifiers

This commit adds a new filter by material using the name and not only the index.

Reviewers: antoniov, pepeland

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

11 months agoCleanup: pass lattice directly vertex coord utilities
Campbell Barton [Wed, 21 Aug 2019 05:04:41 +0000 (15:04 +1000)]
Cleanup: pass lattice directly vertex coord utilities

11 months agoFix T68444: outliner bone visibility not updating
Nathan Craddock [Wed, 21 Aug 2019 04:30:32 +0000 (22:30 -0600)]
Fix T68444: outliner bone visibility not updating

Tags for update when pose bone visibility is toggled in the outliner.

11 months agoFix T68429: wrong pose bone hide icon in outliner
Nathan Craddock [Wed, 21 Aug 2019 04:08:51 +0000 (22:08 -0600)]
Fix T68429: wrong pose bone hide icon in outliner

The hide icon was drawing instead of the disable in viewports icon.

11 months agoCleanup: use const arguments for vertex coords
Campbell Barton [Wed, 21 Aug 2019 01:46:04 +0000 (11:46 +1000)]
Cleanup: use const arguments for vertex coords