21 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Mar 2018 15:03:36 +0000 (02:03 +1100)]
Merge branch 'master' into blender2.8

21 months agoEditMesh: pass object data to notifiers
Campbell Barton [Wed, 7 Mar 2018 14:47:35 +0000 (01:47 +1100)]
EditMesh: pass object data to notifiers

Both were being passed in different parts of the code,
use object data for consistency.

21 months agoCleanup: use _BEGIN suffix for group iterators
Campbell Barton [Wed, 7 Mar 2018 09:46:27 +0000 (20:46 +1100)]
Cleanup: use _BEGIN suffix for group iterators

21 months agoAdd missing NULL check
Campbell Barton [Wed, 7 Mar 2018 05:40:02 +0000 (16:40 +1100)]
Add missing NULL check

Caused loading user-prefs to crash.

21 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Mar 2018 03:31:53 +0000 (14:31 +1100)]
Merge branch 'master' into blender2.8

21 months agoCleanup: edit-mode undo API
Campbell Barton [Wed, 7 Mar 2018 02:55:36 +0000 (13:55 +1100)]
Cleanup: edit-mode undo API

Move function descriptions into the struct,
minor improvements to variable naming,
use convention of 'g_' prefix for static vars.

21 months agoDRW: Fix memory leak.
Clément Foucault [Wed, 7 Mar 2018 00:39:09 +0000 (01:39 +0100)]
DRW: Fix memory leak.

This prevents the creation of a new job if no job is running.

21 months agoEevee: Fix volume rendering glitches.
Clément Foucault [Wed, 7 Mar 2018 00:36:09 +0000 (01:36 +0100)]
Eevee: Fix volume rendering glitches.

The bug was due to the Halton function returning uninitialized value for 0 iteration.

21 months agoEevee: Fix garbage on the first frames when enabling volumetrics.
Clément Foucault [Tue, 6 Mar 2018 22:17:50 +0000 (23:17 +0100)]
Eevee: Fix garbage on the first frames when enabling volumetrics.

Was cause by newly added shader deferred compilation.

21 months agoDraw Manager: Simplify the algorithm that extract the BoundingSphere of a Frustum
Germano [Tue, 6 Mar 2018 22:27:43 +0000 (19:27 -0300)]
Draw Manager: Simplify the algorithm that extract the BoundingSphere of a Frustum

The idea is to separate the most common case from symmetrical frustum. And to make a simple but efficient calculation.

The new radius is usually 98% the size of the radius size of the asymmetric solution.

Thanks to @fclem for reviewing the patch on IRC

21 months agoEevee: Fix crash with volumetrics + default mat + alpha blend
Clément Foucault [Tue, 6 Mar 2018 15:52:06 +0000 (16:52 +0100)]
Eevee: Fix crash with volumetrics + default mat + alpha blend

21 months agoEevee: Fix Cascaded shadowmap setup.
Clément Foucault [Tue, 6 Mar 2018 01:51:51 +0000 (02:51 +0100)]
Eevee: Fix Cascaded shadowmap setup.

It was getting the wrong matrice because of the point light override.

21 months agoDRW: Fix DRW_viewport_matrix_override_set_all function.
Clément Foucault [Tue, 6 Mar 2018 01:49:55 +0000 (02:49 +0100)]
DRW: Fix DRW_viewport_matrix_override_set_all function.

21 months agoEevee: Fix probes not working after a world update.
Clément Foucault [Tue, 6 Mar 2018 01:36:00 +0000 (02:36 +0100)]
Eevee: Fix probes not working after a world update.

21 months agoEevee: Update to support shader deferred compilation.
Clément Foucault [Tue, 6 Mar 2018 01:19:28 +0000 (02:19 +0100)]
Eevee: Update to support shader deferred compilation.

World probe is tagged to refresh when it it's shader is updated.
Probes are recomputed only after all meshes shaders have been compiled.

21 months agoGPU: Fix typo.
Clément Foucault [Mon, 5 Mar 2018 20:52:02 +0000 (21:52 +0100)]
GPU: Fix typo.

21 months agoDRW: Fix broken grid in ortho view.
Clément Foucault [Mon, 5 Mar 2018 15:11:49 +0000 (16:11 +0100)]
DRW: Fix broken grid in ortho view.

21 months agoEevee: fix wrong sizeof.
Clément Foucault [Mon, 5 Mar 2018 00:26:12 +0000 (01:26 +0100)]
Eevee: fix wrong sizeof.

Like really? wtf dude? *self face slapping*

21 months agoDRW: Shader Deferred compilation: Use a wmJob for threading.
Clément Foucault [Mon, 5 Mar 2018 20:50:56 +0000 (21:50 +0100)]
DRW: Shader Deferred compilation: Use a wmJob for threading.

Also get rid of the static var and initialization.
This enables the user to see the progress on the info header.
Closing blender or reading a file also kill the job which is good.

Unfortunatly, this job cannot be interrupt by users directly. We could make it interruptible but we need a way to resume the compilation.

21 months agoDRW: Deferred compilation initial implementation.
Clément Foucault [Sun, 4 Mar 2018 23:54:31 +0000 (00:54 +0100)]
DRW: Deferred compilation initial implementation.

21 months agoMaterial: Free gpumaterials before the notree.
Clément Foucault [Sun, 4 Mar 2018 23:52:19 +0000 (00:52 +0100)]
Material: Free gpumaterials before the notree.

This is because gpumaterials can contain references to the tree when doing lazy compilation.

21 months agoEevee: Fix bad framebuffer when changing probe resolution.
Clément Foucault [Sun, 4 Mar 2018 23:49:24 +0000 (00:49 +0100)]
Eevee: Fix bad framebuffer when changing probe resolution.

21 months agoScreen: Fix screen layout preview render.
Clément Foucault [Sat, 3 Mar 2018 17:06:19 +0000 (18:06 +0100)]
Screen: Fix screen layout preview render.

21 months agoEevee: More use of DRW_viewport_matrix_override_set_all
Clément Foucault [Sat, 3 Mar 2018 00:48:16 +0000 (01:48 +0100)]
Eevee: More use of DRW_viewport_matrix_override_set_all

21 months agoDRW: Fix occlusion culling.
Clément Foucault [Tue, 6 Mar 2018 15:26:13 +0000 (16:26 +0100)]
DRW: Fix occlusion culling.

21 months agoCycles: Fix crash when building with no shading systems
Sergey Sharybin [Tue, 6 Mar 2018 11:00:51 +0000 (12:00 +0100)]
Cycles: Fix crash when building with no shading systems

21 months agoCycles: Cleanup, indentation
Sergey Sharybin [Tue, 6 Mar 2018 10:42:30 +0000 (11:42 +0100)]
Cycles: Cleanup, indentation

21 months agoCleanup: unused var
Campbell Barton [Tue, 6 Mar 2018 11:42:32 +0000 (22:42 +1100)]
Cleanup: unused var

21 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 6 Mar 2018 09:04:02 +0000 (20:04 +1100)]
Merge branch 'master' into blender2.8

21 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 6 Mar 2018 08:13:41 +0000 (19:13 +1100)]
Merge branch 'master' into blender2.8

21 months agoUtility to enter sculpt mode
Campbell Barton [Tue, 6 Mar 2018 08:04:43 +0000 (19:04 +1100)]
Utility to enter sculpt mode

21 months agoEevee: Optimize shadows drawing
Germano [Tue, 6 Mar 2018 01:03:14 +0000 (22:03 -0300)]
Eevee: Optimize shadows drawing

In the gpus like `AMD Radeon HD 7570M` and `Intel(R) HD Graphics 4000` this solution improves performance a hundreds or even thousands of times depending on the resolution.

Reviewed By: @brecht and @fclem

Differential Revision:

21 months agoFix T54234, add BLENDER_VERSION_CHAR to .plist
Arto Kitula [Tue, 6 Mar 2018 00:36:29 +0000 (02:36 +0200)]
Fix T54234, add BLENDER_VERSION_CHAR to .plist

21 months agoFix T53206: Array modifier doesn't merge vgroups
Campbell Barton [Mon, 5 Mar 2018 22:57:41 +0000 (09:57 +1100)]
Fix T53206: Array modifier doesn't merge vgroups

Vertex group remapping utility function,
now shared between object join and array modifier cap-ends.

Weights which don't exist are removed.

D3092 by @Foaly

21 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 5 Mar 2018 15:14:46 +0000 (16:14 +0100)]
Merge branch 'master' into blender2.8

21 months agoSequencer: Expose read-only FPS property for movie-type strips
Sergey Sharybin [Mon, 5 Mar 2018 14:00:04 +0000 (15:00 +0100)]
Sequencer: Expose read-only FPS property for movie-type strips

Main purpose is to make it possible to cover FPS detection with regression test.
But it might also be handy for some other scripters.

Thanks Campbell for review!

21 months agoUI: rename panel 'Workspace Add-ons'
Campbell Barton [Mon, 5 Mar 2018 13:56:51 +0000 (00:56 +1100)]
UI: rename panel 'Workspace Add-ons'

Show/Hide is limited to menus

21 months agoFix T54204: Wrong selection on Clean Tracks (Motion Tracking)
Sergey Sharybin [Mon, 5 Mar 2018 11:00:25 +0000 (12:00 +0100)]
Fix T54204: Wrong selection on Clean Tracks (Motion Tracking)

A mistake in a fix for T53612.

Regression in 2.79a, candidate for 2.79b :S

21 months agoFix T54225: Blur node stopped working when Map Range was fed with image
Sergey Sharybin [Mon, 5 Mar 2018 10:44:42 +0000 (11:44 +0100)]
Fix T54225: Blur node stopped working when Map Range was fed with image

The issue was happening with fast Gaussian blur, and caused by NaN value pixels
in the input buffer.

Now made it so Map Range output does not produce NaN, by returning arbitrary
value of 0. Still better than NaN!

21 months agoCleanup: left wrong comment in
Campbell Barton [Mon, 5 Mar 2018 06:01:57 +0000 (17:01 +1100)]
Cleanup: left wrong comment in

21 months agoFix T53478, T53430: Sequencer cut edge case fails
Campbell Barton [Mon, 5 Mar 2018 05:00:27 +0000 (16:00 +1100)]
Fix T53478, T53430: Sequencer cut edge case fails

Previous fix for T53430 caused T54200.

The edge case for soft & hard cuts weren't working,
where the strip used start/end-still & the frame was placed exactly on
the start/end of of the sequence content.

T54200 fixed the end-still case but broke hard-cuts for all other cases.

This fixes the case for soft/hard cuts with/without start/end-still.

21 months agoRevert "Fix T53430: Cut at the strip end fails w/ endstill"
Campbell Barton [Mon, 5 Mar 2018 04:11:33 +0000 (15:11 +1100)]
Revert "Fix T53430: Cut at the strip end fails w/ endstill"

This reverts commit 855799ecc1c5e53d9fbfe520fd5402bc0138f674.

Caused T54200

21 months agoError passing context arg to marker menu
Campbell Barton [Mon, 5 Mar 2018 03:10:43 +0000 (14:10 +1100)]
Error passing context arg to marker menu

own mistake in 6981861fcfd

21 months agoFix LLVM/OSL library detection on macOS to prefer own OSL libraries.
Brecht Van Lommel [Sun, 4 Mar 2018 06:30:04 +0000 (07:30 +0100)]
Fix LLVM/OSL library detection on macOS to prefer own OSL libraries.

21 months agoFix Clang compiler detection on macOS.
Brecht Van Lommel [Sun, 4 Mar 2018 06:22:05 +0000 (07:22 +0100)]
Fix Clang compiler detection on macOS.

"AppleClang" was not properly detected here. Now make the compiler ID
test a bit less compact but consistent with other code.

21 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sat, 3 Mar 2018 13:58:14 +0000 (14:58 +0100)]
Merge branch 'master' into blender2.8

21 months agoFix T54211: OpenGL debug error message in texture draw mode.
Brecht Van Lommel [Sat, 3 Mar 2018 13:55:35 +0000 (14:55 +0100)]
Fix T54211: OpenGL debug error message in texture draw mode.

Quite harmless and won't be a problem in 2.8.

21 months agoWorkSpace: use existing mode data w/ scene-switch
Campbell Barton [Sat, 3 Mar 2018 05:39:57 +0000 (16:39 +1100)]
WorkSpace: use existing mode data w/ scene-switch

Check if mode data exists before attempting to change the modes.

21 months agoWorkSpace: avoid redundant notifiers w/ mode sync
Campbell Barton [Sat, 3 Mar 2018 05:24:35 +0000 (16:24 +1100)]
WorkSpace: avoid redundant notifiers w/ mode sync

21 months agoWorkSpace: always change modes w/ the same active object
Campbell Barton [Fri, 2 Mar 2018 14:43:44 +0000 (01:43 +1100)]
WorkSpace: always change modes w/ the same active object

21 months agoFix T54202: Cycles crash rendering empty mesh volume after recent optimization.
Brecht Van Lommel [Fri, 2 Mar 2018 21:38:59 +0000 (22:38 +0100)]
Fix T54202: Cycles crash rendering empty mesh volume after recent optimization.

21 months agoFix texture panel for Cycles
Dalai Felinto [Fri, 2 Mar 2018 19:31:33 +0000 (16:31 -0300)]
Fix texture panel for Cycles

I keep reading that texture painting is not working yet. However it is fully
working. We even have a "Full Shading" option in the viewport display panel.

Clay/EEVEE still need their UI figured out. But the context itself is doing
its part after this patch, and at least for Cycles it's working like 2.79.

21 months agoFix Cycle standalone build.
Brecht Van Lommel [Fri, 2 Mar 2018 18:54:14 +0000 (19:54 +0100)]
Fix Cycle standalone build.

21 months agoEevee: Make use of culling when rendering the shadowmaps.
Clément Foucault [Fri, 2 Mar 2018 17:35:25 +0000 (18:35 +0100)]
Eevee: Make use of culling when rendering the shadowmaps.

21 months agoEevee: Cleanup & fix Warnings.
Clément Foucault [Fri, 2 Mar 2018 17:08:40 +0000 (18:08 +0100)]
Eevee: Cleanup & fix Warnings.

21 months agoDRW: Add DRWMatrixState to manage all matrices together.
Clément Foucault [Fri, 2 Mar 2018 17:05:42 +0000 (18:05 +0100)]
DRW: Add DRWMatrixState to manage all matrices together.

21 months agoDRW: Refactor simple instancing.
Clément Foucault [Thu, 1 Mar 2018 18:27:38 +0000 (19:27 +0100)]
DRW: Refactor simple instancing.

Instead of creating a new instancing shading group without attrib, we now have instancing calls. The benefits is that they can be culled.
They can be used in conjuction with the standard and generate calls but shader must support it (which is generally not the case).
We store a pointer to the actual count so that the number can be tweaked between redraw.

This will makes multi layer rendering more efficient.

21 months agoObject Mode: Make use of optimized DRW_shgroup_call_object_add
Clément Foucault [Thu, 1 Mar 2018 14:30:48 +0000 (15:30 +0100)]
Object Mode: Make use of optimized DRW_shgroup_call_object_add

21 months agoClay: Perf: Early out of SSAO if there is no need for it.
Clément Foucault [Thu, 1 Mar 2018 14:30:25 +0000 (15:30 +0100)]
Clay: Perf: Early out of SSAO if there is no need for it.

21 months agoFix build errors in Linux
Dalai Felinto [Fri, 2 Mar 2018 16:09:32 +0000 (13:09 -0300)]
Fix build errors in Linux

21 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Fri, 2 Mar 2018 15:42:27 +0000 (16:42 +0100)]
Merge branch 'master' into blender2.8

21 months agoDepsgraph: Fix dependency cycle when ID prop drives ID property
Sergey Sharybin [Fri, 2 Mar 2018 15:27:31 +0000 (16:27 +0100)]
Depsgraph: Fix dependency cycle when ID prop drives ID property

Introduced explicit ID property node for driers in depsgraph,
so it is clear what is the input for driver, and what is the

This also solved relations builder throwing lots of errors
due to ID property not being found.

21 months agoDepsgraph: Silence obviously noisy relations build errors
Sergey Sharybin [Fri, 2 Mar 2018 14:50:28 +0000 (15:50 +0100)]
Depsgraph: Silence obviously noisy relations build errors

Those were happening for drivers which points to invalid drivers, and those
drivers will have their own dedicated error prints.

21 months agoDepsgraph: Cleanup, use dedicated function to ensure node exists
Sergey Sharybin [Fri, 2 Mar 2018 13:35:19 +0000 (14:35 +0100)]
Depsgraph: Cleanup, use dedicated function to ensure node exists

21 months agoWorkSpace: Simplify exiting mode after changes
Campbell Barton [Fri, 2 Mar 2018 13:19:49 +0000 (00:19 +1100)]
WorkSpace: Simplify exiting mode after changes

It was too tricky to know ahead of time if an object would still
be visible in the new window/workspace/scene/layer combination,
especially since other windows may share some of these data-blocks.

So store the context, make the change, then check if the object is
still visible, freeing mode data of it's not.

21 months agoDepsgraph: Cleanup, function return value
Sergey Sharybin [Fri, 2 Mar 2018 13:12:33 +0000 (14:12 +0100)]
Depsgraph: Cleanup, function return value

Driver build result was never used, so no reason to return operation.

21 months agoWorkSpace: move edit mode w/ sync into own func
Campbell Barton [Fri, 2 Mar 2018 12:04:19 +0000 (23:04 +1100)]
WorkSpace: move edit mode w/ sync into own func

21 months agoCorrect draw manager locking flag check
Campbell Barton [Fri, 2 Mar 2018 11:53:01 +0000 (22:53 +1100)]
Correct draw manager locking flag check

Error in eeae50fc1c8, thanks @mano-wii for spotting

21 months agoDepsgraph: Fix cycle detector to handle closed loops
Sergey Sharybin [Fri, 2 Mar 2018 11:27:05 +0000 (12:27 +0100)]
Depsgraph: Fix cycle detector to handle closed loops

It was possible to have relations like A -> B -> C -> A (import thing is
that no other operations points into this cluster) which were not detected
or reported by dependency cycle solver.

Now this is solved by ensuring we don't leave unvisited nodes behind.

21 months agoCleanup: Avoid double semi-colon
Sergey Sharybin [Fri, 2 Mar 2018 10:26:07 +0000 (11:26 +0100)]
Cleanup: Avoid double semi-colon

21 months agoTests: Avoid access globals from abstract base class
Sergey Sharybin [Fri, 2 Mar 2018 10:16:59 +0000 (11:16 +0100)]
Tests: Avoid access globals from abstract base class

Delegate functionality to subclasses, assert when subclasses didn't do
job the are supposed to do.

Thanks Sybren for pointing to a proper solution.

21 months agoCycles: Fix building of OpenCL kernels after volume optimization commit
Mai Lavelle [Fri, 2 Mar 2018 09:52:32 +0000 (04:52 -0500)]
Cycles: Fix building of OpenCL kernels after volume optimization commit

OpenCL is C based, so no support for operators.

Related commit: 7377d411b47d50cd943cd

21 months agoWorkSpace: ED_workspace_object_mode_in_other_window check other windows
Campbell Barton [Fri, 2 Mar 2018 09:01:49 +0000 (20:01 +1100)]
WorkSpace: ED_workspace_object_mode_in_other_window check other windows

The same workspace can have different active objects depending on the
window. So check other windows.

21 months agoMaintain scaling ratio of non-free axes in Maintain Volume T48079 fix.
Alexander Gavrilov [Fri, 2 Mar 2018 08:01:49 +0000 (11:01 +0300)]
Maintain scaling ratio of non-free axes in Maintain Volume T48079 fix.

This is probably a better way to handle it: instead of totally
discarding scaling of non-free axes, keep the ratio between them.
Basically the logic of the constraint is now that it rescales the
object uniformly in the non-free axis plane in order to force the
total volume change to the desired value.

21 months agoWorkSpace: object-sync when changing workspaces.
Campbell Barton [Fri, 2 Mar 2018 08:01:38 +0000 (19:01 +1100)]
WorkSpace: object-sync when changing workspaces.

21 months agoCleanup: move ED_object_mode_generic_* to object_modes.c
Campbell Barton [Fri, 2 Mar 2018 03:55:53 +0000 (14:55 +1100)]
Cleanup: move ED_object_mode_generic_* to object_modes.c

21 months agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 2 Mar 2018 03:46:21 +0000 (14:46 +1100)]
Merge branch 'master' into blender2.8

21 months agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 2 Mar 2018 03:09:27 +0000 (14:09 +1100)]
Merge branch 'master' into blender2.8

21 months agoObject Mode: move logic to 'object_modes.c'
Campbell Barton [Fri, 2 Mar 2018 02:53:17 +0000 (13:53 +1100)]
Object Mode: move logic to 'object_modes.c'

Was mixed with edit-mode, centralize mode switching in a single file.

No functional changes.

21 months agoCleanup: remove object-mode 'reset' check
Campbell Barton [Fri, 2 Mar 2018 02:32:24 +0000 (13:32 +1100)]
Cleanup: remove object-mode 'reset' check

Silently fail when attempting to enter a mode that's not compatible
with the object.

21 months agoCleanup: rename 'screen_changed_update'
Campbell Barton [Fri, 2 Mar 2018 02:23:45 +0000 (13:23 +1100)]
Cleanup: rename 'screen_changed_update'

Match 'workspace_change_update'.

21 months agoWorksSpace: sync object-modes when changing scene
Campbell Barton [Fri, 2 Mar 2018 02:19:52 +0000 (13:19 +1100)]
WorksSpace: sync object-modes when changing scene

Note that this code will likely be generalized,
currently each new case is a little different though
so it's too early to move them into general functions.

21 months agoFCurve: only calculate single axis length
Campbell Barton [Fri, 2 Mar 2018 01:43:41 +0000 (12:43 +1100)]
FCurve: only calculate single axis length

Was calculating all 3

21 months agoFix building w/o Python
Campbell Barton [Fri, 2 Mar 2018 00:09:24 +0000 (11:09 +1100)]
Fix building w/o Python

Also minor cleanup.

21 months agoCleanup: remove print
Campbell Barton [Thu, 1 Mar 2018 12:29:39 +0000 (23:29 +1100)]
Cleanup: remove print

21 months agoRemove legacy code used for sequencer preview image
Dalai Felinto [Thu, 1 Mar 2018 21:22:29 +0000 (18:22 -0300)]
Remove legacy code used for sequencer preview image

This (now removed code) calls gl_Vertex deprecated draws. It was doing
background drawing (color gradient, flat background) which is not used
by any engine.

21 months agoDiscard non-free axis scaling in Maintain Volume to improve 2.79 compat.
Alexander Gavrilov [Thu, 1 Mar 2018 17:45:18 +0000 (20:45 +0300)]
Discard non-free axis scaling in Maintain Volume to improve 2.79 compat.

It seems the reason the old version of the constraint overcompensates
as reported in T48079 is to allow the constraint to work with uniform
scaling on all axes. However the way it did that actually _requires_
uniform scaling for the constraint to work correctly, and breaks if
only the free scaling axis is used to avoid redundant channels.

This version attempts to allow both by discarding scaling in the non-
free directions instead of applying the correction on top of it.

21 months agoPython tests: Split re-usable test related functionality to a module
Sergey Sharybin [Thu, 1 Mar 2018 16:39:57 +0000 (17:39 +0100)]
Python tests: Split re-usable test related functionality to a module

The idea is to avoid re-implementing this for an upcoming FFmpeg tests.

21 months agoRefactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.
Bastien Montagne [Thu, 1 Mar 2018 15:54:21 +0000 (16:54 +0100)]
Refactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.

This merges changes in internals, runtime-only of existing custom
normals code, which make sense as of themselves, and will make diff of
soc branch easier/lighter to review.

In the details, it mostly changes two things:

* Now, smooth fans (aka MLoopNorSpaceArray) can store either loop
indices, or pointers to BMLoop themselves. This makes sense since in
BMesh, it's relatively easy to get index from a BMElement, but nearly
impracticable to go the other way around.

* First change enforces another, now we cannot rely anymore on `loops`
being NULL in MLoopNorSpace to detect single-loop fans, so we instead
store that info in a new flag.

Again, these are expected to be totally non-functional changes.

21 months agoMore clean of macros with an _END and no _BEGIN
Dalai Felinto [Thu, 1 Mar 2018 15:21:56 +0000 (12:21 -0300)]
More clean of macros with an _END and no _BEGIN

Follow up on 7aed2de798b1e5f8663e.

21 months agoFix assert on exit edit-mode
Campbell Barton [Thu, 1 Mar 2018 11:36:40 +0000 (22:36 +1100)]
Fix assert on exit edit-mode

21 months ago3D View: minor selection tweaks
Campbell Barton [Thu, 1 Mar 2018 11:01:46 +0000 (22:01 +1100)]
3D View: minor selection tweaks

- don't initialize the GL context when cache is used.
- don't run second pass when the first one has no hits.

21 months agoMerge branch 'master' into blender2.8
Kévin Dietrich [Thu, 1 Mar 2018 10:56:01 +0000 (11:56 +0100)]
Merge branch 'master' into blender2.8

21 months agoCycles volume: fast empty space optimization by generating a tight mesh
Kévin Dietrich [Thu, 1 Mar 2018 10:54:01 +0000 (11:54 +0100)]
Cycles volume: fast empty space optimization by generating a tight mesh
around the volume.

We generate a tight mesh around the active voxels of the volume in order
to effectively skip empty space, and start volume ray marching as close
to interesting volume data as possible. See code comments for details on
how the mesh generation algorithm works.

This gives up to 2x speedups in some scenes.

Reviewed by: brecht, dingto

Reviewers: #cycles

Subscribers: lvxejay, jtheninja, brecht

Differential Revision:

21 months agoWorkSpace: fix mode exiting w/ multi-window
Campbell Barton [Thu, 1 Mar 2018 10:07:09 +0000 (21:07 +1100)]
WorkSpace: fix mode exiting w/ multi-window

Activating an object exited modes for all other objects in the layer.
Now check these objects aren't active in other windows first.

21 months agoCleanup: macro's w/ an _END need a matching _BEGIN
Campbell Barton [Thu, 1 Mar 2018 08:00:54 +0000 (19:00 +1100)]
Cleanup: macro's w/ an _END need a matching _BEGIN

Convention from 2.7x, since some looping macros don't need an '_END',
it avoids confusion to keep this.

21 months agoMissing assignment in object mode sync
Campbell Barton [Thu, 1 Mar 2018 07:34:16 +0000 (18:34 +1100)]
Missing assignment in object mode sync

Own error in recent change (1aeb9294f4a)

21 months agoDRW: add ability to lock states from changing
Campbell Barton [Thu, 1 Mar 2018 06:14:35 +0000 (17:14 +1100)]
DRW: add ability to lock states from changing

Selection code relies on being able to set the depth functions
however passes have their own depth settings.

Add DRW_state_lock to ignore passes settings for particular flags.

This fixes occlusion queries cycling through objects under the cursor.

21 months agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 1 Mar 2018 05:48:13 +0000 (16:48 +1100)]
Merge branch 'master' into blender2.8

21 months agoGPU_select: remove unused finalize function
Campbell Barton [Thu, 1 Mar 2018 05:41:50 +0000 (16:41 +1100)]
GPU_select: remove unused finalize function

Changed 2.8x code so this is no longer needed.