blender.git
4 months agoPython API: expose conversion between tweaked NLA strip and scene time.
Alexander Gavrilov [Mon, 13 May 2019 18:01:03 +0000 (21:01 +0300)]
Python API: expose conversion between tweaked NLA strip and scene time.

This is necessary to correctly do low-level keyframe manipulation
in tweak mode, and the logic is complex enough that re-implementing
it in Python is impractical.

4 months agoBetter support for (mirrored) bbone scaling in pose mode
Philipp Oeser [Mon, 13 May 2019 11:16:22 +0000 (13:16 +0200)]
Better support for (mirrored) bbone scaling in pose mode

since own rB5d9d32fd1fa3 (mirror bbone scaling in editmode)
- bbone scaling in posemode was missing immediate updates
- bbone scaling in posemode could crash

This now properly supports mirroring in posemode as well.
note: for bbone scaling, I made both X-Axis-Mirror options (editmode
option as well as posemode option) valid.

Fixes T64091

Reviewers: brecht

Maniphest Tasks: T64091

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

4 months agoApply Pose as Rest Pose: implement an Only Selected bones option.
Alexander Gavrilov [Sun, 8 Jul 2018 14:10:15 +0000 (17:10 +0300)]
Apply Pose as Rest Pose: implement an Only Selected bones option.

The most difficult part is handling parent-child relations correctly:
when a parent is applied, the children should be moved accordingly,
and when applying a child, it should not include transformation from
unapplied parents. All this requires walking bones as a tree, instead
of a flat list.

Limitation: Applying bones with non-uniform scaling without also applying
children will distort non-rest posing on said children for reasons related
to T54159 (basically, non-uniform scale plus rotation creates shear, and
Blender matrix decomposition utilities don't have tools to deal with it).

Reviewers: campbellbarton, brecht, mont29

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

4 months agoI18n Disambiguation: "Shift".
Bastien Montagne [Mon, 13 May 2019 15:57:13 +0000 (17:57 +0200)]
I18n Disambiguation: "Shift".

Give WM context to the shortcut, since this is more specific meaning
than usual 'shifting' one...

Part of T43295.

4 months agoI18n Disambiguation: One more case of 'Root' falloff without 'Curve' context.
Bastien Montagne [Mon, 13 May 2019 15:33:12 +0000 (17:33 +0200)]
I18n Disambiguation: One more case of 'Root' falloff without 'Curve' context.

Part of T43295.

4 months agoI18n Disambiguation: "Add" in menu labels.
Bastien Montagne [Mon, 13 May 2019 15:27:40 +0000 (17:27 +0200)]
I18n Disambiguation: "Add" in menu labels.

This one is usually a verb/action one in menus' labels,
hence we give it the Operator default context.

Part of T43295.

4 months agoFix T63325: Drivers freezing input value
Sergey Sharybin [Mon, 13 May 2019 15:54:27 +0000 (17:54 +0200)]
Fix T63325: Drivers freezing input value

Not sure why driver would be affecting on the behavior, the actual
issue was caused by lack of proper relations built for lamps and
cameras.

4 months agoFix T64387: Crash with driver copy/paste
Sergey Sharybin [Mon, 13 May 2019 14:45:03 +0000 (16:45 +0200)]
Fix T64387: Crash with driver copy/paste

Was missing copy-on-write tag since lamp itself has no geometry or
transform.

Now tagging for animation, and taking care of special case in the
dependency graph.

4 months agoCycles/Eevee: add Emission and Alpha inputs to Principled BSDF
Brecht Van Lommel [Sun, 12 May 2019 12:39:30 +0000 (14:39 +0200)]
Cycles/Eevee: add Emission and Alpha inputs to Principled BSDF

This makes it easier to set up materials with emission and transparency.
Importers/exporters and add-ons are recommended to now use these rather than
creating separate transparent BSDF and emission nodes.

4 months agoCycles/Eevee: unify light strength and color
Brecht Van Lommel [Sun, 12 May 2019 11:41:23 +0000 (13:41 +0200)]
Cycles/Eevee: unify light strength and color

Cycles lights now use strength and color properties of the light outside
of the shading nodes, just like Eevee. The shading nodes then act as a
multiplier on this, and become optional unless textures, fallof or other
effects are desired.

Backwards compatibility is not exact, as we can't be sure which renderer
the .blend was designed for or even if it was designed for a single one.

If the render engine in the active scene is set to Cycles, lights are
converted to ensure overall light strength remains the same, and removing
unnecessary shader node setups that only included a single emission node.

If the engine is set to Eevee, we increase strength to remove the automatic
100x multiplier that was there to match Cycles.

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

4 months agoCycles/Eevee: unified and improved texture image color space handling
Brecht Van Lommel [Tue, 23 Apr 2019 11:56:30 +0000 (13:56 +0200)]
Cycles/Eevee: unified and improved texture image color space handling

Cycles now uses the color space on the image datablock, and uses OpenColorIO
to convert to scene linear as needed. Byte images do not take extra memory,
they are compressed in scene linear + sRGB transfer function which in common
cases is a no-op.

Eevee and workbench were changed to work similar. Float images are stored as
scene linear. Byte images are compressed as scene linear + sRGB and stored in
a GL_SRGB8_ALPHA8 texture. From the GLSL shader side this means they are read
as scene linear, simplifying the code and taking advantage of hardware support.

Further, OpenGL image textures are now all stored with premultiplied alpha.
Eevee texture sampling looks a little different now because interpolation
happens premultiplied and in scene linear space.

Overlays and grease pencil work in sRGB space so those now have an extra
conversion to sRGB after reading from image textures. This is not particularly
elegant but as long as engines use different conventions, one or the other
needs to do conversion.

This change breaks compatibility for cases where multiple image texture nodes
were using the same image with different color space node settings. However it
gives more predictable behavior for baking and texture painting if save, load
and image editing operations have a single color space to handle.

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

4 months agoTests: disable DoF in Eevee tests for now, it adds blurring with default values
Brecht Van Lommel [Mon, 13 May 2019 10:04:54 +0000 (12:04 +0200)]
Tests: disable DoF in Eevee tests for now, it adds blurring with default values

4 months agoDepsgraph: Use for_render flag for curves from depsgraph
Sergey Sharybin [Mon, 13 May 2019 13:24:43 +0000 (15:24 +0200)]
Depsgraph: Use for_render flag for curves from depsgraph

Fixes issue with Eevee always using viewport curve resolution.

4 months agoCurve: Remove duplicated and confusing argument
Sergey Sharybin [Mon, 13 May 2019 07:42:32 +0000 (09:42 +0200)]
Curve: Remove duplicated and confusing argument

Curve function had two arguments:

- for_render, which was originally supposed to be used to control
  whether viewport or render visibility for modifiers is to be
  used.

- use_render_resolution, which sounds like it is supposed to control
  whether viewport or render resolution for curves is to be used.

What is totally confusing is that those arguments were used
interchangeably: sometimes use_render_resolution would control
modifiers visibility.

This commit makes it so there is one single argument for this.

Reviewers: brecht

Reviewed By: brecht

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

4 months agoPreferences: set dirty when editing quick favourites menu
Campbell Barton [Mon, 13 May 2019 12:28:43 +0000 (22:28 +1000)]
Preferences: set dirty when editing quick favourites menu

4 months agoUI: Don't display markers in driver editor
Jacques Lucke [Mon, 13 May 2019 09:55:38 +0000 (11:55 +0200)]
UI: Don't display markers in driver editor

4 months agoFix T64403: crash sampling coloring in texture paint mode
Brecht Van Lommel [Mon, 13 May 2019 09:45:16 +0000 (11:45 +0200)]
Fix T64403: crash sampling coloring in texture paint mode

4 months agoFix T64041: Vertex Sharp not working.
Bastien Montagne [Mon, 13 May 2019 09:48:55 +0000 (11:48 +0200)]
Fix T64041: Vertex Sharp not working.

Broken in rB0ac3d5f7db67 last year...

4 months agoUI: rename Load Preferences to Revert
Campbell Barton [Mon, 13 May 2019 09:30:36 +0000 (19:30 +1000)]
UI: rename Load Preferences to Revert

4 months agoFix T64120: Dynamic Paint Doesn't Recalculate Normals with Smooth Shading.
Bastien Montagne [Mon, 13 May 2019 09:37:22 +0000 (11:37 +0200)]
Fix T64120: Dynamic Paint Doesn't Recalculate Normals with Smooth Shading.

For wome reason, tag to mark normals as needing recompute was commented
out instead of updated to new system, during conversion of DynaPaint
code for 2.8 new evaluation stack... Trivial fix.

4 months agoRNA: disable undo on OperatorProperties and its subclasses.
Alexander Gavrilov [Mon, 13 May 2019 09:36:39 +0000 (12:36 +0300)]
RNA: disable undo on OperatorProperties and its subclasses.

Since these are temporary properties, changing them shouldn't cause
undo pushes. There already is a flag to disable that, but since each
operator inherits its own properties from the base, RNA define code
also had to be changed to allow inheriting the flag.

4 months agoFix unintended autosaving of preferences in a few cases
Brecht Van Lommel [Mon, 13 May 2019 08:52:14 +0000 (10:52 +0200)]
Fix unintended autosaving of preferences in a few cases

* Dirty flag was not cleared on load
* Navigating tabs should not cause save
* Background mode should not autosave (for e.g. render farms and tests)

4 months agoPython API: expose preferences.is_dirty
Brecht Van Lommel [Mon, 13 May 2019 08:51:50 +0000 (10:51 +0200)]
Python API: expose preferences.is_dirty

4 months agocleanup: typo in comment
Philipp Oeser [Mon, 13 May 2019 08:14:41 +0000 (10:14 +0200)]
cleanup: typo in comment

4 months agoFix T64427: WITH_HEADLESS build option
Campbell Barton [Mon, 13 May 2019 07:41:14 +0000 (17:41 +1000)]
Fix T64427: WITH_HEADLESS build option

4 months agoFix T64461: Sub-panels allow pinning
Campbell Barton [Mon, 13 May 2019 06:53:40 +0000 (16:53 +1000)]
Fix T64461: Sub-panels allow pinning

4 months agoUI: disable decorators for workspace buttons
Campbell Barton [Mon, 13 May 2019 06:45:30 +0000 (16:45 +1000)]
UI: disable decorators for workspace buttons

4 months agoPreferences: auto-save on exit
Campbell Barton [Mon, 13 May 2019 05:59:27 +0000 (15:59 +1000)]
Preferences: auto-save on exit

Save modified preferences on exit by default,
with the option to disable this.

4 months agoPreferences: tag as dirty for add-ons & loading factory startup
Campbell Barton [Mon, 13 May 2019 05:51:49 +0000 (15:51 +1000)]
Preferences: tag as dirty for add-ons & loading factory startup

4 months agoUI: add load preferences operators to header
Campbell Barton [Mon, 13 May 2019 03:49:40 +0000 (13:49 +1000)]
UI: add load preferences operators to header

Recent changes only included them in the side-bar.

4 months agoPreferences: support loading factory preferences
Campbell Barton [Mon, 13 May 2019 03:25:51 +0000 (13:25 +1000)]
Preferences: support loading factory preferences

Previously it was only possible to load factory startup & preferences.

4 months agoPrefernces: support loading last saved preferences
Campbell Barton [Mon, 13 May 2019 02:44:08 +0000 (12:44 +1000)]
Prefernces: support loading last saved preferences

4 months agoreadfile: support preferences without loading data-blocks
Campbell Barton [Mon, 13 May 2019 02:36:14 +0000 (12:36 +1000)]
readfile: support preferences without loading data-blocks

Needed to support reading preferences without replacing blend file data.

4 months agoFix T64371
Richard Antalik [Sun, 12 May 2019 22:21:38 +0000 (15:21 -0700)]
Fix T64371

Variable stripe_offs used without been initialized

Reviewed by: brecht

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

4 months agoFix T64463: Visual Artifacts with ColorRamp
Harley Acheson [Sun, 12 May 2019 22:21:43 +0000 (15:21 -0700)]
Fix T64463: Visual Artifacts with ColorRamp

This patch fixes an issue with the ColorRamp overflowing its drawing bounds

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

Reviewed by Brecht Van Lommel

4 months agoIndustry Compat keymap: Fix gizmos overriding view manipulation
William Reynish [Sun, 12 May 2019 20:50:44 +0000 (22:50 +0200)]
Industry Compat keymap: Fix gizmos overriding view manipulation

Previously, if the cursor was over a gizmo, you could not manipulate the view using Alt-key view manipulation

This addresses T60984 for this keymap

4 months agoUI: Reinstate icons in the Physics Properties
William Reynish [Sun, 12 May 2019 17:57:56 +0000 (19:57 +0200)]
UI: Reinstate icons in the Physics Properties

These were removed at a time when there were no modifier icons.

4 months agoIndustry Compat keymap: Add support for Grease Pencil Draw mode
William Reynish [Sun, 12 May 2019 17:22:11 +0000 (19:22 +0200)]
Industry Compat keymap: Add support for Grease Pencil Draw mode

  - Fix Alt-key navigation (was conflicting with Alt-click to set straight lines)
  - Use consistent shortcuts for brush strength and size
  - Use direct shortcuts for switching tools

4 months agoIndustry Compat keymap: Fix midpoint snapping with the Knife tool
William Reynish [Sun, 12 May 2019 16:19:38 +0000 (18:19 +0200)]
Industry Compat keymap: Fix midpoint snapping with the Knife tool

There was an issue blocking the the Add Cut step while holding Ctrl

4 months agoPython API: expose more keyframing flags for use in keyframe_insert.
Alexander Gavrilov [Sat, 11 May 2019 18:16:46 +0000 (21:16 +0300)]
Python API: expose more keyframing flags for use in keyframe_insert.

Expose REPLACE and CYCLE_AWARE, and add AVAILABLE for completeness.
These flags are generic and safe to use, and necessary to match
the behavior of certain UI options.

4 months agoUI: Nudge Curve Editor Away from Scrollbar
Harley Acheson [Sat, 11 May 2019 17:48:05 +0000 (10:48 -0700)]
UI: Nudge Curve Editor Away from Scrollbar

This patch increases left and right padding of the Curve Editor to avoid scrollbars

Reviewed by Brecht Van Lommel

4 months agoFix T59627: missing COW update tags when joining armatures.
Alexander Gavrilov [Sat, 11 May 2019 14:53:17 +0000 (17:53 +0300)]
Fix T59627: missing COW update tags when joining armatures.

Objects that had constraints or drivers referring to the
joined armatures weren't tagged, and thus evaluated copies
ended up with old bad pointers.

4 months agoRevert API change (hide_viewport > hide_instance)
Dalai Felinto [Sat, 11 May 2019 14:22:41 +0000 (11:22 -0300)]
Revert API change (hide_viewport > hide_instance)

The change was introduced on b1af68200159.

We may still change the name functionality of this anyways -  we are
not really changing only the instancing visibility here at the moment.

So there is no reason to break the API in the meantime.
And in the future we can simply add a new API entry, leaving the old one
to be slowly deprecated.

4 months agoFix (unreported) annoying UI assert for expanded enums.
Bastien Montagne [Sat, 11 May 2019 13:35:48 +0000 (15:35 +0200)]
Fix (unreported) annoying UI assert for expanded enums.

All buttons will get their own block's `func` by default, this cannot be
considered an error, do not assert in that case either.

Fixes bunch of very annoying asserts e.g. when using FBX exporter...

4 months agoDRW: Fix previous commit
Clément Foucault [Sat, 11 May 2019 11:16:57 +0000 (13:16 +0200)]
DRW: Fix previous commit

PS: I hate my life

4 months agoFix T64464 App crashes when navigating between UV Editor and Viewport
Clément Foucault [Sat, 11 May 2019 11:10:28 +0000 (13:10 +0200)]
Fix T64464 App crashes when navigating between UV Editor and Viewport

4 months agoPreferences: disable save-on exit until there is a revert button
Campbell Barton [Sat, 11 May 2019 11:03:28 +0000 (21:03 +1000)]
Preferences: disable save-on exit until there is a revert button

4 months agoFix error in recent is_dirty preferences flag
Campbell Barton [Sat, 11 May 2019 09:18:27 +0000 (19:18 +1000)]
Fix error in recent is_dirty preferences flag

Error in b95b6b796695a8b82 caused crash changing themes.

Resolves T64444

4 months agoGPencil: Apply FBO changes to AA macros
Antonioya [Sat, 11 May 2019 06:35:03 +0000 (08:35 +0200)]
GPencil: Apply FBO changes to AA macros

Apply same change done to fix the task T64373

4 months agoOutliner Visibility Update
Dalai Felinto [Sat, 4 May 2019 17:14:37 +0000 (14:14 -0300)]
Outliner Visibility Update

See T61578 for discussions and mockups.

Visibility Options
==================
We are adding more granular control over restriction columns in the outliner,
exposing "indirect only" and "holdout" as options, and change the way
users enable/disable collections in a viewlayer.

We also rename the object viewport restriction to hide instance.

So the options we have are:

Collection
----------
* Render Visibility
* Instance Visibility
* Selectable

(View) Layer Collection
-----------------------
* Enable
* Holdout
* Indirect Only
* Viewport

Shortcuts
=========
Isolate Collection
------------------
* Ctr + click isolates the collection.
It turns all its parents and children "visible", and all the other
collections "invisible".

If ALL the collections were already properly set, we re-set the
collections to their default value.

Set Collection Inside Collections and Objects
---------------------------------------------
* Shift + click: Set/unset inside collections and objects.

We only set objects values as well when we are in View Layer mode and
(obviously) when the objects have a matching property.

Icons
=====
Little reminder that we will need better icons for holdout, indirect only, and
probably instanced (nothing wrong with the current, but it differs from
the proposal when it is turned off).

Also, we need to decide where do we want the modifier/bones/... icons to
be (in which column) and ideally make sure their icons match the ones we
use for collections/objects.

At the moment those are using the screen icon, which is not being used
by collections.

Reviewers: brecht, billrey
Subscribers: pablovazquez
Differential Revision: https://developer.blender.org/D4823

4 months agoFix T64137 Empty Images flickering graphics when "Auto Depth" is enabled
Clément Foucault [Fri, 10 May 2019 22:21:27 +0000 (00:21 +0200)]
Fix T64137 Empty Images flickering graphics when "Auto Depth" is enabled

Also fix T64373 Grid intensity increases in Ortographic when use Circle
Select in GPencil Edit mode

4 months agoTests: speed up render tests by running multiple in the same process
Brecht Van Lommel [Fri, 10 May 2019 21:00:35 +0000 (23:00 +0200)]
Tests: speed up render tests by running multiple in the same process

Blender startup time and shader compilation is a big factor when running
hundreds of tests, so now all renders in the same ctest run in the same
process. If a test crashes, the remaining tests in the same category will
be marked as skipped.

Benchmarked on a quad core with ctest -j8.

cycles: 118.1s -> 94.3s
eevee: 66.2s -> 29.2s
workbench: 31.7s -> 8.6s

4 months agoTests: fix eevee and workbench using Cycles in a few tests
Brecht Van Lommel [Fri, 10 May 2019 21:20:32 +0000 (23:20 +0200)]
Tests: fix eevee and workbench using Cycles in a few tests

4 months agoCycles: add function to clear resumable chunk
Brecht Van Lommel [Fri, 10 May 2019 21:32:58 +0000 (23:32 +0200)]
Cycles: add function to clear resumable chunk

4 months agoAudaspace: porting changes from upstream.
Jörg Müller [Fri, 10 May 2019 21:01:04 +0000 (23:01 +0200)]
Audaspace: porting changes from upstream.

- Silence now has an optional sample rate parameter.
- Fix: wrong length reported by modulator and superpose.
- Minor formatting, include and documentation fixes.

4 months agoTests: Be more explicit about the required location of the tests folder.
Ray Molenkamp [Fri, 10 May 2019 20:19:29 +0000 (14:19 -0600)]
Tests: Be more explicit about the required location of the tests folder.

4 months agoCleanup: Use const qualifier for curve utilities
Sergey Sharybin [Fri, 10 May 2019 15:12:33 +0000 (17:12 +0200)]
Cleanup: Use const qualifier for curve utilities

4 months agoCleanup: Remove unused functions
Sergey Sharybin [Fri, 10 May 2019 15:26:16 +0000 (17:26 +0200)]
Cleanup: Remove unused functions

4 months agoCleanup: Remove old deprecated DerivedMesh functions
Sergey Sharybin [Fri, 10 May 2019 15:28:21 +0000 (17:28 +0200)]
Cleanup: Remove old deprecated DerivedMesh functions

Were ifdef-ed for a long time.

4 months agoFix T64338: make snap menu in 2.7x keymap use regular instead of pie menu
Carlo Andreacchio [Fri, 10 May 2019 15:22:26 +0000 (17:22 +0200)]
Fix T64338: make snap menu in 2.7x keymap use regular instead of pie menu

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

4 months agoUI: allow to cancel editing of vector widgets with escape and RMB
Alessio Monti di Sopra [Fri, 10 May 2019 15:21:24 +0000 (17:21 +0200)]
UI: allow to cancel editing of vector widgets with escape and RMB

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

4 months agoFix T64434: error with save system info after recent changes
George Vogiatzis [Fri, 10 May 2019 15:15:05 +0000 (17:15 +0200)]
Fix T64434: error with save system info after recent changes

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

4 months agoFix T64399 Crash when trying to enter edit mode on instanced objects
Clément Foucault [Fri, 10 May 2019 14:51:19 +0000 (16:51 +0200)]
Fix T64399 Crash when trying to enter edit mode on instanced objects

4 months agoFix T64420 Weight Paint colours not visible
Clément Foucault [Fri, 10 May 2019 13:03:18 +0000 (15:03 +0200)]
Fix T64420 Weight Paint colours not visible

4 months agoFix T64284 Mirrored Instances have flipped normals/face orientation
Clément Foucault [Fri, 10 May 2019 12:46:01 +0000 (14:46 +0200)]
Fix T64284 Mirrored Instances have flipped normals/face orientation

It was a missing invert matrix update and also setting the OB_NEG_SCALE.

This defeats the purpose of not computing it in the draw manager but this
is more local and is have not a dramatic impact on performance.

4 months agoFix failing tests when Cycles is enabled
Brecht Van Lommel [Fri, 10 May 2019 11:29:43 +0000 (13:29 +0200)]
Fix failing tests when Cycles is enabled

The --env-system-scripts hack does not work with it, it can't find the cycles
Python module then when importing add-ons.

4 months agoOverlays: Use common_view_lib.glsl
Clément Foucault [Thu, 9 May 2019 23:57:42 +0000 (01:57 +0200)]
Overlays: Use common_view_lib.glsl

This removes ModelViewProjectionMatrix usage

4 months agoWorkbench: Use common_view_lib.glsl
Clément Foucault [Thu, 9 May 2019 22:18:52 +0000 (00:18 +0200)]
Workbench: Use common_view_lib.glsl

This removes ModelViewProjectionMatrix usage

4 months agoGPencil: Use common_view_lib.glsl
Clément Foucault [Thu, 9 May 2019 20:27:44 +0000 (22:27 +0200)]
GPencil: Use common_view_lib.glsl

4 months agoDRW: Remove ModelViewMatrix Usage
Clément Foucault [Thu, 9 May 2019 20:10:38 +0000 (22:10 +0200)]
DRW: Remove ModelViewMatrix Usage

4 months agoEevee: Update matrices operations to not use combined matrices
Clément Foucault [Thu, 9 May 2019 14:16:12 +0000 (16:16 +0200)]
Eevee: Update matrices operations to not use combined matrices

4 months agoCleanup: DRW: Renaming of glsl utility macros
Clément Foucault [Thu, 9 May 2019 13:31:54 +0000 (15:31 +0200)]
Cleanup: DRW: Renaming of glsl utility macros

4 months agoAdd ability to create a keyboard shortcut for more mode settings.
Sebastian Parborg [Fri, 10 May 2019 09:55:52 +0000 (11:55 +0200)]
Add ability to create a keyboard shortcut for more mode settings.

This adds the ability to assign shortcuts to boolean settings and enums
via the right click menu.

Reviewed By: Brecht

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

4 months agoCleanup: split setup_app_data into two functions
Campbell Barton [Fri, 10 May 2019 08:46:13 +0000 (18:46 +1000)]
Cleanup: split setup_app_data into two functions

Allows for skipping either preferences or data-blocks.
Previously setup_app_data was used for both.

4 months agoPreferences: write preferences on exit
Campbell Barton [Fri, 10 May 2019 08:29:58 +0000 (18:29 +1000)]
Preferences: write preferences on exit

This avoids the issue where user added shortcuts or quick favourites
are lost on exit.

4 months agoPreferences: add is_dirty member
Campbell Barton [Fri, 10 May 2019 05:57:23 +0000 (15:57 +1000)]
Preferences: add is_dirty member

Tag preferences as dirty when changed (prepare for adding auto-save).

4 months agoCleanup: move preference saving logic into blendfile.c
Campbell Barton [Fri, 10 May 2019 05:46:31 +0000 (15:46 +1000)]
Cleanup: move preference saving logic into blendfile.c

4 months agoFix T64304: Objects in appended scene from 2.79 file disappear after saving.
Bastien Montagne [Fri, 10 May 2019 08:09:23 +0000 (10:09 +0200)]
Fix T64304: Objects in appended scene from 2.79 file disappear after saving.

Versionning code generating collections from old 2.79 scene layers was
setting new collections' library from scene, but it also needs to
properly set the `LIB_TAG_INDIRECT` tag, otherwise localizing code does
not know what to do, and most of append process fails.

4 months agoUI: expose tool settings in the 3D view side-bar
Campbell Barton [Fri, 10 May 2019 03:43:07 +0000 (13:43 +1000)]
UI: expose tool settings in the 3D view side-bar

Internally tool settings have been moved to the 3D view.
Added the ability for to draw panels from another space/region
so they can be mirrored in the properties editor.

4 months agoCleanup: use more explicit check for buttons context
Campbell Barton [Fri, 10 May 2019 02:51:04 +0000 (12:51 +1000)]
Cleanup: use more explicit check for buttons context

4 months agoCleanup: avoid some floating point divisions in drawing code
Brecht Van Lommel [Thu, 9 May 2019 17:37:31 +0000 (19:37 +0200)]
Cleanup: avoid some floating point divisions in drawing code

4 months agoUI: improve timeline playhead scrubber drawing
Harley Acheson [Thu, 9 May 2019 17:28:31 +0000 (19:28 +0200)]
UI: improve timeline playhead scrubber drawing

Minimum width, always centered on the vertical frame line, antialiased.

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

4 months agoFix T64076: color ramp overlaps scrollbar
Harley Acheson [Thu, 9 May 2019 17:27:33 +0000 (19:27 +0200)]
Fix T64076: color ramp overlaps scrollbar

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

4 months agoUI: dim icons in inactive tabs, similar to text
Brecht Van Lommel [Thu, 9 May 2019 15:37:26 +0000 (17:37 +0200)]
UI: dim icons in inactive tabs, similar to text

This makes the properties editor navigation bar less saturated. Internally
the icon theme coloring was refactored a bit to move more towards the button
drawing code.

4 months agoCleanup: reduce number of UI_icon_draw variations
Brecht Van Lommel [Thu, 9 May 2019 17:19:52 +0000 (19:19 +0200)]
Cleanup: reduce number of UI_icon_draw variations

4 months agoThemes: add setting to draw border around icons, use for Blender Light
Jeroen Bakker [Thu, 9 May 2019 13:53:44 +0000 (15:53 +0200)]
Themes: add setting to draw border around icons, use for Blender Light

Monochrome colored icons don't work well on a dark background, so now we can
add a border around them. Note that most icons in the interface will remain
without a border, just the outliner and properties editor navigation have
colored icons and those will get a border. Other icons continue to be drawn
in the text colored without a border.

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

4 months agoThemes: add scene icon color category, for consistency in properties tab bar
Brecht Van Lommel [Thu, 9 May 2019 15:07:06 +0000 (17:07 +0200)]
Themes: add scene icon color category, for consistency in properties tab bar

The icons here still need to be dimmed when the tab is inactive.

4 months agoGPencil: Lock rotation of textures
Antonioya [Thu, 9 May 2019 17:53:25 +0000 (19:53 +0200)]
GPencil: Lock rotation of textures

By default the texture is locked and only the box is aligned when Follow Drawing Path is enabled.

Before, when the Follow was disabled, the texture was always aligned to top and it was not affected by object rotation. Now, the texture always is rotated with object rotation.

4 months agoDrawManager/GreasePencil: Select Correct ViewLayer
Jeroen Bakker [Tue, 7 May 2019 13:01:12 +0000 (15:01 +0200)]
DrawManager/GreasePencil: Select Correct ViewLayer

The DrawManager assumed that the first render layer was the render layer
where GP needed to render on. In viewport this is always the case as we
only have a single view layer. When rendering this can be multiple when
multiple layers are rendered and composited in the compositor.

In stead of the assumption that the first render layer is the render
layer we need to draw on, we search for the render layer with the same
name as the viewlayer.

Reviewed By: fclem, brecht, antoniov

Maniphest Tasks: T63099

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

4 months agoWorkbench: Viewport AA Preferences
Jeroen Bakker [Wed, 8 May 2019 13:38:11 +0000 (15:38 +0200)]
Workbench: Viewport AA Preferences

In recent changes the viewport_quality setting was not working what
users expected. This change will separate the anti-aliasing method that
is being used.

We now have three settings:

* scene.display.render_aa: Will be used during `Render Image`.
* scene.display.viewport_aa: Will be used during `Viewport Render Image`.
* userpref.viewport_aa: Will be used in the 3d view.

The viewport_quality setting has been replaced by the viewport_aa
setting as it was the only thing in currently controlled.

Reviewed By: brecht

Maniphest Tasks: T64132

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

4 months agoFix T64384 : Crash when switching to wireframe on tree_creature blend
Clément Foucault [Thu, 9 May 2019 12:36:49 +0000 (14:36 +0200)]
Fix T64384 : Crash when switching to wireframe on tree_creature blend

Was missing NULL pointer check

4 months agoTests: add tests/report.html that links to all HTML test reports
Brecht Van Lommel [Thu, 9 May 2019 11:45:46 +0000 (13:45 +0200)]
Tests: add tests/report.html that links to all HTML test reports

Currently this is for Cycles, Eevee and workbench tests.

4 months agoUI: rename Look Dev 'Ball' to 'Sphere'
Campbell Barton [Thu, 9 May 2019 11:35:52 +0000 (21:35 +1000)]
UI: rename Look Dev 'Ball' to 'Sphere'

D4813 by @Gvgeo

4 months agoDepsGraph: Multi ViewLayer Selection
Jeroen Bakker [Wed, 8 May 2019 07:45:20 +0000 (09:45 +0200)]
DepsGraph: Multi ViewLayer Selection

When using multiple viewlayers and switching between them the selection
gets buggy. The reason for this is that the select_id is updated based
on the index in the viewlayer. This makes the select_id not unique as
objects might be shared or not shared at all.

This fix will update the select_id on all objects in main. This will be triggered in all the selection operators.

Reviewed By: sergey, brecht

Maniphest Tasks: T55617

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

4 months agoFix T64363 Eevee: Texture coordinates node turns material color to pink
Clément Foucault [Thu, 9 May 2019 10:46:29 +0000 (12:46 +0200)]
Fix T64363 Eevee: Texture coordinates node turns material color to pink

Sorry for that :(

4 months agoFix T64329 Crash when switching to Texture Paint
Clément Foucault [Thu, 9 May 2019 10:10:47 +0000 (12:10 +0200)]
Fix T64329 Crash when switching to Texture Paint

4 months ago3D Grid: Use View UBO & small cleanup
Clément Foucault [Thu, 9 May 2019 09:58:33 +0000 (11:58 +0200)]
3D Grid: Use View UBO & small cleanup

4 months agoI18n disambiguation: Drag (physics force vs. mouse action).
Bastien Montagne [Thu, 9 May 2019 08:52:34 +0000 (10:52 +0200)]
I18n disambiguation: Drag (physics force vs. mouse action).

Part of T43295.

4 months agoI18n disambiguation: setting particles' parent/children appart.
Bastien Montagne [Thu, 9 May 2019 08:31:11 +0000 (10:31 +0200)]
I18n disambiguation: setting particles' parent/children appart.

Looks like in some languages common generic parent/child relationship
does notn apply well to those.

Part of T43295.

4 months agoI18n disambiguation: Translation (of UI vs. moving something).
Bastien Montagne [Thu, 9 May 2019 08:09:14 +0000 (10:09 +0200)]
I18n disambiguation: Translation (of UI vs. moving something).

Part of T43295.