blender.git
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
place.

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
again.

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.

4 years agoCycles: Improve denoising speed on GPUs with small tile sizes
Lukas Stockner [Fri, 10 Nov 2017 03:34:14 +0000 (04:34 +0100)]
Cycles: Improve denoising speed on GPUs with small tile sizes

Previously, the NLM kernels would be launched once per offset with one thread per pixel.
However, with the smaller tile sizes that are now feasible, there wasn't enough work to fully occupy GPUs which results in a significant slowdown.

Therefore, the kernels are now launched in a single call that handles all offsets at once.
This has two downsides: Memory accesses to accumulating buffers are now atomic, and more importantly, the temporary memory now has to be allocated for every shift at once, increasing the required memory.
On the other hand, of course, the smaller tiles significantly reduce the size of the memory.

The main bottleneck right now is the construction of the transformation - there is nothing to be parallelized there, one thread per pixel is the maximum.
I tried to parallelize the SVD implementation by storing the matrix in shared memory and launching one block per pixel, but that wasn't really going anywhere.

To make the new code somewhat readable, the handling of rectangular regions was cleaned up a bit and commented, it should be easier to understand what's going on now.
Also, some variables have been renamed to make the difference between buffer width and stride more apparent, in addition to some general style cleanup.

4 years agoFix T53410: 3D Text always recalculated
Campbell Barton [Thu, 30 Nov 2017 06:08:37 +0000 (17:08 +1100)]
Fix T53410: 3D Text always recalculated

4 years agoSelect similar for bones by group index
Campbell Barton [Thu, 30 Nov 2017 03:33:58 +0000 (14:33 +1100)]
Select similar for bones by group index

D2931 by @col-one

4 years agoFix T53420: Vertex Groups: The "-" button gets a hidden function
Bastien Montagne [Wed, 29 Nov 2017 19:19:07 +0000 (20:19 +0100)]
Fix T53420: Vertex Groups: The "-" button gets a hidden function

Guess 'remove all unlocked' is new-ish feature...

To be backported to 2.79a (I think).

4 years agoFix T53116: default texture coordinates for volume materials are blank.
José Luis Oliveira Cunha [Wed, 29 Nov 2017 18:18:04 +0000 (19:18 +0100)]
Fix T53116: default texture coordinates for volume materials are blank.

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

4 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 29 Nov 2017 17:13:06 +0000 (18:13 +0100)]
Merge branch 'master' into blender2.8

4 years agoCycles: add object level holdout property.
Brecht Van Lommel [Sat, 18 Nov 2017 05:06:27 +0000 (06:06 +0100)]
Cycles: add object level holdout property.

This works the same as the holdout shader and Z mask layer. Combined with
overrides in 2.8 this is intended to replace the Z mask layer bits.

4 years agoCycles: improve triangle intersection performance.
Maxym Dmytrychenko [Wed, 29 Nov 2017 01:02:17 +0000 (02:02 +0100)]
Cycles: improve triangle intersection performance.

Reduces render time by about 1-2% in benchmark scenes.

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

4 years agoSequencer: add many more color blend modes, and a new color mix strip.
Maikon Araujo [Mon, 27 Nov 2017 22:33:08 +0000 (23:33 +0100)]
Sequencer: add many more color blend modes, and a new color mix strip.

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

4 years agoFix paint float color blending bugs with alpha 1.0 and vivid light.
Brecht Van Lommel [Wed, 29 Nov 2017 01:13:37 +0000 (02:13 +0100)]
Fix paint float color blending bugs with alpha 1.0 and vivid light.

For some blend modes there would be no effect with factor 1.0, even if factor
0.999 would give a very different image. Now the result should have no
discontinuity.

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

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 29 Nov 2017 16:59:04 +0000 (17:59 +0100)]
Merge branch 'master' into blender2.8

4 years agoDepsgraph: Cleanup, use explicit NULL pointer checks
Sergey Sharybin [Wed, 29 Nov 2017 16:55:28 +0000 (17:55 +0100)]
Depsgraph: Cleanup, use explicit NULL pointer checks

4 years agoID static override: add basic support for overriding animation.
Bastien Montagne [Wed, 29 Nov 2017 16:20:00 +0000 (17:20 +0100)]
ID static override: add basic support for overriding animation.

This is very bold right now - you simply can replace (or add) an action
to an override data-block. Actions themselves are not 'customizable'
through override at all currently (we may at least add
'add/remove/replace fcurves' feature in future), and nothing else in
animdata is overridable currently.

4 years agoMake basic object & bones transformations overridable.
Bastien Montagne [Wed, 29 Nov 2017 16:14:27 +0000 (17:14 +0100)]
Make basic object & bones transformations overridable.

You can now override loc/rot/scale of objects and posebones.

Also added a basic operator to make an override of active linked object,
but this is very limited/wip/testing feature (you have to manually override
object and its armature, and relink to proper local overrides
yourself...). Final 'make proxy killer' will be much more automated of
course.

4 years agoID static override: Make most Image properties overridable.
Bastien Montagne [Wed, 29 Nov 2017 16:10:24 +0000 (17:10 +0100)]
ID static override: Make most Image properties overridable.

First real 'usable' commit, will be needed by the 'virtual data-block'
asset feature (i.e. to be able to link a mere image file as if it was a
linked datablock, and generate automatically an override of it to make
it editable).

4 years agoID static override: automatically detect new overrides as part of undo step.
Bastien Montagne [Wed, 29 Nov 2017 16:06:28 +0000 (17:06 +0100)]
ID static override: automatically detect new overrides as part of undo step.

We could do that in several different way, e.g. adding some tag during
DEG evaluation, etc. But this is not a critical process (it's main
purpose is user feedback), so current solution seems to work well enough
- and it's dead simple! ;)

4 years agoID Static Override: add basic generic UI tools to control override of properties.
Bastien Montagne [Wed, 29 Nov 2017 16:03:52 +0000 (17:03 +0100)]
ID Static Override: add basic generic UI tools to control override of properties.

4 years agoID Static Override: add basic UI feedback.
Bastien Montagne [Wed, 29 Nov 2017 14:47:37 +0000 (15:47 +0100)]
ID Static Override: add basic UI feedback.

For now, using a new color for overridden properties (similar to
animated/driven status), UI team will need to work on a better solution
maybe...

4 years agoID Static Override, part II: RNA changes.
Bastien Montagne [Wed, 29 Nov 2017 14:31:31 +0000 (15:31 +0100)]
ID Static Override, part II: RNA changes.

This is essentially a huge refactor/extension of our existing RNA
compare & copy code, since static override needs more advanced handling here.

Note that not all new features are implemented yet, advanced things like
collections insertion/deletion are still TODO (medium priority).

This completes the ground work for overrides, remaining commits will be
about UI and some basic/testing activation of overrides for a limited
set of data-blocks & properties.

For details see https://developer.blender.org/D2417

4 years agoDefine RNA_STACK_ARRAY (usable everywhere in RNA), and make PYRNA_STACK_ARRAY use it.
Bastien Montagne [Wed, 29 Nov 2017 14:16:12 +0000 (15:16 +0100)]
Define RNA_STACK_ARRAY (usable everywhere in RNA), and make PYRNA_STACK_ARRAY use it.

4 years agoMerge ID static override, part I: core changes in DNA, BKE and .blend read/write.
Bastien Montagne [Wed, 29 Nov 2017 14:05:03 +0000 (15:05 +0100)]
Merge ID static override, part I: core changes in DNA, BKE and .blend read/write.

See https://developer.blender.org/D2417 for details.

Note that since static overrides rely heavily on RNA, this commit is
essentially invisible from user PoV, more in next commits.

4 years agoPreparing merge of id_override_static: add BKE_id_swap().
Bastien Montagne [Wed, 29 Nov 2017 12:13:16 +0000 (13:13 +0100)]
Preparing merge of id_override_static: add BKE_id_swap().

This function swaps the memory content of two data-blocks (of same type
obviously), while preserving most of the ID 'header' itself.

It is intended to be used to quickly and easily replace the data of an
existing ID by another one, presumably a temporary 'working' one,
without having to suffer from things like name changes,
registering/removing from Main database, etc.

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 29 Nov 2017 15:32:50 +0000 (16:32 +0100)]
Merge branch 'master' into blender2.8

4 years agoCleanup: De-duplicate code in object update routines
Sergey Sharybin [Wed, 29 Nov 2017 15:26:16 +0000 (16:26 +0100)]
Cleanup: De-duplicate code in object update routines

4 years agoCleanup: Split depsgraph uber transform function callback
Sergey Sharybin [Wed, 29 Nov 2017 15:22:59 +0000 (16:22 +0100)]
Cleanup: Split depsgraph uber transform function callback

4 years agoCleanup: Remove unused argument
Sergey Sharybin [Wed, 29 Nov 2017 15:14:39 +0000 (16:14 +0100)]
Cleanup: Remove unused argument

4 years agoCleanup: Make object_handle_update easier to follow
Sergey Sharybin [Wed, 29 Nov 2017 15:12:39 +0000 (16:12 +0100)]
Cleanup: Make object_handle_update easier to follow

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 29 Nov 2017 15:00:50 +0000 (16:00 +0100)]
Merge branch 'master' into blender2.8

4 years agoCleanup: Remove unused function
Sergey Sharybin [Wed, 29 Nov 2017 14:59:51 +0000 (15:59 +0100)]
Cleanup: Remove unused function

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

4 years agoEevee: Fix default shader.
Clément Foucault [Wed, 29 Nov 2017 15:02:35 +0000 (16:02 +0100)]
Eevee: Fix default shader.

4 years agoTransform: Avoid use of ob->recalc in snapping code
Sergey Sharybin [Wed, 29 Nov 2017 14:29:39 +0000 (15:29 +0100)]
Transform: Avoid use of ob->recalc in snapping code

Do a direct update of object transform instead, without involving
manual trickery of recalc flag.

Shouldn't be functional changes as far as artists are concerned,
but will allow us to get rid of recalc flags in 2.8.

Thanks Bastien for review!

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 29 Nov 2017 13:59:48 +0000 (14:59 +0100)]
Merge branch 'master' into blender2.8

4 years agoDepsgraph: Fix assert failure
Sergey Sharybin [Wed, 29 Nov 2017 13:58:37 +0000 (14:58 +0100)]
Depsgraph: Fix assert failure

4 years agoDraw manager: Cleanup, use lower case prefix for private functions
Sergey Sharybin [Wed, 29 Nov 2017 11:49:15 +0000 (12:49 +0100)]
Draw manager: Cleanup, use lower case prefix for private functions

4 years agoExternal engine: Cleanup, use lower case prefix for private functions
Sergey Sharybin [Wed, 29 Nov 2017 11:30:55 +0000 (12:30 +0100)]
External engine: Cleanup, use lower case prefix for private functions

4 years agoEevee engine: Cleanup, use lower case prefix for private functions
Sergey Sharybin [Wed, 29 Nov 2017 11:28:40 +0000 (12:28 +0100)]
Eevee engine: Cleanup, use lower case prefix for private functions

4 years agoClay engine: Cleanup, use lower case prefix for private functions
Sergey Sharybin [Wed, 29 Nov 2017 11:26:59 +0000 (12:26 +0100)]
Clay engine: Cleanup, use lower case prefix for private functions

4 years agoBasic engine: Cleanup, use lower case prefix for private functions
Sergey Sharybin [Wed, 29 Nov 2017 11:24:36 +0000 (12:24 +0100)]
Basic engine: Cleanup, use lower case prefix for private functions

4 years agoEevee: Cleanup, avoid unneeded goto
Sergey Sharybin [Wed, 29 Nov 2017 11:19:57 +0000 (12:19 +0100)]
Eevee: Cleanup, avoid unneeded goto

Ideally this also should be split into smaller functions, but will leave that
for later a bit.

4 years agoEevee: Cleanup, split long probe refresh function
Sergey Sharybin [Wed, 29 Nov 2017 11:15:22 +0000 (12:15 +0100)]
Eevee: Cleanup, split long probe refresh function

There is no reason to have such a long function, it is really easy to break it
down into a smaller ones, and call them from where needed. Makes them smaller
and easier to follow. Also avoids use of confusing goto's.

4 years agoEevee: Cleanup, avoid too much nested indentation
Sergey Sharybin [Wed, 29 Nov 2017 10:59:15 +0000 (11:59 +0100)]
Eevee: Cleanup, avoid too much nested indentation

Just do early `continue`, makes code easier to follow than fewzillion of nested
checks and loops and everything.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 29 Nov 2017 10:30:03 +0000 (21:30 +1100)]
Merge branch 'master' into blender2.8

4 years agoCleanup: rename bpy_util -> bpy_capi_utils
Campbell Barton [Wed, 29 Nov 2017 10:11:29 +0000 (21:11 +1100)]
Cleanup: rename bpy_util -> bpy_capi_utils

This is for internal CAPI use only, avoid confusion w/ bpy.utils module.

4 years agoEevee: Stop depsgraph update callback form allocating unneeded memory
Sergey Sharybin [Wed, 29 Nov 2017 10:00:50 +0000 (11:00 +0100)]
Eevee: Stop depsgraph update callback form allocating unneeded memory

4 years agoDraw manager: Cleanup, naming
Sergey Sharybin [Wed, 29 Nov 2017 09:48:42 +0000 (10:48 +0100)]
Draw manager: Cleanup, naming

Similar to previous commit in Eevee.

4 years agoEevee: Cleanup, naming
Sergey Sharybin [Wed, 29 Nov 2017 09:36:58 +0000 (10:36 +0100)]
Eevee: Cleanup, naming

For functions which will allocate requested data if it does not exist yet
"_ensure" is to be used instead of "_get". "_get" functions should return
NULL in cases when requested data does not exist yet.

4 years agoDraw manager: Cleanup, indentation in preprocessor
Sergey Sharybin [Wed, 29 Nov 2017 09:22:53 +0000 (10:22 +0100)]
Draw manager: Cleanup, indentation in preprocessor

4 years agoDepsgraph: Remove object-specific flag which was storing update tag
Sergey Sharybin [Tue, 28 Nov 2017 16:09:36 +0000 (17:09 +0100)]
Depsgraph: Remove object-specific flag which was storing update tag

There were following issues:

- This was used in a similar way of DEG's ID update callback. No reason to have
  yet-another-way of informing editors/engines about changes. Better to keep
  regular update mechanism usable and fast for those needs.
- It wasn't granular at all, and granularity in flags is something what we
  need to support anyway, even for existing ID update.
- There is no reason to have it per-object. Depsgraph operates on IDs.
- It wasn't clear when and who clears the flag, and was possible to run into
  conflicts.

4 years agoDraw manager: Listen to depsgraph's ID update callbacks
Sergey Sharybin [Tue, 28 Nov 2017 16:05:52 +0000 (17:05 +0100)]
Draw manager: Listen to depsgraph's ID update callbacks

This replaces dedicated flag which wasn't clean who sets it and who clears it,
and which was also trying to re-implement existing functionality in a way.

Flushing is not currently very efficient but there are ways to speed this up
a lot, but needs more investigation.

4 years agoEevee: Set engine data needs update to false when everything is up to date
Sergey Sharybin [Tue, 28 Nov 2017 16:22:34 +0000 (17:22 +0100)]
Eevee: Set engine data needs update to false when everything is up to date

Currently this shouldn't cause any differences, but is required for the upcoming
changes in informing draw engines about changes.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 29 Nov 2017 07:06:24 +0000 (18:06 +1100)]
Merge branch 'master' into blender2.8

4 years agoCleanup: Python imports
Campbell Barton [Wed, 29 Nov 2017 07:00:41 +0000 (18:00 +1100)]
Cleanup: Python imports

Split over lines to diff more easily.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 29 Nov 2017 05:15:21 +0000 (16:15 +1100)]
Merge branch 'master' into blender2.8

4 years agoPyAPI: add function to check any mathutils type
Campbell Barton [Wed, 29 Nov 2017 05:09:46 +0000 (16:09 +1100)]
PyAPI: add function to check any mathutils type

Also add CheckExact versions of type checking macros.

4 years agoRNA: remove paranoid NULL check
Campbell Barton [Wed, 29 Nov 2017 03:29:47 +0000 (14:29 +1100)]
RNA: remove paranoid NULL check

Was added as part of D2666.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 29 Nov 2017 03:21:03 +0000 (14:21 +1100)]
Merge branch 'master' into blender2.8

4 years agoRNA: sync API changes from 2.8
Campbell Barton [Wed, 29 Nov 2017 03:09:49 +0000 (14:09 +1100)]
RNA: sync API changes from 2.8

4 years agoRNA: Allow structs to define tags for their properties
Julian Eisel [Wed, 29 Nov 2017 02:52:06 +0000 (13:52 +1100)]
RNA: Allow structs to define tags for their properties

Adds support for defining a number of tags as part of the rna-struct
definition, which its properties can set similar to property-flags.
BPY supports setting these tags when defining custom properties too.

* To define tags for a struct (which its properties can use then), define the tags in an `EnumPropertyItem` array, and assign them to the struct using `RNA_def_struct_property_tags(...)`.
* To set tags for an RNA-property in C, use the new `RNA_def_property_tags(...)`.
* To set tags for an RNA-property in Python, use the newly added tags parameter. E.g. `bpy.props.FloatProperty(name="Some Float", tags={'SOME_TAG', 'ANOTHER_TAG'})`.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 29 Nov 2017 02:44:59 +0000 (13:44 +1100)]
Merge branch 'master' into blender2.8

4 years agoPyAPI: PyC_Err_PrintWithFunc utility function
Campbell Barton [Wed, 29 Nov 2017 02:41:10 +0000 (13:41 +1100)]
PyAPI: PyC_Err_PrintWithFunc utility function

Move function error printing utility into py_capi_utils.

4 years agoDepsgraph: Fix Camera object showing when not in view layer
Dalai Felinto [Tue, 28 Nov 2017 19:47:22 +0000 (17:47 -0200)]
Depsgraph: Fix Camera object showing when not in view layer

If the Scene->camera was not in the active view layer we would still see it in the viewport.

4 years agoEevee: Fix T53413: Crash when using displacement bump relink.
Clément Foucault [Tue, 28 Nov 2017 16:22:15 +0000 (17:22 +0100)]
Eevee: Fix T53413: Crash when using displacement bump relink.

ntree_shader_relink_displacement is creating a transient node that does not have a correct original to point to.
In this case we revert to constant uniform.

4 years agoDraw manager: Pass explicit context to DEG scene update callback
Sergey Sharybin [Tue, 28 Nov 2017 15:42:58 +0000 (16:42 +0100)]
Draw manager: Pass explicit context to DEG scene update callback

This way it is more clear what is needed to be passed and what is available
in the callback itself.

Thanks Dalai for review and tips about engine type!

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Tue, 28 Nov 2017 15:34:43 +0000 (16:34 +0100)]
Merge branch 'master' into blender2.8

4 years agoCleanup (remove commented OMP directive).
Bastien Montagne [Tue, 28 Nov 2017 15:31:11 +0000 (16:31 +0100)]
Cleanup (remove commented OMP directive).

4 years agoCleanup: naming
Sergey Sharybin [Tue, 28 Nov 2017 14:08:43 +0000 (15:08 +0100)]
Cleanup: naming

4 years agoCleanup, naming of engine type variable
Sergey Sharybin [Tue, 28 Nov 2017 14:06:32 +0000 (15:06 +0100)]
Cleanup, naming of engine type variable

4 years agoAudaspace: Fix -Wreorder warning
Sergey Sharybin [Tue, 28 Nov 2017 12:09:15 +0000 (13:09 +0100)]
Audaspace: Fix -Wreorder warning

Makes building less noisy, helps catching real introduced warnings/errors.

@xeXyon, mind having a look here and possibly apply to upstream? :)

4 years agoDepsgraph: Wrap context used for editors update callback into a structure
Sergey Sharybin [Tue, 28 Nov 2017 12:04:21 +0000 (13:04 +0100)]
Depsgraph: Wrap context used for editors update callback into a structure

This way we can extend it much easier.

4 years agoDepsgraph: Remove workaround for Blender Internal in viewport
Sergey Sharybin [Tue, 28 Nov 2017 11:56:01 +0000 (12:56 +0100)]
Depsgraph: Remove workaround for Blender Internal in viewport

This commit effectively reverts fix T45702 done in 067fe2719a99.

Reasoning:

- Blender Internal is being replaced with Eevee, and will be removed entirely
  rather soon.

- All render engines are planned to have own depsgraph, so such threading
  conflicts should no longer be an issue.

- We don't want to spend time on porting workarounds for EOL things to a new
  design. Less code -- faster the work :)

- If such notifications will end up needed for some other cases, we would
  need to re-implement this a more proper depsgraph tagging/flushing and make
  it to work with all copy-on-write datablocks and everything.

4 years agoDepsgraph: Don't call DEG ID update functions directly
Sergey Sharybin [Tue, 28 Nov 2017 11:13:07 +0000 (12:13 +0100)]
Depsgraph: Don't call DEG ID update functions directly

There might be much more logic involved there, also we might not know proper
evaluated CoW pointer there yet. So we leave this to dependency graph to
decide what exactly to do here.

4 years agoRemoving OMP: BKE's tracking_stabilize.
Bastien Montagne [Tue, 28 Nov 2017 11:38:10 +0000 (12:38 +0100)]
Removing OMP: BKE's tracking_stabilize.

Again, 2 times quicker with BLI than with OMP (from about 5ms to 2.5ms
per frame for the parallelized loop, on a rather small video...).

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 28 Nov 2017 09:35:24 +0000 (20:35 +1100)]
Merge branch 'master' into blender2.8

4 years agomakesdna/makesrna: silence output by default
Campbell Barton [Tue, 28 Nov 2017 09:27:40 +0000 (20:27 +1100)]
makesdna/makesrna: silence output by default

No need to print status for basic & reliable operations,
build systems can output operations they run if needed,
or debug output changed in the source if developers are debugging.

Nice for ninja, so any printed text hints at a problem to fix.

4 years agoFix T53291: Deleting objects do not delete them from the blend file
Dalai Felinto [Mon, 27 Nov 2017 16:33:31 +0000 (14:33 -0200)]
Fix T53291: Deleting objects do not delete them from the blend file

User count was wrong for newly created files. We increase/decrease user count
when we link/delete objects from a SceneCollection.

So we don't want to leave user count of 1 after calling BKE_libblock_alloc in
BKE_object_add_only_object().

4 years agoFixing alembic unittest after render layer purge
Dalai Felinto [Mon, 27 Nov 2017 16:52:15 +0000 (14:52 -0200)]
Fixing alembic unittest after render layer purge

4 years agoFix T53145: bevel tool does not start with amount at zero.
Brecht Van Lommel [Mon, 27 Nov 2017 15:55:27 +0000 (16:55 +0100)]
Fix T53145: bevel tool does not start with amount at zero.

4 years agoDepsgraph: Parameters component does exist in objects
Sergey Sharybin [Mon, 27 Nov 2017 15:34:44 +0000 (16:34 +0100)]
Depsgraph: Parameters component does exist in objects

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 27 Nov 2017 15:23:32 +0000 (16:23 +0100)]
Merge branch 'master' into blender2.8

4 years agoCleanup: indentation
Sergey Sharybin [Mon, 27 Nov 2017 15:22:09 +0000 (16:22 +0100)]
Cleanup: indentation