4 years agoCleanup: build warning
Campbell Barton [Tue, 5 Dec 2017 15:25:10 +0000 (02:25 +1100)]
Cleanup: build warning

4 years agoMerge branch 'master' into blender2.8
Germano [Tue, 5 Dec 2017 13:19:47 +0000 (11:19 -0200)]
Merge branch 'master' into blender2.8

# Conflicts:
# source/blender/editors/mesh/editmesh_select.c

4 years agoFix T53469: Make sure that edges are drawn in the backbuff whenever you are looking...
Germano [Tue, 5 Dec 2017 13:13:53 +0000 (11:13 -0200)]
Fix T53469: Make sure that edges are drawn in the backbuff whenever you are looking for the nearest edge

Caused by rB9f5bf19

4 years agoFix for typo in previous commit
Joshua Leung [Tue, 5 Dec 2017 12:14:20 +0000 (01:14 +1300)]
Fix for typo in previous commit

4 years agoSimplify UI-names for B-Bone Ease In/Out settings
Joshua Leung [Tue, 5 Dec 2017 11:58:10 +0000 (00:58 +1300)]
Simplify UI-names for B-Bone Ease In/Out settings

For more consistency with the other settings, and increased readability
when the UI is cramped (and it isn't possible to see the whole names).

4 years agoVersion patching fixes for F-Curves (as required for fixes for T48988 and T52009)
Joshua Leung [Tue, 5 Dec 2017 11:54:39 +0000 (00:54 +1300)]
Version patching fixes for F-Curves (as required for fixes for T48988 and T52009)

* For the T48988 fix (i.e. separate Ease In/Out properties for Bendy Bones
  in Edit vs Pose modes), old animation data needed to be patched to use
  the new property names. This is needed to partially fix some of the
  issues in T53356 (though the Rigify code itself still needs to be patched).

* For the T52009 fix, old files needed to have the frame_start and frame_end
  properties on the FModifier (base-class) updated to match that of the
  FMod_Stepped type-specific class. This wasn't done in the earlier commit
  since it wasn't worth going through all animation data just for the sake
  of updating these relatively-rare settings, but since we're doing it anyway
  now, it makes sense to include this here.

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Tue, 5 Dec 2017 10:48:37 +0000 (11:48 +0100)]
Merge branch 'master' into blender2.8

4 years agoAdded BKE_fcurves_main_cb(), a wrapper around BKE_animdata_main_cb to make it easier...
Joshua Leung [Tue, 5 Dec 2017 04:16:05 +0000 (17:16 +1300)]
Added BKE_fcurves_main_cb(), a wrapper around BKE_animdata_main_cb to make it easier to apply fixes to all F-Curves in a file

4 years agoCleanup/Style Tweaks to fit rest of code
Joshua Leung [Tue, 5 Dec 2017 04:14:55 +0000 (17:14 +1300)]
Cleanup/Style Tweaks to fit rest of code

4 years agodrawobject: use float instead of int in glLineWidth
Germano [Mon, 4 Dec 2017 18:00:21 +0000 (16:00 -0200)]
drawobject: use float instead of int in glLineWidth

4 years agoFix T53463: Rotation numerical input shows instable behaviour.
Bastien Montagne [Mon, 4 Dec 2017 17:40:33 +0000 (18:40 +0100)]
Fix T53463: Rotation numerical input shows instable behaviour.

Inverting a number in radians when user is in degrees gives rather
unexpected results. ;)

4 years agoEdit Mesh Selection: Make sure that the line width is 1 pixel
Germano [Mon, 4 Dec 2017 17:30:56 +0000 (15:30 -0200)]
Edit Mesh Selection: Make sure that the line width is 1 pixel

4 years agoEevee: CodeStyle: Separate Shader initialization.
Clément Foucault [Mon, 4 Dec 2017 16:21:17 +0000 (17:21 +0100)]
Eevee: CodeStyle: Separate Shader initialization.

4 years agoEevee: Irradiance Grid: Allocate needed resources instead of a static chunck.
Clément Foucault [Mon, 4 Dec 2017 16:20:20 +0000 (17:20 +0100)]
Eevee: Irradiance Grid: Allocate needed resources instead of a static chunck.

This commit makes the irradiance pool and render target sizes depend on the number of irradiance sample in the whole ViewLayer.

4 years agoResolve MSVC C2229
Campbell Barton [Mon, 4 Dec 2017 16:03:50 +0000 (03:03 +1100)]
Resolve MSVC C2229

Code works as expected, but MSVC disallows

4 years agoDepsgraph: Cleanup, indentation
Sergey Sharybin [Mon, 4 Dec 2017 14:50:06 +0000 (15:50 +0100)]
Depsgraph: Cleanup, indentation

4 years agoBetter bevel profile at extreme values of profile.
Howard Trickey [Mon, 4 Dec 2017 14:30:40 +0000 (09:30 -0500)]
Better bevel profile at extreme values of profile.

Patch from Richard Erhardt, with some additions & modifications.
Changes bevel profile shape parameter so that can get arbitrarily
near square profile as parameter -> 1.
Adds code to make profile=0 case work, at least for cube corners,
so changed hard min of profile parameter to 0 from 0.15.

4 years agoEdit Mesh Selection: Fix wrong glPointSize position
Germano [Mon, 4 Dec 2017 14:32:45 +0000 (12:32 -0200)]
Edit Mesh Selection: Fix wrong glPointSize position

4 years agoRNA: Use const qualifier for an utility function
Sergey Sharybin [Mon, 4 Dec 2017 14:26:43 +0000 (15:26 +0100)]
RNA: Use const qualifier for an utility function

4 years agoFollowup to previous merge conflict resolution
Sergey Sharybin [Mon, 4 Dec 2017 14:26:06 +0000 (15:26 +0100)]
Followup to previous merge conflict resolution

4 years agoWM: disable property update messages for fcurves
Campbell Barton [Mon, 4 Dec 2017 14:28:03 +0000 (01:28 +1100)]
WM: disable property update messages for fcurves

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 4 Dec 2017 14:14:47 +0000 (15:14 +0100)]
Merge branch 'master' into blender2.8

4 years agoDepsgraph: Add parameters nodes for bone custom properties
Sergey Sharybin [Mon, 4 Dec 2017 13:50:14 +0000 (14:50 +0100)]
Depsgraph: Add parameters nodes for bone custom properties

Currently shouldn't make any difference, but this is something what needs to be
done to sanitize drivers relations )with the idea to re-use some generic code
to get operations for driver variables.

4 years agoEdit Mesh Selection: Draw the backbuff of edge selection only when requested
Germano [Mon, 4 Dec 2017 14:05:06 +0000 (12:05 -0200)]
Edit Mesh Selection: Draw the backbuff of edge selection only when requested

And make sure the width is 1

4 years agoDepsgraph: Cleanup, move RNA key constructor to it's file
Sergey Sharybin [Mon, 4 Dec 2017 11:59:44 +0000 (12:59 +0100)]
Depsgraph: Cleanup, move RNA key constructor to it's file

4 years agoDepsgraph: Cleanup, don't use bracers in relations names
Sergey Sharybin [Mon, 4 Dec 2017 11:48:16 +0000 (12:48 +0100)]
Depsgraph: Cleanup, don't use bracers in relations names

Those don't bring any information.

4 years agoDepsgraph: Cleanup, node from RNA pointer search
Sergey Sharybin [Mon, 4 Dec 2017 11:45:42 +0000 (12:45 +0100)]
Depsgraph: Cleanup, node from RNA pointer search

4 years agoDepsgraph: Remove unused property based update tags
Sergey Sharybin [Mon, 4 Dec 2017 11:34:25 +0000 (12:34 +0100)]
Depsgraph: Remove unused property based update tags

Those are unused, and not clear whether we will ever support this.

Seems to be better having more like "component" tags, would be less magic
involved to guess what exactly is to be tagged.

4 years agoFix bplayer (c).
Bastien Montagne [Mon, 4 Dec 2017 13:14:42 +0000 (14:14 +0100)]
Fix bplayer (c).

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 4 Dec 2017 12:57:26 +0000 (13:57 +0100)]
Merge branch 'master' into blender2.8


4 years agoCleanup: link/append: get rid of booleans in func parameters.
Bastien Montagne [Mon, 4 Dec 2017 12:09:13 +0000 (13:09 +0100)]
Cleanup: link/append: get rid of booleans in func parameters.

One or two are OK, but more make it rather unreadable, and future work
is likely to require more toggle specific behavior here. So switched to
bitflags, switching from short to int and using 16 upper bits for
'internal' ones defined in BLO_readfile.h, combined with 'public' ones
from user interaction, defined in DNA_space_types.h

4 years agoSmall cleanup from previous commit by Danrae Pray (@spockTheGray)
Danrae Pray [Mon, 4 Dec 2017 09:49:44 +0000 (07:49 -0200)]
Small cleanup from previous commit by Danrae Pray (@spockTheGray)

I (Dalai) messed up the git author from previous commit (68fdcf07a17).
So this is a follow up on that, properly credited.

4 years agoFix T53415: Outliner: Crash when deleting collections
Dalai Felinto [Mon, 4 Dec 2017 09:40:23 +0000 (07:40 -0200)]
Fix T53415: Outliner: Crash when deleting collections

Updated collection_delete_exec() so we don't try to delete elements as we search
the outliner tree anymore.

Now we search the whole tree first for the selected nodes that need to be
deleted and delete them afterward.

Reviewers: dfelinto

Tags: #bf_blender_2.8

Differential Revision:
Differential Revision:

4 years agoWM: message bus replacement for property notifiers
Campbell Barton [Mon, 13 Nov 2017 08:43:34 +0000 (19:43 +1100)]
WM: message bus replacement for property notifiers

Use dynamically generated message publish/subscribe
so buttons and manipulators update properly.

This resolves common glitches where manipulators weren't updating
as well as the UI when add-ons exposed properties which
hard coded listeners weren't checking for.

Python can also publish/scribe changes via `bpy.msgbus`.

See D2917

4 years agoEevee: Irradiance Visibility: Initial Implementation
Clément Foucault [Sat, 2 Dec 2017 13:28:29 +0000 (14:28 +0100)]
Eevee: Irradiance Visibility: Initial Implementation

This augment the existing irradiance grid with a new visibility precomputation.
We store a small shadowmap for each grid sample so that light does not leak through walls and such.

The visibility parameter are similar to the one used by the Variance Shadow Map for point lights.

Technical details:

We store the visibility in the same texture (array) as the irradiance itself (in order to reduce the number of sampler).
But the irradiance and the visibility are not the same data so we must encode them in order to use the same texture format.
We use RGBA8 normalized texture and encode irradiance as RGBE (shared exponent).
Using RGBE encoding instead of R11_G11_B10 may lead to some lighting changes, but quality seems to be nearly the same in my test cases.
Using full RGBA16/32F maybe a future option but that will require much more memory and reduce the perf significantly.

Visibility moments (VSM) are encoded as 16bits fixed point precision using a special range. This seems to retain enough precision for the needs.
Also interpolation does not seems to be big problem (even though it's incorrect).

4 years agoEevee: Irradiance Visibility: Add RNA / Engine properties
Clément Foucault [Sat, 2 Dec 2017 12:01:40 +0000 (13:01 +0100)]
Eevee: Irradiance Visibility: Add RNA / Engine properties

4 years agoEevee: Irradiance Grid: Fix problem with bounce update.
Clément Foucault [Fri, 1 Dec 2017 23:59:58 +0000 (00:59 +0100)]
Eevee: Irradiance Grid: Fix problem with bounce update.

Before this patch, if one of the grid was updated (moved) only the subsequents evaluated grids had their level reset and had all their bounces recomputed.

4 years agoEevee: Irradiance Grid: Fix Multibounce baking.
Clément Foucault [Fri, 1 Dec 2017 23:47:42 +0000 (00:47 +0100)]
Eevee: Irradiance Grid: Fix Multibounce baking.

The baking was only recording one bounce because the double buffer setup was buggy.

4 years agoCleanup: whitespace
Campbell Barton [Mon, 4 Dec 2017 06:19:34 +0000 (17:19 +1100)]
Cleanup: whitespace

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 4 Dec 2017 05:51:07 +0000 (16:51 +1100)]
Merge branch 'master' into blender2.8

4 years agoCleanup: wrap long function args in seqeffects
Campbell Barton [Mon, 4 Dec 2017 05:49:30 +0000 (16:49 +1100)]
Cleanup: wrap long function args in seqeffects

4 years agoCleanup: style
Campbell Barton [Mon, 4 Dec 2017 05:37:31 +0000 (16:37 +1100)]
Cleanup: style

4 years agoFix crash w/ template search & invalid property
Campbell Barton [Mon, 4 Dec 2017 05:17:54 +0000 (16:17 +1100)]
Fix crash w/ template search & invalid property

4 years agoFix MSVC compilation, there is no 'Designated initializers' in C++!
Bastien Montagne [Sat, 2 Dec 2017 17:25:09 +0000 (18:25 +0100)]
Fix MSVC compilation, there is no 'Designated initializers' in C++!

Looks like gcc is at the very least missing a warning here!

4 years agoBLI_ghash: Description of GHash, GSet
Campbell Barton [Sat, 2 Dec 2017 16:35:45 +0000 (03:35 +1100)]
BLI_ghash: Description of GHash, GSet

Also some re-indenting.

4 years agoCleanup: minor change to API use
Campbell Barton [Sat, 2 Dec 2017 11:41:53 +0000 (22:41 +1100)]
Cleanup: minor change to API use

4 years agoCleanup: indentation
Campbell Barton [Sat, 2 Dec 2017 11:35:09 +0000 (22:35 +1100)]
Cleanup: indentation

4 years agoFix Cycles standalone crash when saving output, after recent refactoring.
Brecht Van Lommel [Sat, 2 Dec 2017 04:44:32 +0000 (05:44 +0100)]
Fix Cycles standalone crash when saving output, after recent refactoring.

4 years agoDraw Maganer: Cleanup: Remove unnecessary lines of code in draw_cache_impl_metaball.c
Germano [Fri, 1 Dec 2017 20:25:46 +0000 (18:25 -0200)]
Draw Maganer: Cleanup: Remove unnecessary lines of code in draw_cache_impl_metaball.c

4 years agounittests: Update (fix) unittests after workspace API change
Dalai Felinto [Fri, 1 Dec 2017 18:08:45 +0000 (16:08 -0200)]
unittests: Update (fix) unittests after workspace API change

Tests were broken since e8c15e0ed15f8369d.

We now get view_layer from window, not workspace, since the same workspace can
have a different view_layer depending on the window scene.

4 years agoFixup for workspace view_layer fix
Dalai Felinto [Fri, 1 Dec 2017 17:26:46 +0000 (15:26 -0200)]
Fixup for workspace view_layer fix

We do not assume subversion bump until we actually change the subversion.

For example, a branch may have bumped its subversion to 3, yet still require
the new doversion code introduced on 108c4bd5026.

4 years agoFix crash reading 2.8 files with workspace.view_layer set
Julian Eisel [Fri, 1 Dec 2017 17:06:06 +0000 (18:06 +0100)]
Fix crash reading 2.8 files with workspace.view_layer set

Stupid error from e8c15e0ed15f8369d.

Also removed WorkSpace.view_layer usage and marked as deprecated.

4 years agoDepsgraph: Call editors update after everything was flushed
Sergey Sharybin [Fri, 1 Dec 2017 16:56:52 +0000 (17:56 +0100)]
Depsgraph: Call editors update after everything was flushed

This way we can inform editors about all edits at once. Currently this is not
used, but in the next commits we will inform editors about what exactly has

4 years agoCleanup: Proper silencing of unused vars( for now).
Bastien Montagne [Fri, 1 Dec 2017 16:58:15 +0000 (17:58 +0100)]
Cleanup: Proper silencing of unused vars( for now).

4 years agoFix warnings in release builds.
Bastien Montagne [Fri, 1 Dec 2017 16:41:54 +0000 (17:41 +0100)]
Fix warnings in release builds.

4 years agoCleanup: forgot to rename RNA prop flag to override_static...
Bastien Montagne [Fri, 1 Dec 2017 16:33:56 +0000 (17:33 +0100)]
Cleanup: forgot to rename RNA prop flag to override_static...

4 years agoDepsgraph: Separate loop for ID node flags clear
Sergey Sharybin [Fri, 1 Dec 2017 16:30:36 +0000 (17:30 +0100)]
Depsgraph: Separate loop for ID node flags clear

This ends up in less number of memory writes, which should have positive effect
on performance.

4 years agoFix update of non-scene owned layer collections
Dalai Felinto [Fri, 1 Dec 2017 13:24:06 +0000 (11:24 -0200)]
Fix update of non-scene owned layer collections

We are using NC_SCENE | ND_LAYER_CONTENT for the shader, however this does not work for groups
unless we manually handle the notifiers.

Otherwise the group id is passed, and the listener never gets the notification since a scene id
is expected, or no id at all.

4 years agoGroups and collection: editing group collections
Dalai Felinto [Thu, 30 Nov 2017 20:38:07 +0000 (18:38 -0200)]
Groups and collection: editing group collections

Allow users to edit either the object group active collection or view layer one

We can't support users selecting the group collections from the outliner group
because that would be imply having an active group for the scene or workspace.

But the way it is now allows to see and edit the collection values after the
group is instanced.

4 years agoGroups and collection: create group from collection
Dalai Felinto [Fri, 1 Dec 2017 14:23:05 +0000 (12:23 -0200)]
Groups and collection: create group from collection

You could still create groups as before, with Ctl + G. This will create a group
with a single visible collection.

However you can also create a group from an existing collection. Just go to
the menu you get in the outliner when clicking in a collection and pick
"Create Group".

Remember to instance the group afterwards, or link it into a new scene or file.

The group and the collection are not kept in sync afterwards. You need to manually
edit the group for further changes.

4 years agoGroups and collection: initial integration
Dalai Felinto [Fri, 1 Dec 2017 13:24:21 +0000 (11:24 -0200)]
Groups and collection: initial integration

Since we are ditching layers from Blender (2.8) we need a replacement to
control groups visibility. This commit introduces collections as the building
blocks for groups, allowing users to control visibility as well as overrides
for groups.


* Groups now have collections
    This way you can change the visibility of a collection inside a group, and add
    overrides which are part of the group and are prioritized over other overrides.

* Outliner
    Groups can inspect their collections, change visibility, and add/remove members.

    To change an override of a group collection, you need to select an instance of
    the group, and then you can choose "group" in the collection properties editor
    to edit this group active collection instead of the view layer one.

* Dupli groups overrides
    We can now have multiple instances of the same group with an original "override"
    and different overrides depending on the collection the instanced object is part


* Layers
    We use the same api for groups and scene as much as possible.

Reviewers: sergey (depsgraph), mont29 (read/write and user count)
Differential Revision:

4 years agoWorkspaces: Store an active view-layer per scene
Julian Eisel [Fri, 1 Dec 2017 14:47:24 +0000 (15:47 +0100)]
Workspaces: Store an active view-layer per scene

Instead of storing a single active view-layer in the workspace, one is
stored for each scene the workspace showed before.
With this, some things become possible:
* Multiple windows in the same workspace but showing different scenes.
* Toggling back and forth scene keeps same active view-layer for each scene.
* Activating workspace which didn't show current scene before, the current view-layer is kept.

A necessary evil for this is that accessing view-layer and object mode
from .py can't be done via workspace directly anymore. It has to be done
through the window, so RNA can use the correct scene.
So instead of `workspace.view_layer`, it's `window.view_layer` now (same
with mode) even though it's still workspace data.

Fixes T53432.

4 years agoDepsgraph: Cleanup, simplify evaluation flush function
Sergey Sharybin [Fri, 1 Dec 2017 15:02:10 +0000 (16:02 +0100)]
Depsgraph: Cleanup, simplify evaluation flush function

Also avoid once queue push for cases when current operation has multiple
outgoing relations.

4 years agoSilence warning from object_relations.c
Dalai Felinto [Fri, 1 Dec 2017 14:39:20 +0000 (12:39 -0200)]
Silence warning from object_relations.c

4 years agoDepsgraph: Remove legacy recalc flag from DNA
Sergey Sharybin [Fri, 1 Dec 2017 11:26:32 +0000 (12:26 +0100)]
Depsgraph: Remove legacy recalc flag from DNA

4 years agoDepsgraph: Remove clear of legacy unused flag
Sergey Sharybin [Fri, 1 Dec 2017 11:18:19 +0000 (12:18 +0100)]
Depsgraph: Remove clear of legacy unused flag

4 years agoDepsgraph: Move away from setting old deprecated object recalc flags
Sergey Sharybin [Fri, 1 Dec 2017 11:14:55 +0000 (12:14 +0100)]
Depsgraph: Move away from setting old deprecated object recalc flags

Those shouldn't be used anywhere for real now.

4 years agoDepsgraph: Don't use legacy flags in versioning code
Sergey Sharybin [Fri, 1 Dec 2017 11:16:29 +0000 (12:16 +0100)]
Depsgraph: Don't use legacy flags in versioning code

Wondering whether files from 2.37 are still working fine.
Don't have that version of Blender running here, so can't test :(

4 years agoDepsgraph: Use per-ID flags to see whether update is needed
Sergey Sharybin [Fri, 1 Dec 2017 11:11:38 +0000 (12:11 +0100)]
Depsgraph: Use per-ID flags to see whether update is needed

This is actually functions which needs bigger reconsideration, but for now let's
try to keep them working as much as possible.

4 years agoDepsgraph: Use new per-ID tags to see whether object in a group needs an update
Sergey Sharybin [Fri, 1 Dec 2017 11:09:26 +0000 (12:09 +0100)]
Depsgraph: Use new per-ID tags to see whether object in a group needs an update

This wouldn't be less precise than object level flag in theory, and we need to
move away from such a duplicating flags.

4 years agoTransform: Avoid attempt to bypass dependency graph update
Sergey Sharybin [Fri, 1 Dec 2017 11:07:41 +0000 (12:07 +0100)]
Transform: Avoid attempt to bypass dependency graph update

It's not possible to bypass new depsgraph, but also flush to other CoW copies
might be needed here.

4 years agoTransform: Use new DEG query API to see what's being affected by a changing object
Sergey Sharybin [Fri, 1 Dec 2017 10:39:42 +0000 (11:39 +0100)]
Transform: Use new DEG query API to see what's being affected by a changing object

This avoids us from directly calling object update, and doing other type of
update flushing.

Prepares us to get rid of Object->recalc flags.

4 years agoDepsgraph: Add query API to traverse all dependent IDs of the given ID
Sergey Sharybin [Fri, 1 Dec 2017 10:35:36 +0000 (11:35 +0100)]
Depsgraph: Add query API to traverse all dependent IDs of the given ID

4 years agoDepsgraph: Move iterator to own implementation file
Sergey Sharybin [Thu, 30 Nov 2017 15:49:32 +0000 (16:49 +0100)]
Depsgraph: Move iterator to own implementation file

4 years agoDepsgraph: Cleanup, use enum value rather than a define
Sergey Sharybin [Thu, 30 Nov 2017 15:46:33 +0000 (16:46 +0100)]
Depsgraph: Cleanup, use enum value rather than a define

4 years agoDepsgraph: Cleanup, naming
Sergey Sharybin [Thu, 30 Nov 2017 15:44:35 +0000 (16:44 +0100)]
Depsgraph: Cleanup, naming

It makes more sense to stick to DEG_iterator_object order in name, since we can
have functions to iterate over different entities and we want all of them to
have common prefix.

4 years ago_gawain python module: Add methods "program_use_begin" and "program_use_end"
Germano [Fri, 1 Dec 2017 06:25:47 +0000 (04:25 -0200)]
_gawain python module: Add methods "program_use_begin" and "program_use_end"

Required to updade uniforms

4 years agoRNA: Fix unreported: Some callbacks called when updating properties were incorrect
Germano [Thu, 30 Nov 2017 18:53:15 +0000 (16:53 -0200)]
RNA: Fix unreported: Some callbacks called when updating properties were incorrect

4 years agoRemoving OMP: legacy ccgsubsurf.
Bastien Montagne [Thu, 30 Nov 2017 14:55:15 +0000 (15:55 +0100)]
Removing OMP: legacy ccgsubsurf.

Performances gain is rather low this time, about 5% on average (in whole
affected functions).

4 years agoDepsgraph: Add assert to make sure the view layer is part of the scene
Dalai Felinto [Thu, 30 Nov 2017 15:44:09 +0000 (13:44 -0200)]
Depsgraph: Add assert to make sure the view layer is part of the scene

Which is not in some cases since workspace is still partly implemented.

4 years agoTransform: Fix recent merge conflict resolution fiasco
Sergey Sharybin [Thu, 30 Nov 2017 15:36:24 +0000 (16:36 +0100)]
Transform: Fix recent merge conflict resolution fiasco

Why is it called legacy when this is a legit flags which are still to be checked
at a runtime???

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 30 Nov 2017 14:11:06 +0000 (15:11 +0100)]
Merge branch 'master' into blender2.8

4 years agoTransform: Use single flag with more meaningful name to prevent snapping to a depende...
Sergey Sharybin [Thu, 30 Nov 2017 14:03:48 +0000 (15:03 +0100)]
Transform: Use single flag with more meaningful name to prevent snapping to a dependent object

The idea of this flag was to prevent snapping onto an object which depends on
currently modifying ones. Using single flag makes more sense here, and also
makes it possible to replace some ob->recalc based magic with depsgraph query
to set those flags.

4 years agoTransform: Remove some legacy code about snapping in particle edit mode
Sergey Sharybin [Thu, 30 Nov 2017 13:52:34 +0000 (14:52 +0100)]
Transform: Remove some legacy code about snapping in particle edit mode

It looks stupid to first force some flag being set and then have workaround
to ignore that flag in snapping code. Let's just not set the flag in the first

The only useful situation where such snapping was usable is to move roots of
disconnected hair, which still works just fine. However, there might be some
other hidden corner case where this workaround was needed.

4 years agoFix memory leak when single_obdata_users() fails to copy datablock
Dalai Felinto [Thu, 30 Nov 2017 12:37:54 +0000 (10:37 -0200)]
Fix memory leak when single_obdata_users() fails to copy datablock

4 years agoFix lightprobe single user not working
Dalai Felinto [Thu, 30 Nov 2017 12:57:48 +0000 (10:57 -0200)]
Fix lightprobe single user not working

4 years agoDepsgraph: Fix crash on playback of animated objects when CoW is enabled
Sergey Sharybin [Thu, 30 Nov 2017 12:42:56 +0000 (13:42 +0100)]
Depsgraph: Fix crash on playback of animated objects when CoW is enabled

We should keep base_flags after CoW object datablock was updated. Not entirely
happy with current solution, but it fixes crash and allows us to run tests

More proper solution would be to make CoW operation a per-component thingie,
which will only update corresponding parts.

4 years agoLayer: Copy layer collection properties when doing a full copy of scene
Dalai Felinto [Thu, 30 Nov 2017 12:01:15 +0000 (10:01 -0200)]
Layer: Copy layer collection properties when doing a full copy of scene

4 years agoDepsgraph: Fix wrong remapping of compositor node tree when CoW is enabled
Sergey Sharybin [Thu, 30 Nov 2017 11:35:51 +0000 (12:35 +0100)]
Depsgraph: Fix wrong remapping of compositor node tree when CoW is enabled

4 years agoDepsgraph: Fix missing objects in viewport when CoW is enabled
Sergey Sharybin [Thu, 30 Nov 2017 11:29:53 +0000 (12:29 +0100)]
Depsgraph: Fix missing objects in viewport when CoW is enabled

Remapping of pointers did not work properly, since it had no pointers yet to
remap base->object to a CoW object.

4 years agoDepsgraph: Make sure we pass proper base to object builder
Sergey Sharybin [Thu, 30 Nov 2017 11:27:54 +0000 (12:27 +0100)]
Depsgraph: Make sure we pass proper base to object builder

4 years agoDepsgraph: Make a note about why is it OK to pass original base in relations builder
Sergey Sharybin [Thu, 30 Nov 2017 11:24:57 +0000 (12:24 +0100)]
Depsgraph: Make a note about why is it OK to pass original base in relations builder

4 years agoDepsgraph: Properly pass flags when COW is not used
Sergey Sharybin [Thu, 30 Nov 2017 11:23:04 +0000 (12:23 +0100)]
Depsgraph: Properly pass flags when COW is not used

4 years agoDepsgraph: Cleanup spelling
Sergey Sharybin [Thu, 30 Nov 2017 11:08:10 +0000 (12:08 +0100)]
Depsgraph: Cleanup spelling

4 years agoDepsgraph: Tag all id_types on_visible_update
Dalai Felinto [Thu, 30 Nov 2017 11:14:43 +0000 (09:14 -0200)]
Depsgraph: Tag all id_types on_visible_update

We need all id nodes to be evaluated at least once when opening a file.
This is particuarly required for the upcoming group collection patch.

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 30 Nov 2017 10:59:28 +0000 (11:59 +0100)]
Merge branch 'master' into blender2.8

4 years agoDepsgraph: More full explanation for previous commit
Sergey Sharybin [Thu, 30 Nov 2017 10:57:21 +0000 (11:57 +0100)]
Depsgraph: More full explanation for previous commit

4 years agoDepsgraph: Fix DEG_id_type_tag comment
Dalai Felinto [Thu, 30 Nov 2017 10:53:11 +0000 (08:53 -0200)]
Depsgraph: Fix DEG_id_type_tag comment

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 30 Nov 2017 07:30:41 +0000 (18:30 +1100)]
Merge branch 'master' into blender2.8

4 years agoHaiku OS Support
Campbell Barton [Thu, 30 Nov 2017 06:56:01 +0000 (17:56 +1100)]
Haiku OS Support

D2860 by @miqlas

Even though Haiku is a niche OS, only minor changes are needed.