blender.git
19 months agoCleanup: style, warning
Campbell Barton [Mon, 22 Oct 2018 23:53:40 +0000 (10:53 +1100)]
Cleanup: style, warning

19 months agoCleanup: rename VertBuf.fill_attribute > attr_fill
Campbell Barton [Mon, 22 Oct 2018 23:49:36 +0000 (10:49 +1100)]
Cleanup: rename VertBuf.fill_attribute > attr_fill

19 months agoFix various icon related issues:
William Reynish [Mon, 22 Oct 2018 17:19:15 +0000 (19:19 +0200)]
Fix various icon related issues:

* Used correct icons for Tracking.
* Flip Copy/Paste icons so they are correct.
* Add correct icon for softbody modifier.
* Replace speaker icons for enabling F-Curves with checkboxes.

19 months agoFix build after recent changes, filename must have right case.
Brecht Van Lommel [Mon, 22 Oct 2018 17:10:48 +0000 (19:10 +0200)]
Fix build after recent changes, filename must have right case.

19 months agoFix memory leak in drivers pover
Antonioya [Mon, 22 Oct 2018 16:58:07 +0000 (18:58 +0200)]
Fix memory leak in drivers pover

19 months agoGP: New Time modifier
Antonioya [Mon, 22 Oct 2018 16:25:13 +0000 (18:25 +0200)]
GP: New Time modifier

This modifier allows to offset the keyframe animated to get more variations in the animation when reuse the same datablock.

19 months agoMerge remote-tracking branch 'origin/master' into blender2.8
Ray Molenkamp [Mon, 22 Oct 2018 16:19:06 +0000 (10:19 -0600)]
Merge remote-tracking branch 'origin/master' into blender2.8

19 months agoWindows: Enable python debugging in Visual Studio.
Ray Molenkamp [Mon, 22 Oct 2018 16:17:08 +0000 (10:17 -0600)]
Windows: Enable python debugging in Visual Studio.

see D3817 for technical details, and https://wiki.blender.org/wiki/Tools/Debugging/Python_Visual_Studio for a end user quick-start guide.

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

19 months agoOptimizadion: Fix performanse issue of UI on some old GPUs.
mano-wii [Mon, 22 Oct 2018 15:58:29 +0000 (12:58 -0300)]
Optimizadion: Fix performanse issue of UI on some old GPUs.

Apparently the registry is not large enough and the compiler does something bad in indexing the array.

19 months agoDrag & Drop: Support Open/Link/Append when dropping .blend file
Jacques Lucke [Mon, 22 Oct 2018 15:18:42 +0000 (17:18 +0200)]
Drag & Drop: Support Open/Link/Append when dropping .blend file

When a .blend file is dropped into Blender a small menu opens.
In that menu the user can choose between three options: Open, Link and Append.

Reviewers: brecht

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

19 months agoFollowup to previous change, reduce number of relations updates
Sergey Sharybin [Mon, 22 Oct 2018 15:13:19 +0000 (17:13 +0200)]
Followup to previous change, reduce number of relations updates

Only tag relations update when new f-curve was allocated. This solves
possible too slow keyframe insertion when doing character animation,
but still does proper relation update when new ID component became
animated.

19 months agoDepsgraph: Fix missing relation update
Sergey Sharybin [Mon, 22 Oct 2018 14:49:39 +0000 (16:49 +0200)]
Depsgraph: Fix missing relation update

The issue was happening when adding animation to properties
which affects different components of IDs.

Reported by Philipp Oeser as part of T56636.

19 months agoFix T56636: Custom property cannot be animated
Sergey Sharybin [Mon, 22 Oct 2018 14:43:49 +0000 (16:43 +0200)]
Fix T56636: Custom property cannot be animated

No need to tag object for time update, with new dependency graph
this forces animation to be re-evaluated, which is not something
we want in this instance.

Same patch/solution Philipp Oeser came to as well.

19 months agoMark TODO/XXX as solved
Sergey Sharybin [Mon, 22 Oct 2018 14:43:16 +0000 (16:43 +0200)]
Mark TODO/XXX as solved

We do have proper access to bmain now.

19 months agoDRW: Fix missing uniform warning in debug mode
Clément Foucault [Mon, 22 Oct 2018 13:55:42 +0000 (15:55 +0200)]
DRW: Fix missing uniform warning in debug mode

Fix T57318

19 months agoDRW: Fix crash on startup for old Nvidia drivers
Clément Foucault [Mon, 22 Oct 2018 13:53:35 +0000 (15:53 +0200)]
DRW: Fix crash on startup for old Nvidia drivers

This should fix T57296 once and for all.

19 months agoPython API: fix docstrings
Jacques Lucke [Mon, 22 Oct 2018 13:01:25 +0000 (15:01 +0200)]
Python API: fix docstrings

19 months agoAPI Docs: remove 'level' from blf.color arguments
Jacques Lucke [Mon, 22 Oct 2018 12:55:18 +0000 (14:55 +0200)]
API Docs: remove 'level' from blf.color arguments

Reviewers: brecht

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

19 months agoFix T57028: Connect Vertex not working with more than 2 selected
Philipp Oeser [Mon, 22 Oct 2018 12:07:00 +0000 (14:07 +0200)]
Fix T57028: Connect Vertex not working with more than 2 selected
vertices

rB944054fbb61e introduced a sanity check which is not needed and
prevents the operator to run successfully with more than 2 selected
vertices

Reviewed By: dfelinto

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

19 months agoOutliner: drag&drop - separate moving from parenting
Jacques Lucke [Mon, 22 Oct 2018 11:53:36 +0000 (13:53 +0200)]
Outliner: drag&drop - separate moving from parenting

Use drag&drop to parent objects in the outliner by holding down shift.
Previously it was easy to accidently parent objects and there was no way to notice it immediatly.

In some views it is possible to parent objects without using shift; should be obvious from context.

Reviewers: brecht

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

19 months agoGPU: Fix Issue with recursive downsample and Intel HDXXX
Clément Foucault [Mon, 22 Oct 2018 10:58:11 +0000 (12:58 +0200)]
GPU: Fix Issue with recursive downsample and Intel HDXXX

This is caused by a driver bug that prevent us from rendering to (or even
binding) a texture mip level that is below GL_TEXTURE_MAX_LEVEL of the
target texture. This is fine in most drivers (and legal AFAIK) but not on
thoses Intels HDXXX + Windows.

As a fix we just put GL_TEXTURE_MAX_LEVEL lower (which is illegal because
it is undefined behaviour), but in practice it works ok and does not
trigger any warnings or errors.

This commit fixes most of the problems encountered on these GPUs (T56668).

19 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 22 Oct 2018 08:55:16 +0000 (10:55 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/windowmanager/intern/wm_init_exit.c

19 months agoTentative fix for T57066: Daily build of Blend 2.79 crashes on OSX Mojave.
Bastien Montagne [Mon, 22 Oct 2018 08:39:57 +0000 (10:39 +0200)]
Tentative fix for T57066: Daily build of Blend 2.79 crashes on OSX Mojave.

Looks like we need to explicitly set i18n language to default value on
some OSs... Unless that 'need to create new translated-name IDs in
versionning code for startup file' situation is really seldom.

Anyway, hopefully that will fix the crash.

19 months agoUI: remove mask toolbar, use menus instead
Campbell Barton [Mon, 22 Oct 2018 07:08:19 +0000 (18:08 +1100)]
UI: remove mask toolbar, use menus instead

19 months agoUI: move scrollbars inside region tabs
Campbell Barton [Mon, 22 Oct 2018 05:41:18 +0000 (16:41 +1100)]
UI: move scrollbars inside region tabs

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 22 Oct 2018 04:13:43 +0000 (15:13 +1100)]
Merge branch 'master' into blender2.8

19 months agoPrevent G.fileflags changes when WM_OT_save_mainfile() is called from script
Campbell Barton [Mon, 22 Oct 2018 04:08:26 +0000 (15:08 +1100)]
Prevent G.fileflags changes when WM_OT_save_mainfile() is called from script

This is to solve an issue where a blend file could be compressed
unbeknownst to the artist. This happened in the following situtation:

- Artist edits an uncompressed blend file.
- Some script saves a compressed blendfile to a separate location.
- When the artist saves the file (s)he is editing (File>Save, or Ctrl+S),
  it was silently compressed.

Cherry pick from: cd3b313d5f44a10a1150bf1ddb560775d1bcd827

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 22 Oct 2018 03:59:12 +0000 (14:59 +1100)]
Merge branch 'master' into blender2.8

Reverts: 92fd931e536

19 months agoFix T57328: 'Save As Copy' prints warning
Campbell Barton [Mon, 22 Oct 2018 03:51:06 +0000 (14:51 +1100)]
Fix T57328: 'Save As Copy' prints warning

19 months agoCycles: Enable shadow information in requested features when denoising is used
Lukas Stockner [Sun, 21 Oct 2018 22:14:22 +0000 (00:14 +0200)]
Cycles: Enable shadow information in requested features when denoising is used

The shadow information isn't only used for shadowcatchers, but also to generate the shadowing feature pass of the denoiser.

19 months agoFix T57320: Crash when adding a linked scene, then deleting it.
Bastien Montagne [Sun, 21 Oct 2018 15:22:09 +0000 (17:22 +0200)]
Fix T57320: Crash when adding a linked scene, then deleting it.

You want to check collections (for NULL children) first, before you
actually go into those children collections checking for NULL objects...

19 months agoFix non-sense overloaded code in remapping post-process of objects and collections.
Bastien Montagne [Sun, 21 Oct 2018 15:20:17 +0000 (17:20 +0200)]
Fix non-sense overloaded code in remapping post-process of objects and collections.

In one case, code was calling the same func on bmain for all objects or
collections inside that bmain... seriously...

19 months agoOptimize meta-ball basis check.
Bastien Montagne [Sun, 21 Oct 2018 15:17:34 +0000 (17:17 +0200)]
Optimize meta-ball basis check.

`BKE_mball_is_basis_for()` was processing whole name, when we can
actually rule out most of cases by just checking third char of the ID
names first, which is much, much cheaper.

Even though MBalls are not much used nowadays, that's a nice
optimization when this is called over a whole Main database full of
meta-balls objects...

19 months agoIcons: update geometry icons
William Reynish [Sun, 21 Oct 2018 05:04:58 +0000 (16:04 +1100)]
Icons: update geometry icons

- Tweaked icons for Box Select, Circle Select & Lasso Select.
- Tweaked icons for Rip Region & Rip Edge.
- Added icons for Bone Envelope, Bone Size, Pose Breakdown,
  Pose Push & Pose Relax.
- Added icons for curve Extrude, Extrude Cursor.

Also removed grease pencil mirror tool which wasn't an active tool,
and is now consistent with regular Edit Mode.

19 months agoCleanup: style
Campbell Barton [Sun, 21 Oct 2018 05:22:46 +0000 (16:22 +1100)]
Cleanup: style

19 months agoCleanup: trailing space
Campbell Barton [Sun, 21 Oct 2018 05:08:30 +0000 (16:08 +1100)]
Cleanup: trailing space

19 months agoCleanup: compiler warnings
Campbell Barton [Sun, 21 Oct 2018 05:22:31 +0000 (16:22 +1100)]
Cleanup: compiler warnings

19 months agoGP: Fix duplication when draw strokes in multiple windows
Antonioya [Sat, 20 Oct 2018 17:40:29 +0000 (19:40 +0200)]
GP: Fix duplication when draw strokes in multiple windows

The stroke must be visible only in the current region and only visible when the stroke is completed.

19 months agoGP: Redesign drawing cache to support particles
Antonioya [Fri, 19 Oct 2018 18:39:21 +0000 (20:39 +0200)]
GP: Redesign drawing cache to support particles

Full redesign of the cache system used for drawing strokes and handle derived frame data.

Before, the cache was saved in bGPdata and a hash was used to manage several objects with the same datablock.

Old design made the use of particles very inefficient and prone to bugs and segment faults, and especially when this was mixed with onion skinning and multiple objects using same datablock. Also, there were some conflicts with the depsgrah logic (the old design was done before despgraph was in place) that made the use of hash not working.

The new design saves the data in the object runtime struct and avoid the use of any hash to find the right data. This improves the speed and reduce a lot the complexity of the code, memory allocation, hash overload and adds full support for particles and reused datablocks.

The particles can reuse the modifiers and shader effects of the original grease pencil object.

19 months agoFix typo
Joshua Leung [Sat, 20 Oct 2018 02:28:43 +0000 (15:28 +1300)]
Fix typo

19 months agoFix: Drivers popover not showing
Joshua Leung [Fri, 12 Oct 2018 22:32:28 +0000 (11:32 +1300)]
Fix: Drivers popover not showing

This was broken since cca87ccc753a85b447872a259c9d3e3f07ec1c13

The problem was that as this popover was defined in the C-code
for the Graph Editor, the relevant panel never got added to the
WM_paneltype registry, since only Python defined panels get
WM_paneltype_add() called when they are defined.

Since the majority of panels defined for regions are only used there,
a more localised fix was applied here by only adding the driver popover
to the global list manually.

19 months agoMulti-Objects: pose slide operators
Dalai Felinto [Fri, 19 Oct 2018 22:08:12 +0000 (19:08 -0300)]
Multi-Objects: pose slide operators

* POSE_OT_breakdown
* POSE_OT_relax
* POSE_OT_push
* POSE_OT_propagate

Note: I could not test relax because of T57313.

Note 2: I believe those are the last armature related operators to be
ported - \o/

19 months agoFix Eevee Reflection CubeMap and Irradiance Volume on some Intel gpus
mano-wii [Fri, 19 Oct 2018 21:22:02 +0000 (18:22 -0300)]
Fix Eevee Reflection CubeMap and Irradiance Volume on some Intel gpus

When you pass a struct as a parameter to a function, the qualifier "layout(column_major)" is lost.

19 months agoRename BakeAction > NLA_OT_bake
Dalai Felinto [Fri, 19 Oct 2018 19:35:09 +0000 (16:35 -0300)]
Rename BakeAction > NLA_OT_bake

This was already the bl_idname anyways.

Now this seems to be working, for single and multi-pose.
That said, the operator seems to fail on redo.

19 months agoRemove defunct NLA_OT_bake
Dalai Felinto [Fri, 19 Oct 2018 19:12:35 +0000 (16:12 -0300)]
Remove defunct NLA_OT_bake

It's been 9 years too long.
And don't get this one confused with nla.bake (why would you even?).

The·BakeAction operator will be renamed to NLA_TO_bake next.

19 months agoMulti-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_KEYINGSET 3/3
Dalai Felinto [Fri, 19 Oct 2018 18:44:04 +0000 (15:44 -0300)]
Multi-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_KEYINGSET 3/3

Note for posterity, I couldn't figure out a way to test this mode
properly. That said, it should be working with multiple-poses now.

19 months agoMulti-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_LAYER 2/3
Dalai Felinto [Fri, 19 Oct 2018 15:44:33 +0000 (12:44 -0300)]
Multi-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_LAYER 2/3

19 months agoMulti-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_GROUP 1/3
Dalai Felinto [Fri, 19 Oct 2018 14:53:48 +0000 (11:53 -0300)]
Multi-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_GROUP 1/3

And disable the other options for now.

19 months agoCleanup: CTX_DATA_BEGIN_FOR_ID no longer needed
Dalai Felinto [Fri, 19 Oct 2018 13:15:01 +0000 (10:15 -0300)]
Cleanup: CTX_DATA_BEGIN_FOR_ID no longer needed

19 months agoFix py API docgen script for new context members.
Bastien Montagne [Fri, 19 Oct 2018 18:13:50 +0000 (20:13 +0200)]
Fix py API docgen script for new context members.

19 months agoMake Static Override optional/hidden by default.
Bastien Montagne [Fri, 19 Oct 2018 14:42:42 +0000 (16:42 +0200)]
Make Static Override optional/hidden by default.

That feature will not be ready (or at least, not tested enough) to be
officially part of 2.80 beta. So we disable it by default, hidding it
behind a startup option (`--enable-static-override`), and a python
app var (`bpy.app.use_static_override`).

That way, people who really want to play with it can do it easily, while
not exposing/enabling non-production-ready feature by default.

Note that underlying override code remains active, i.e. files we do have
overridden data-blocks will be loaded correctly according to static override.

19 months agoEevee: LightProbes: Fix negative padding
Clément Foucault [Fri, 19 Oct 2018 13:12:45 +0000 (15:12 +0200)]
Eevee: LightProbes: Fix negative padding

19 months agoFix function using same local variable name as output variable
Clément Foucault [Fri, 19 Oct 2018 13:06:08 +0000 (15:06 +0200)]
Fix function using same local variable name as output variable

This may fix issues with certain compiler.

19 months agoDope Sheet: remove many hard-coded color and alpha constants.
Alexander Gavrilov [Thu, 18 Oct 2018 20:48:06 +0000 (23:48 +0300)]
Dope Sheet: remove many hard-coded color and alpha constants.

Add the necessary colors and/or alpha components to the theme instead.
Also switch the background for ordinary channels to use the likely
intended theme option, instead of the window background color.

The general rule is that the channel color is drawn full strength in the
channel list on the left, and with alpha in the actual key frame area on
the right. This alpha is also reused with bone group colors.

Reviewers: brecht, billreynish

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

19 months agoUI: reorder and group blend modes in menus, similar to other apps.
Charlie Jolly [Fri, 19 Oct 2018 14:56:38 +0000 (16:56 +0200)]
UI: reorder and group blend modes in menus, similar to other apps.

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

19 months agoUI: move reports / job back to status bar, but make it more visible with color.
Brecht Van Lommel [Fri, 19 Oct 2018 15:14:27 +0000 (17:14 +0200)]
UI: move reports / job back to status bar, but make it more visible with color.

19 months agoMerge remote-tracking branch 'origin/master' into blender2.8
Ray Molenkamp [Fri, 19 Oct 2018 15:16:26 +0000 (09:16 -0600)]
Merge remote-tracking branch 'origin/master' into blender2.8

19 months agobuild_depenencies: Fix url for openal.
Ray Molenkamp [Fri, 19 Oct 2018 15:09:06 +0000 (09:09 -0600)]
build_depenencies: Fix url for openal.

19 months agoFix shadows of sun type lights on some Intel gpus
mano-wii [Fri, 19 Oct 2018 14:02:36 +0000 (11:02 -0300)]
Fix shadows of sun type lights on some Intel gpus

When you pass a struct as a parameter to a function, the qualifier "layout(column_major)" is lost.

19 months agoFix T57284: poor result UV unwrapping concave n-gon.
Brecht Van Lommel [Fri, 19 Oct 2018 12:42:27 +0000 (14:42 +0200)]
Fix T57284: poor result UV unwrapping concave n-gon.

19 months agoMulti-Objects: Implement/Fix POSE_OT_select_constraint_target
Dalai Felinto [Fri, 19 Oct 2018 12:38:21 +0000 (09:38 -0300)]
Multi-Objects: Implement/Fix POSE_OT_select_constraint_target

This operator had an initial multi-objects implementation.
However it would not select target bones across different selected objects.

19 months agoOutliner: Open empty collection when something is dragged into it
Jacques Lucke [Fri, 19 Oct 2018 12:30:39 +0000 (14:30 +0200)]
Outliner: Open empty collection when something is dragged into it

Reviewers: brecht

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

19 months agoUV_OT_unwrap: Error messages
Dalai Felinto [Fri, 19 Oct 2018 12:13:59 +0000 (09:13 -0300)]
UV_OT_unwrap: Error messages

Make sure a message is not reported multiple times when working with
multi-objects. Like in 2.7x we may have two infos coming from the same operator.

In 2.7 we could report non-uniform xor non-scaled, and subsurface.
Now we can report each one of those errors separately.

19 months agoFix multiple-object uv selection not "deselecting" other objects
Dalai Felinto [Fri, 19 Oct 2018 11:49:55 +0000 (08:49 -0300)]
Fix multiple-object uv selection not "deselecting" other objects

19 months agoCTX_DATA_BEGIN for active object only (..._from_active_object)
Dalai Felinto [Fri, 19 Oct 2018 11:29:15 +0000 (08:29 -0300)]
CTX_DATA_BEGIN for active object only (..._from_active_object)

For now only `selected_pose_bones_from_active_object`, more options can
be added on demand.

Discussed this with Campbell Barton. We may need this only for selected
pose bones, time will tell.

19 months agoVersioning: name screens by their workspaces
Campbell Barton [Fri, 19 Oct 2018 09:29:15 +0000 (20:29 +1100)]
Versioning: name screens by their workspaces

Avoids all screens in the startup file being named 'Default.###'.

19 months agoImage Space: make 'UV Edit' a separate mode
Campbell Barton [Fri, 19 Oct 2018 09:10:14 +0000 (20:10 +1100)]
Image Space: make 'UV Edit' a separate mode

This is needed for splitting UV into its own editor, see: T54744

19 months agoOutliner: only drag element under mouse if it was not selected before
Jacques Lucke [Fri, 19 Oct 2018 08:59:53 +0000 (10:59 +0200)]
Outliner: only drag element under mouse if it was not selected before

Reviewers: brecht

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

19 months agoPartial Revert: bring back some comments
Jacques Lucke [Fri, 19 Oct 2018 08:51:18 +0000 (10:51 +0200)]
Partial Revert: bring back some comments

19 months agoRNA: add widget property access
Campbell Barton [Fri, 19 Oct 2018 08:32:43 +0000 (19:32 +1100)]
RNA: add widget property access

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 19 Oct 2018 06:51:40 +0000 (17:51 +1100)]
Merge branch 'master' into blender2.8

19 months agoFix error disabling all addons
Campbell Barton [Fri, 19 Oct 2018 06:49:16 +0000 (17:49 +1100)]
Fix error disabling all addons

19 months agoUI: correct face center button active state
Campbell Barton [Fri, 19 Oct 2018 06:10:40 +0000 (17:10 +1100)]
UI: correct face center button active state

19 months agoFix T57295: Edit-mesh modes got out of sync
Campbell Barton [Fri, 19 Oct 2018 04:48:39 +0000 (15:48 +1100)]
Fix T57295: Edit-mesh modes got out of sync

19 months agoCleanup: compiler warnings
Campbell Barton [Fri, 19 Oct 2018 03:51:55 +0000 (14:51 +1100)]
Cleanup: compiler warnings

19 months agoFix UI message-bus automatic subscription
Campbell Barton [Fri, 19 Oct 2018 03:45:11 +0000 (14:45 +1100)]
Fix UI message-bus automatic subscription

19 months agoFix T57294: Modifiers cage ignore face visibility
Campbell Barton [Fri, 19 Oct 2018 02:57:00 +0000 (13:57 +1100)]
Fix T57294: Modifiers cage ignore face visibility

19 months agoTool System: option for transform drag action
Campbell Barton [Fri, 19 Oct 2018 00:54:26 +0000 (11:54 +1100)]
Tool System: option for transform drag action

See: T57203

19 months agoPartial revert '#if 0' cleanup
Campbell Barton [Thu, 18 Oct 2018 22:07:40 +0000 (09:07 +1100)]
Partial revert '#if 0' cleanup

Partially revert 41216d5ad4c722e2ad9f15c968af454fc7566d5e

Some of this code had comments to be left as is for readability,
or comment the code should be kept.
Other functions were only for debugging.

19 months agoEdit Mesh: Decrease the depth bias on vertices
Clément Foucault [Thu, 18 Oct 2018 18:04:47 +0000 (20:04 +0200)]
Edit Mesh: Decrease the depth bias on vertices

19 months agoFix Copy Selection to Buffer breaking library paths.
Brecht Van Lommel [Thu, 18 Oct 2018 17:51:34 +0000 (19:51 +0200)]
Fix Copy Selection to Buffer breaking library paths.

This is a bug experienced by animators in the Blender Studio that developers
have been trying to fix for a /long/ time.

What happens is that partial file writing extracts the needed datablocks from
the main list of datablocks into a smaller one. Afterwards they are added back
to the main list, but in some cases not exactly in the same order.

There is file path remapping code that depends on the datablocks being in
exactly the same order as before, and when this was not the case filepaths
would get swapped between datablocks

The reason datablocks are not restored in the same order is because the sorting
of datablocks by name is a) case insensitive and b) undefined if there are
multiple datablocks with the same name from different libraries. This should
be made well defined, but the fix in this commit is simpler.

The way animators ran into this bug is that they use the Copy Attributes addon
a lot, which has as the first item in the menu Copy Selection to Buffer. In
some cases this would be clicked accidentally when menu is near the edge of the
window, breaking the library paths which would only be noticed a much later on
file save and reload.

The way this bug was finally tracked down is that it was suspected that the
undo system was the cause, and so Bastien added library validation for undo.
When Hjalti then did undo and noticed the error, he remembered accidentally
clicking Copy Selection to Buffer just before, and we could finally reproduce
the bug.

19 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Thu, 18 Oct 2018 18:11:14 +0000 (20:11 +0200)]
Merge branch 'master' into blender2.8

19 months agoFix Copy Objects to Buffer breaking library paths.
Brecht Van Lommel [Thu, 18 Oct 2018 17:51:34 +0000 (19:51 +0200)]
Fix Copy Objects to Buffer breaking library paths.

This is a bug experienced by animators in the Blender Studio that developers
have been trying to fix for a /long/ time.

What happens is that partial file writing extracts the needed datablocks from
the main list of datablocks into a smaller one. Afterwards they are added back
to the main list, but in some cases not exactly in the same order.

There is file path remapping code that depends on the datablocks being in
exactly the same order as before, and when this was not the case filepaths
would get swapped between datablocks

The reason datablocks are not restored in the same order is because the sorting
of datablocks by name is a) case insensitive and b) undefined if there are
multiple datablocks with the same name from different libraries. This should
be made well defined, but the fix in this commit is simpler.

The way animators ran into this bug is that they use the Copy Attributes addon
a lot, which has as the first item in the menu Copy Selection to Buffer. In
some cases this would be clicked accidentally when menu is near the edge of the
window, breaking the library paths which would only be noticed a much later on
file save and reload.

The way this bug was finally tracked down is that it was suspected that the
undo system was the cause, and so Bastien added library validation for undo.
When Hjalti then did undo and noticed the error, he remembered accidentally
clicking Copy Selection to Buffer just before, and we could finally reproduce
the bug.

19 months agoLinks: update development fund link to new URL.
Brecht Van Lommel [Thu, 18 Oct 2018 16:55:50 +0000 (18:55 +0200)]
Links: update development fund link to new URL.

19 months agoFix assert/crash when copying RGBA color into RGB
Dalai Felinto [Thu, 18 Oct 2018 14:40:27 +0000 (14:40 +0000)]
Fix assert/crash when copying RGBA color into RGB

For example, copy from viewport display color into brush color.

19 months agoOutliner: drop into master collection when below everything else
Jacques Lucke [Thu, 18 Oct 2018 13:45:48 +0000 (15:45 +0200)]
Outliner: drop into master collection when below everything else

Reviewers: brecht

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

19 months agoCleanup: Remove more #if 0 blocks
Jacques Lucke [Thu, 18 Oct 2018 13:43:06 +0000 (15:43 +0200)]
Cleanup: Remove more #if 0 blocks

Continuation of https://developer.blender.org/D3802

Reviewers: brecht

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

19 months agoFix debug build after recent changes.
Brecht Van Lommel [Thu, 18 Oct 2018 12:48:22 +0000 (14:48 +0200)]
Fix debug build after recent changes.

19 months agoEevee: Fix default texture coord for procedural texture in world tree
Clément Foucault [Thu, 18 Oct 2018 13:30:06 +0000 (15:30 +0200)]
Eevee: Fix default texture coord for procedural texture in world tree

19 months agoCleanup: node_tex_checker: Vectorize operation in GLSL
Clément Foucault [Thu, 18 Oct 2018 13:17:21 +0000 (15:17 +0200)]
Cleanup: node_tex_checker: Vectorize operation in GLSL

19 months agoFix use of uninitialized variable in cloth collision.
Brecht Van Lommel [Thu, 18 Oct 2018 10:20:33 +0000 (12:20 +0200)]
Fix use of uninitialized variable in cloth collision.

No apparent difference in a quick simulation, but was clearly wrong.

19 months agoCleanup: fix compiler warnings.
Brecht Van Lommel [Thu, 18 Oct 2018 10:19:06 +0000 (12:19 +0200)]
Cleanup: fix compiler warnings.

19 months agoUI: closure some more panels by default, leaving open mostly 1 per tab.
William Reynish [Thu, 18 Oct 2018 10:13:06 +0000 (12:13 +0200)]
UI: closure some more panels by default, leaving open mostly 1 per tab.

19 months agoPyAPI: Support for custom tool registration
Campbell Barton [Thu, 18 Oct 2018 05:46:43 +0000 (16:46 +1100)]
PyAPI: Support for custom tool registration

Added a module bpy.utils.toolsystem which only exposes ToolDef,
to avoid scripts referencing bl_ui internals.

19 months agoTool System: expose shear tool x/y option
Campbell Barton [Thu, 18 Oct 2018 02:55:01 +0000 (13:55 +1100)]
Tool System: expose shear tool x/y option

19 months agoKeymap: use tweak event for shear
Campbell Barton [Thu, 18 Oct 2018 02:06:23 +0000 (13:06 +1100)]
Keymap: use tweak event for shear

19 months agoGizmo: tweak sorting to avoid view-aligned shear
Campbell Barton [Thu, 18 Oct 2018 01:58:54 +0000 (12:58 +1100)]
Gizmo: tweak sorting to avoid view-aligned shear

19 months agoGizmo: remove 'Click Anywhere' option
Campbell Barton [Thu, 18 Oct 2018 01:30:23 +0000 (12:30 +1100)]
Gizmo: remove 'Click Anywhere' option

Having an invisible gizmo caused event handling problems (see: T56603).

This is hard to avoid since gizmos are similar to buttons in the way
they have priority over the regular keymap.

Transform events use tweak so events to fall though to the general
view 3d keymap (for cursor placement for eg).

19 months agoCleanup: style
Campbell Barton [Thu, 18 Oct 2018 01:03:04 +0000 (12:03 +1100)]
Cleanup: style

19 months agoCleanup: use mul_m3_series
Campbell Barton [Thu, 18 Oct 2018 00:45:21 +0000 (11:45 +1100)]
Cleanup: use mul_m3_series